feat(providers): add tencent-tokenhub provider (salvage of #16860)#16960
Merged
Conversation
Registers tencent-tokenhub (https://tokenhub.tencentmaas.com/v1) as a new API-key provider with model tencent/hy3-preview (256K context). - PROVIDER_REGISTRY entry + TOKENHUB_API_KEY / TOKENHUB_BASE_URL env vars - Aliases: tencent, tokenhub, tencent-cloud, tencentmaas - openai_chat transport with is_tokenhub branch for top-level reasoning_effort (Hy3 is a reasoning model) - tencent/hy3-preview:free added to OpenRouter curated list - 60+ tests (provider registry, aliases, runtime resolution, credentials, model catalog, URL mapping, context length) - Docs: integrations/providers.md, environment-variables.md, model-catalog.json Author: simonweng <simonweng@tencent.com> Salvaged from PR #16860 onto current main (resolved conflicts with #16935 Azure Anthropic env-var hint tests and the --provider choices= list removal in chat_parser).
AUTHOR_MAP entry for the tencent-tokenhub provider PR #16860 contributor.
19 tasks
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.
Salvage of @Contentment003111's #16860 onto current main.
Registers
tencent-tokenhubas a new API-key provider for Tencent's MaaS gateway (https://tokenhub.tencentmaas.com/v1, modeltencent/hy3-preview, 256K context).Changes
PROVIDER_REGISTRYentry +TOKENHUB_API_KEY/TOKENHUB_BASE_URLenv varstencent,tokenhub,tencent-cloud,tencentmaasopenai_chattransport withis_tokenhubbranch for top-levelreasoning_effort(Hy3 is a reasoning model)tencent/hy3-preview:freeadded to OpenRouter curated listSalvage notes
tests/hermes_cli/test_runtime_provider_resolution.py— both sides added independent test classes, kept both.choices=on thechatsubcommand--providerflag — kept main's change (user-defined providers work).agent/model_metadata.py.simonweng@tencent.com -> Contentment003111toscripts/release.pyAUTHOR_MAP (separate commit).Validation
Targeted:
scripts/run_tests.sh tests/hermes_cli/test_tencent_tokenhub_provider.py tests/hermes_cli/test_runtime_provider_resolution.py tests/hermes_cli/test_xiaomi_provider.py tests/hermes_cli/test_arcee_provider.py→ 240/240 passed.Closes #16860.