Tencent (HY)
Tencent HY models can be added to Tresor via API key authentication. Older Hunyuan access is migrating to TokenHub. The setup below uses the explicitly documented TokenHub OpenAI Chat Completions endpoint; confirm your model's invocation details in TokenHub before configuring it.
- Web UI
- config.yaml
Web UI is more intuitive, but requires more manual operations.
In the "Downstreams" tab:
- Click + Add Provider if Tencent is not already listed.
- Enter
Tencent HYor any name you like. - Under "API Formats", select OpenAI.
- Under "Authentication", select API key and enter a key from TokenHub API Key Management. Migrated models require replacement TokenHub credentials, not an old Hunyuan key.
- Under "API Host", enter
https://tokenhub.tencentmaas.com. - Under "Models", click Fetch Models. If discovery is unavailable, manually add the exact model ID displayed under TokenHub Online Inference or on the model-detail page.
Editing YAML is less intuitive, but requires fewer manual operations.
Replace YOUR-TOKENHUB-API-KEY and YOUR-HY-MODEL-ID with the credentials and exact model ID from your TokenHub invocation page.
# Other settings omitted. Add this entry to your existing downstreams list.
downstreams:
- id: tencent
name: Tencent HY
base_url: https://tokenhub.tencentmaas.com
api_formats:
- openai
output_model_ids:
- YOUR-HY-MODEL-ID
is_enabled: true
auth:
type: api_key
api_key: YOUR-TOKENHUB-API-KEY
Restart Tresor to apply the YAML changes.
Responses and Anthropic compatibility
The supplied compatibility report identifies hy4-preview as supporting OpenAI Chat Completions, Responses, and Anthropic Messages. However, it does not establish stable universal TokenHub URLs for the latter two formats. Do not infer these URLs from the Chat endpoint.
If your model's current invocation page explicitly provides Responses or Anthropic endpoints:
- Enable only the additional formats documented for that model.
- Under Advanced, set each format's Per-format URL to the endpoint's origin/base and its request path to the documented path.
- In YAML, add the corresponding
openai_responsesoranthropicentry toapi_formats, and configureformat_urlsandformat_pathsso their concatenation equals the full documented URL. - Confirm the required credential and test a request before relying on the new format.
For an older model that still explicitly uses the legacy Hunyuan API, its Chat host is https://api.hunyuan.cloud.tencent.com with the /v1/chat/completions path. Use that only when the current model instructions still require it; migrated models should use TokenHub.
Done! Clients accessing Tresor can now use your configured HY models.