feat(providers): add kimi-coding-cn provider for mainland China users#9172
Merged
Conversation
Cherry-picked from PR #7637 by hcshen0111. Adds kimi-coding-cn provider with dedicated KIMI_CN_API_KEY env var and api.moonshot.cn/v1 endpoint for China-region Moonshot users.
Follow-up for salvaged PR #7637. Adds kimi-coding-cn to: - model_normalize.py (prefix strip) - providers.py (models.dev mapping) - runtime_provider.py (credential resolution) - setup.py (model list + setup label) - doctor.py (health check) - trajectory_compressor.py (URL detection) - models_dev.py (registry mapping) - integrations/providers.md (docs)
Contributor
|
This was referenced Apr 13, 2026
Closed
This was referenced Apr 13, 2026
1 task
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.
Summary
Adds a dedicated
kimi-coding-cnprovider for mainland China Moonshot/Kimi users. The international endpoint (api.moonshot.ai) is inaccessible from China — this addsapi.moonshot.cn/v1as a first-class provider following the establishedminimax/minimax-cndual-provider pattern.kimi-codingapi.moonshot.ai/v1KIMI_API_KEYkimi-coding-cnapi.moonshot.cn/v1KIMI_CN_API_KEYAliases:
kimi-cn,moonshot-cnChanges
Salvaged from PR #7637 by @hcshen0111, with supplementary coverage from PRs #8900 (@LoikStyle), #8856 (@bugmaker2), and #8166 (@konsisumer).
Core provider wiring
hermes_cli/auth.py—kimi-coding-cnProviderConfig + aliaseshermes_cli/config.py—KIMI_CN_API_KEYin OPTIONAL_ENV_VARShermes_cli/models.py— model list, labels, aliases, provider orderhermes_cli/main.py— setup menu, CLI choices, model flow dispatchhermes_cli/runtime_provider.py— credential resolutionhermes_cli/setup.py— model list + setup labelhermes_cli/model_normalize.py— prefix striphermes_cli/providers.py— models.dev mappinghermes_cli/doctor.py— health check entryAgent internals
agent/auxiliary_client.py— aux model mappingagent/model_metadata.py— provider prefixes + URL-to-provideragent/models_dev.py— models.dev registry mappingtrajectory_compressor.py— moonshot.cn URL detectionDocs
website/docs/getting-started/quickstart.md— provider tablewebsite/docs/reference/environment-variables.md— KIMI_CN_API_KEY + provider listwebsite/docs/user-guide/configuration.md— auxiliary provider listwebsite/docs/integrations/providers.md— full provider docs.env.example— commented exampleTest results
tests/hermes_cli/: 1887 passed (all failures pre-existing)Closes
Supersedes PRs #7637, #8900, #8856, #8166