docs(rust/README): document xAI and Kimi model aliases#3268
Open
nankingjing wants to merge 1 commit into
Open
Conversation
|
Good catch — the model aliases table was indeed incomplete. Having the full alias set documented alongside the Provider and Auth env var columns makes it much more actionable for users. The case-insensitivity note is also a helpful detail. |
|
我已收到您的邮件~会尽快给您回复。祝您六时吉祥,阿弥陀佛。
|
Author
|
Thanks for the quick review, @1716775457damn! Glad the Provider / Auth-env columns are useful. I noticed a couple of other small doc nits while in there (a broken link and an out-of-date crate count) and have a follow-up PR incoming, kept separate to keep this one focused. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
The Model Aliases table in
rust/README.mdonly listed the three Anthropicaliases (
opus,sonnet,haiku), butresolve_model_aliasinrust/crates/api/src/providers/mod.rsalso resolves xAI and Kimi aliases. ThisPR documents the full alias set, adds a Provider and Auth env var column
so each alias is actionable, and notes that resolution is case-insensitive.
Newly documented aliases (verified against
MODEL_REGISTRY/resolve_model_alias):grok,grok-3grok-3XAI_API_KEYgrok-mini,grok-3-minigrok-3-miniXAI_API_KEYgrok-2grok-2XAI_API_KEYkimikimi-k2.5DASHSCOPE_API_KEYWhy it's correct
Everything added is verifiable in the source, not invented:
resolve_model_alias()mapsgrok/grok-3→grok-3,grok-mini/grok-3-mini→
grok-3-mini,grok-2→grok-2, andkimi→kimi-k2.5.MODEL_REGISTRYsets the auth/base-url env vars for each provider:xAI →
XAI_API_KEY/XAI_BASE_URL, Kimi →DASHSCOPE_API_KEY/DASHSCOPE_BASE_URL.resolve_model_aliaslowercases input before matching, andexisting tests assert this (
kimi_alias_resolves_to_kimi_k2_5checks"KIMI",resolves_grok_aliaseschecks the grok family)."use an xAI model alias such as
--model grok"), anddocs/MODEL_COMPATIBILITY.mddocuments the corresponding request handling — this PR just surfaces the aliases
where they are listed.
Scope
Docs-only change to
rust/README.md. No code or behavior changes. The existingopus/sonnet/haikurows are unchanged.