fix(models): add live model fetch for tencent-tokenhub provider - #59704
Open
liuhao1024 wants to merge 1 commit into
Open
liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
The tencent-tokenhub provider's model picker only displayed hy3-preview, but the TokenHub API returns 58 available models. Added a live-fetch block in provider_model_ids() following the same pattern as stepfun and gmi providers. Fixes NousResearch#59694
This was referenced Jul 6, 2026
Collaborator
|
Thanks for the focused fix. The premise remains valid on current Problems
Suggested changes
Automated hermes-sweeper review. |
This branch has not been deployed
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 does this PR do?
Adds a live model fetch block for the tencent-tokenhub provider in
provider_model_ids(). Previously, the provider only returned the static fallback list containinghy3-preview, even though the TokenHub API (https://tokenhub.tencentmaas.com/v1/models) returns 58 available models.The fix follows the same pattern used by other API-key providers (stepfun, gmi): resolve credentials via
resolve_api_key_provider_credentials(), then call the standardfetch_api_models()helper to query the/v1/modelsendpoint.Related Issue
Fixes #59694
Type of Change
Changes Made
hermes_cli/models.py: Added atencent-tokenhublive-fetch block inprovider_model_ids()(13 lines) that queries the TokenHub/v1/modelsendpoint when credentials are available.How to Test
TOKENHUB_API_KEYin.env(or viahermes auth add tencent-tokenhub)hermes modeland select the tencent-tokenhub providerWithout the fix, only
hy3-previewappears in the picker.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A