fix(doctor): recognize KIMI_CN_API_KEY and handle kimi-cn probe safely#9734
Closed
sqsge wants to merge 1 commit into
Closed
fix(doctor): recognize KIMI_CN_API_KEY and handle kimi-cn probe safely#9734sqsge wants to merge 1 commit into
sqsge wants to merge 1 commit into
Conversation
Collaborator
Contributor
|
Thanks for the contribution! Both fixes in this PR are already on
This was merged as commit Closing as already implemented. (Automated hermes-sweeper review) |
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
KIMI_CN_API_KEYto doctor's provider env hintsbase_envis not setWhy
hermes doctorappears to have two doctor-only issues for thekimi-coding-cnprovider:KIMI_CN_API_KEYis not included in doctor's provider env hints, so China-only Kimi setups can be misclassified as missing provider credentialsbase_env=None, but the later probe loop still callsos.getenv(_base_env, "")unconditionally, which can raiseTypeError: str expected, not NoneTypeThis PR keeps the fix intentionally narrow and limits it to the diagnostic layer in
hermes_cli/doctor.py.Fixes #9716
Tests
I added regression coverage in
tests/hermes_cli/test_doctor.pyfor:KIMI_CN_API_KEYas a configured provider envbase_envisNoneLocal verification:
python -m pytest -o addopts='' tests/hermes_cli/test_doctor.py -q19 passedThe repository's default pytest configuration includes
-n, which is not available in this local environment, so I ran the same test file withaddoptsdisabled.