-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(auth): add Kimi and Xiaomi MiMo providers #8368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
DragonnZhang
wants to merge
95
commits into
QwenLM:main
Choose a base branch
from
DragonnZhang:dragon/add-kimi-xiaomi-auth
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
95 commits
Select commit
Hold shift + click to select a range
8273015
feat(auth): add Kimi and Xiaomi MiMo providers
DragonnZhang c55523f
fix(auth): address endpoint provider review feedback
DragonnZhang 1ec9749
test(cli): guarantee provider fixture cleanup
DragonnZhang 284736b
fix(auth): preserve endpoint-specific provider state
DragonnZhang d51be1f
fix(cli): strip endpoint models when switching providers
DragonnZhang f6de683
test(cli): pin endpoint-specific model resolution regressions
DragonnZhang d3d6a43
Merge branch 'main' into dragon/add-kimi-xiaomi-auth
qwen-code-dev-bot 0b90de1
Merge branch 'main' into dragon/add-kimi-xiaomi-auth
wenshao 407d267
fix(auth): preserve keys across compatible endpoints
DragonnZhang 3bae508
Merge main into dragon/add-kimi-xiaomi-auth
DragonnZhang b9f8723
fix provider setup endpoint state
DragonnZhang 60a06b2
fix(auth): preserve key drafts across endpoint round trips (#8368)
qwen-code-ci-bot 4013bf3
Merge branch 'main' into dragon/add-kimi-xiaomi-auth
qwen-code-dev-bot 27b01b1
fix(test): pin qwen serve streaming suite to a hermetic workspace (#8…
qwen-code-ci-bot 760d115
fix(auth): avoid migrating built-in endpoint models
DragonnZhang cd19e12
fix(auth): clear stale wizard errors and restore seeded protocol (#8368)
github-actions[bot] b9ba858
fix(auth): scope restored provider seeding to the saved endpoint (#8368)
github-actions[bot] a41e9ce
Merge branch 'main' into dragon/add-kimi-xiaomi-auth
wenshao 3086e96
fix(auth): scope model-id built-in classification to endpoints (#8368)
qwen-code-ci-bot c86846f
fix(cli): preserve endpoint custom models on update
DragonnZhang df62144
fix(auth): preserve user edits across wizard round trips (#8368)
github-actions[bot] c60b7db
fix(auth): align endpoint setup state
DragonnZhang 78b68de
Merge branch 'main' into dragon/add-kimi-xiaomi-auth
qwen-code-dev-bot ee465ca
Merge main into dragon/add-kimi-xiaomi-auth
DragonnZhang 89826cb
fix(auth): preserve provider setup drafts
DragonnZhang 6dc31d0
test(auth): cover submenu budget and key drafts
DragonnZhang bd91e24
fix(auth): normalize kimi doc URL and pin sub-menu pagination (#8368)
qwen-code-ci-bot a4e7054
fix(auth): preserve provider endpoint drafts
DragonnZhang 3c3c2db
fix(auth): harden provider setup previews and endpoint switching (#8368)
DragonnZhang e747afe
fix(provider): isolate multi-endpoint Kimi state
DragonnZhang 3727e1d
fix(providers): canonicalize install baseUrl and pin endpoint-state g…
DragonnZhang 3dee0a4
fix(web-shell): scope auth docs link to the selected endpoint (#8368)
DragonnZhang 9c89b8c
Merge branch 'main' into dragon/add-kimi-xiaomi-auth
qwen-code-dev-bot b264076
Merge branch 'main' into dragon/add-kimi-xiaomi-auth
qwen-code-dev-bot 2e4f4df
fix provider update edge cases
DragonnZhang 710c871
fix(providers): harden endpoint updates and custom model provenance
qwen-code-dev-bot 54022e8
chore: merge main into dragon/add-kimi-xiaomi-auth
qwen-code-dev-bot 613b7d0
fix(providers): preserve endpoint state
DragonnZhang 04de43b
fix(providers): preserve legacy endpoint state
DragonnZhang 282a7a5
test(providers): update Coding Plan endpoint expectations
DragonnZhang e9a7eba
fix(providers): preserve endpoint user state
DragonnZhang a972902
chore: merge main into dragon/add-kimi-xiaomi-auth
qwen-code-dev-bot c5624f2
fix(providers): preserve multi-endpoint model identity
DragonnZhang f9d446f
Merge remote-tracking branch 'origin/dragon/add-kimi-xiaomi-auth' int…
DragonnZhang 3c2c133
test(providers): reconcile merged source imports
DragonnZhang f76f8f6
fix(cli): preserve provider update state
DragonnZhang 405f025
fix(cli): preserve endpoint model state
DragonnZhang 3547579
fix endpoint-scoped provider drafts
DragonnZhang 18ce7d3
fix(auth): preserve provider selection invariants
DragonnZhang 5190648
fix(auth): preserve endpoint credentials and selections
DragonnZhang ae8311c
fix provider reconnect state preservation
DragonnZhang 31741fd
Merge main into dragon/add-kimi-xiaomi-auth
DragonnZhang 6cd73c7
Merge main into provider auth branch
DragonnZhang 3c1238f
fix(auth): preserve endpoint-scoped provider state
DragonnZhang 3d701d8
chore: keep auth fix diff focused
DragonnZhang 0d635ea
fix(auth): preserve rich custom model settings
DragonnZhang d7f7321
fix(auth): stabilize restored provider models
DragonnZhang 564b0cd
fix(auth): preserve provider models by endpoint
DragonnZhang 712d633
Merge upstream main and harden provider migrations
DragonnZhang 0b2c958
fix(cli): keep migration write batch mutable
DragonnZhang 2d048c4
fix(auth): preserve provider state across reconnects
DragonnZhang 7e6f20f
Merge remote-tracking branch 'origin/main' into tmp-merge-8368
DragonnZhang deaf525
fix(cli): honor model deselection over ACP and isolate endpoint model…
DragonnZhang 8bee0ed
fix: carry saved model state across endpoints on reconnect and stamp …
DragonnZhang bf94a5b
fix(cli): make /auth protocol step preserve the selected protocol buc…
DragonnZhang b9638ef
fix(desktop): sync bun.lock with workspace package versions
DragonnZhang 22752be
fix: re-seed desktop model field from the selected protocol bucket on…
DragonnZhang 11d7112
Merge remote-tracking branch 'origin/main' into pr-8368
DragonnZhang dfa7d0f
fix(auth): remove deselected baseUrl-less custom models on install
DragonnZhang b0fe360
fix(auth): sanitize ACP provider-list endpoint keys, fix desktop form…
DragonnZhang 9d00056
fix(auth): scope baseUrl-less ownership by endpoint key, null modelId…
DragonnZhang 6497c2d
fix(auth): attribute legacy models by endpoint key shape, dedup recon…
DragonnZhang a45aa4e
fix(auth): scope legacy attribution by endpoint env key, fail closed …
DragonnZhang c30cc5d
fix(serve): keep the fast-path bundle lean via providerConfig subpath…
DragonnZhang 18da932
fix(auth): round-41 — fail closed on shared endpoint keys, claim dese…
DragonnZhang 992d986
Merge remote-tracking branch 'origin/main' into pr-8368
DragonnZhang d768539
fix(providers): register kimi-k2.6 as text-only per #5328 precedent
DragonnZhang c0d9ec8
fix(auth): seed attributable legacy ids per endpoint, carry only live…
DragonnZhang 27879bc
fix(providers): restore kimi-k2.6 multimodal modalities
DragonnZhang 9d74aaf
fix(auth): close non-merge legacy-attribution gaps on serve, ACP, and…
DragonnZhang 6507691
Merge remote-tracking branch 'origin/main' into pr-8368
DragonnZhang 1828d49
Merge remote-tracking branch 'origin/main' into pr-8368
DragonnZhang f3c4570
fix(auth): round-44 — scope ownsModel claims, gate env-key ownership …
DragonnZhang 7afbf33
ci: record cd-cua-driver.yml size growth in .size-baseline
DragonnZhang f9178ec
fix(auth): round-45 — gate unattributable legacy seeds, claim adopted…
DragonnZhang 1680604
Merge remote-tracking branch 'origin/main' into pr-8368
DragonnZhang 6432e8e
fix(auth): round-46 — yield the shared MOONSHOT_API_KEY space in regi…
DragonnZhang 61b31b5
ci: restore typecheck:integration script dropped during main merge
DragonnZhang 677cb23
Merge remote-tracking branch 'origin/main' into pr-8368
DragonnZhang d0478a4
Merge remote-tracking branch 'origin/main' into pr-8368
DragonnZhang 95d22e6
chore(desktop): drop orphaned provider-setup files after desktop fork…
DragonnZhang e5dfa38
fix(auth): close cross-surface attribution, collapse, and adoption gaps
DragonnZhang ae172f0
fix(auth): gate stale-stamped claims on surfacing across all surfaces
DragonnZhang e6e3ee7
Merge remote-tracking branch 'upstream/main' into dragon/add-kimi-xia…
DragonnZhang 92e345e
Merge remote-tracking branch 'upstream/main' into dragon/add-kimi-xia…
DragonnZhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Kimi and Xiaomi MiMo authentication presets | ||
|
|
||
| ## Goal | ||
|
|
||
| Expose Kimi and Xiaomi MiMo directly under `/auth` → **Third-party | ||
| Providers**, including their subscription endpoints, so users do not have to | ||
| recreate these providers through **Custom Provider**. | ||
|
|
||
| ## Provider shape | ||
|
|
||
| Kimi is represented by one top-level preset with a second-level access-type | ||
| selector: | ||
|
|
||
| - **Coding Plan**: the Kimi membership coding benefit at | ||
| `https://api.kimi.com/coding/v1`, with the four model IDs documented for | ||
| third-party coding tools. | ||
| - **API Key (China)**: the Kimi Open Platform endpoint at | ||
| `https://api.moonshot.cn/v1`. | ||
| - **API Key (International)**: the Kimi Open Platform endpoint at | ||
| `https://api.moonshot.ai/v1`. | ||
|
|
||
| The two API Key choices recommend `kimi-k3`, `kimi-k2.7-code`, | ||
| `kimi-k2.7-code-highspeed`, and `kimi-k2.6`. Coding Plan and Kimi Open Platform | ||
| still use different keys, billing, and model IDs. Each endpoint option | ||
| therefore carries its own model list, and the setup flow resolves both the | ||
| model list and environment variable after the access type is selected. | ||
|
|
||
| Xiaomi MiMo is represented by one preset because its pay-as-you-go API and | ||
| Token Plan share the same model IDs and OpenAI-compatible request format. Its | ||
| endpoint selector includes pay-as-you-go plus the China, Singapore, and Europe | ||
| Token Plan endpoints. The recommended models are `mimo-v2.5-pro` and | ||
| `mimo-v2.5`. | ||
|
|
||
| Both presets remain editable so users can add later model IDs without | ||
| waiting for a Qwen Code release. The Third-party Providers list remains sorted | ||
| alphabetically by its displayed labels. | ||
|
|
||
| ## Model metadata | ||
|
|
||
| - Kimi K3 uses a 1,048,576-token context window, always thinks, and accepts | ||
| image and video input. Kimi K2.7 Code and K2.6 use a 262,144-token context | ||
| window and accept image and video input; K2.7 Code always thinks. | ||
| - Kimi Code recommends `k3-256k` first for routine coding. `k3` uses a | ||
| 1,048,576-token context window; all other Kimi Code models use 262,144 | ||
| tokens. `k3` and both K2.7 Code IDs accept image and video input; | ||
| `k3-256k` accepts images only. Thinking stays enabled so selecting a K3 or | ||
| K2.7 Code ID does not silently route to K2.6. | ||
|
DragonnZhang marked this conversation as resolved.
|
||
| - Both MiMo V2.5 models use a 1,048,576-token context window. | ||
| `mimo-v2.5` accepts image, video, and audio input; the Pro model is kept | ||
| text-only according to the published capability table. | ||
|
|
||
| No Qwen-specific `enable_thinking` field is installed for Kimi or MiMo. Their | ||
| OpenAI-compatible APIs use different thinking controls and enable thinking by | ||
| default. | ||
|
|
||
| ## Sources | ||
|
|
||
| - [Kimi Code overview](https://www.kimi.com/code/docs/en/) | ||
| - [Kimi Code model configuration](https://www.kimi.com/code/docs/en/kimi-code/models.html) | ||
| - [Kimi API international overview](https://platform.kimi.ai/docs/api/overview) | ||
| - [Kimi API China overview](https://platform.kimi.com/docs/api/overview) | ||
| - [Kimi K3 API guide](https://platform.kimi.ai/docs/guide/kimi-k3-quickstart) | ||
| - [Kimi K2.7 Code API guide](https://platform.kimi.ai/docs/guide/kimi-k2-7-code-quickstart) | ||
| - [Xiaomi MiMo first API call](https://mimo.mi.com/docs/en-US/quick-start/summary/first-api-call) | ||
| - [Xiaomi MiMo Token Plan](https://mimo.mi.com/docs/tokenplan/subscription) | ||
| - [Xiaomi MiMo model overview](https://mimo.mi.com/docs/quick-start/summary/model) | ||
|
|
||
| ## Verification | ||
|
|
||
| Unit tests cover preset metadata, endpoint-specific model resolution, | ||
| install-plan output, registry discovery, and alphabetical ordering. A manual | ||
| E2E pass checks the `/auth` provider list and each endpoint selector without | ||
| submitting real credentials. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.