Skip to content

feat(providers): add tencent-tokenhub provider (salvage of #16860)#16960

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-902f0bcb
Apr 28, 2026
Merged

feat(providers): add tencent-tokenhub provider (salvage of #16860)#16960
teknium1 merged 2 commits into
mainfrom
hermes/hermes-902f0bcb

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of @Contentment003111's #16860 onto current main.

Registers tencent-tokenhub as a new API-key provider for Tencent's MaaS gateway (https://tokenhub.tencentmaas.com/v1, model tencent/hy3-preview, 256K context).

Changes

  • 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

Salvage notes

  • Conflict with fix(providers): honor key_env/api_key_env on Azure Anthropic + accept alias in normalizer #16935 in tests/hermes_cli/test_runtime_provider_resolution.py — both sides added independent test classes, kept both.
  • Conflict with main's removal of hardcoded choices= on the chat subcommand --provider flag — kept main's change (user-defined providers work).
  • Dropped a stray blank line in agent/model_metadata.py.
  • Added simonweng@tencent.com -> Contentment003111 to scripts/release.py AUTHOR_MAP (separate commit).
  • simonweng's authorship preserved on the feat commit; merge rebase to keep it on main.

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.py240/240 passed.

Closes #16860.

simonweng and others added 2 commits April 28, 2026 03:40
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.
@teknium1 teknium1 merged commit 5316ce9 into main Apr 28, 2026
12 of 13 checks passed
@teknium1 teknium1 deleted the hermes/hermes-902f0bcb branch April 28, 2026 10:45
@teknium1 teknium1 mentioned this pull request Apr 28, 2026
19 tasks
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent loop, run_agent.py, prompt builder comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants