docs(rust/README): document xAI and Kimi model aliases#3268
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. |
|
我已收到您的邮件~会尽快给您回复。祝您六时吉祥,阿弥陀佛。
|
|
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. |
|
Sounds good, keeping the follow-up PR focused on those doc nits separately makes sense. Looking forward to reviewing it — especially the broken link fix. Thanks for the thorough docs work! |
|
Quick note: #3269 is just the crate-count fix; I haven't opened the broken-link follow-up yet — will get to that separately. Thanks for flagging it! |
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.