Skip to content

feat(providers): sync custom registry providers on startup refresh#675

Merged
liruifengv merged 2 commits into
MoonshotAI:mainfrom
sailist:fix/provider-refresh
Jun 12, 2026
Merged

feat(providers): sync custom registry providers on startup refresh#675
liruifengv merged 2 commits into
MoonshotAI:mainfrom
sailist:fix/provider-refresh

Conversation

@sailist

@sailist sailist commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR improves the startup provider refresh logic to properly synchronize custom registry providers. Previously, registry providers were not fully synced during startup refresh, which could leave stale entries, create duplicates, or fail to surface newly available providers. The change groups providers by registry URL, handles API key rotation, and ensures the provider list accurately reflects the current registry state.


1. Custom registry provider synchronization on startup refresh

Problem:
When custom registry providers were configured, the startup refresh did not reliably sync them. Duplicate source URLs could trigger false config-change reports, disappeared providers were not removed, and newly available providers were not automatically added. Additionally, if the default model was removed, defaultThinking was left pointing to a stale value.

What was done:

  • Group registry providers by URL and retry with available API keys.
  • Automatically add new providers and remove disappeared ones during refresh.
  • Coalesce duplicate source URLs to avoid false config-change reports.
  • Clear defaultThinking when the default model is removed.
  • Update English and Chinese documentation.
  • Add comprehensive tests for registry sync scenarios.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4335c78

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 12, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@4335c78
npx https://pkg.pr.new/@moonshot-ai/kimi-code@4335c78

commit: 4335c78

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c878224fa6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/utils/refresh-providers.ts
sailist added 2 commits June 12, 2026 16:54
- group registry providers by URL and retry available API keys\n- automatically add new providers and remove disappeared ones\n- coalesce duplicate source URLs to avoid false config-change reports\n- clear defaultThinking when default model is removed\n- update docs and add tests for registry sync scenarios
 Skip removed / metadata-only provider updates when reporting model list changes.\n\n add: test to enforce the behavior.
@sailist sailist force-pushed the fix/provider-refresh branch from c878224 to 4335c78 Compare June 12, 2026 08:55
@liruifengv liruifengv merged commit d1ba145 into MoonshotAI:main Jun 12, 2026
8 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants