fix(cli): fix doctor checks for Kimi China credentials#9720
Closed
sjz-ks wants to merge 1 commit into
Closed
Conversation
1 task
Contributor
|
Merged via PR #9780. Your commit was cherry-picked onto current main with your authorship preserved in git log. Thanks for the clean fix, Kevin! |
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
This fixes two
hermes doctorfalse-negative bugs forkimi-coding-cn/ Moonshot China credentials:KIMI_CN_API_KEYas a configured provider credential in.envThe runtime provider path is unchanged. This only corrects
doctordiagnostics.Closes #9716.
Changes
KIMI_CN_API_KEYto_PROVIDER_ENV_HINTSinhermes_cli/doctor.pybase_env=Nonedoes not triggerTypeErrorKIMI_CN_API_KEYenv detectionstr expected, not NoneTypeValidation
python -m pytest tests/hermes_cli/test_doctor.py -q→19 passedKIMI_CN_API_KEYin.envnow showsAPI key or custom endpoint configuredhttps://api.moonshot.cn/v1/modelswithout the previous Python exceptionNotes
I also checked full-suite behavior locally. The remaining local failures appear unrelated to this patch and are reproducible on a clean
origin/mainbaseline in this macOS environment.