Skip to content

feat(models): add Tencent Hy3 model - #3325

Merged
steebchen merged 2 commits into
theopenco:mainfrom
vicovaro:feat/add-hy3-model
Jul 31, 2026
Merged

steebchen merged 2 commits into
theopenco:mainfrom
vicovaro:feat/add-hy3-model

Conversation

@vicovaro

@vicovaro vicovaro commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Tencent's Hy3 model to the catalogue with provider mappings for DeepInfra and NovitaAI.

Hy3 is Tencent's 295B Mixture-of-Experts model (21B active params) with native 256K context and three reasoning modes, targeting complex reasoning and agentic tasks.

Provider mappings

Field DeepInfra NovitaAI
External ID tencent/Hy3 tencent/hy3
Input price $0.14/M $0.14/M
Cached input price $0.035/M $0.035/M
Output price $0.58/M $0.58/M
Context size 262144 262144
Max output 131072 262144
Quantization fp8 —
Streaming yes yes
Reasoning yes (none, low, high) yes (none, low, high)
Vision no no
Tools yes yes
JSON output yes yes

reasoningEfforts: ["none", "low", "high"] on both. DeepInfra's max output is 131072 (max_output_tokens from its model metadata; the page's max_tokens: 262144 is the full context window, not the output cap). Novita's max_output_tokens is 262144.

References

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Tencent’s HY3 model to the available model catalog.
    • Added support for streaming, reasoning, tool use, vision, and JSON output capabilities.
    • Included provider availability, context limits, quantization, and pricing details.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9217cef5-eac4-42d4-b733-b9adc136abec

📥 Commits

Reviewing files that changed from the base of the PR and between 0de5b76 and 2f0de7e.

📒 Files selected for processing (1)
  • packages/models/src/models/tencent.ts

Walkthrough

Adds Tencent’s HY3 model with DeepInfra and Novita provider configurations, then registers the definitions in the shared models array.

Changes

Tencent model registry

Layer / File(s) Summary
Define and register Tencent HY3
packages/models/src/models/tencent.ts, packages/models/src/models.ts
Defines HY3 metadata and provider capabilities for DeepInfra and Novita, then adds the Tencent model list to the exported registry.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: steebchen

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: adding Tencent's Hy3 model to the models catalogue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vicovaro
vicovaro marked this pull request as draft July 30, 2026 15:41

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/models/src/models/tencent.ts`:
- Around line 21-25: Add the shared reasoningEfforts values ["no_think", "low",
"high"] to both Hy3 model mappings alongside reasoning: true, and update the Hy3
request-building path to forward the selected reasoning effort as the
OpenAI-compatible reasoning_effort body field.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a5ed714d-2cba-4e70-b992-2415bbc29939

📥 Commits

Reviewing files that changed from the base of the PR and between 1358c5e and ef591f0.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • packages/models/src/models.ts
  • packages/models/src/models/tencent.ts

Comment thread packages/models/src/models/tencent.ts
@vicovaro
vicovaro force-pushed the feat/add-hy3-model branch 2 times, most recently from 301b369 to 7d6f859 Compare July 30, 2026 16:01
vicovaro

This comment was marked as low quality.

@vicovaro
vicovaro force-pushed the feat/add-hy3-model branch 2 times, most recently from 20062a9 to ac23f48 Compare July 30, 2026 16:43
Add Tencent's Hy3 (295B Mixture-of-Experts, 21B active) with provider
mappings for DeepInfra and Novita. Native 256K context and three
reasoning modes for complex reasoning and agentic tasks.

Provider mappings (per-token prices in e-6 notation):

  DeepInfra (tencent/Hy3):  input 0.14e-6, cached 0.035e-6, output 0.58e-6
    context 262144, maxOutput 131072, fp8, reasoning/tools/jsonOutput

  Novita    (tencent/hy3):  input 0.14e-6, cached 0.035e-6, output 0.58e-6
    context 262144, maxOutput 262144, reasoning/tools/jsonOutput

reasoningEfforts: ["none", "low", "high"] on both. Verified live against
DeepInfra's API that "none" disables reasoning and "low"/"high" enable it.

DeepInfra's maxOutput is 131072 (max_output_tokens from its model metadata);
the page's "max_tokens 262144" is the full context window, not the output cap.
Novita's max_output_tokens is 262144.

Refs:
  https://deepinfra.com/tencent/Hy3
  https://novita.ai/models/model-detail/tencent-hy3
  https://openrouter.ai/tencent/hy3
  https://github.com/Tencent-Hunyuan/Hy3

Co-Authored-By: Claude <noreply@anthropic.com>
@vicovaro
vicovaro force-pushed the feat/add-hy3-model branch from ac23f48 to 0de5b76 Compare July 30, 2026 16:51
@vicovaro
vicovaro marked this pull request as ready for review July 30, 2026 16:52
@smakosh
smakosh requested a review from steebchen July 30, 2026 23:00
Novita's tencent/hy3 rejects the json_object response format (400,
"Supported formats: json_schema"); it only supports json_schema.
DeepInfra's tencent/Hy3 supports both.

Verified against both provider APIs directly and via the scoped e2e run.

Co-Authored-By: Claude <noreply@anthropic.com>
@steebchen

Copy link
Copy Markdown
Member

Ran the scoped e2e suite for both mappings (TEST_MODELS="deepinfra/hy3,novita/hy3" FULL_MODE=true pnpm test:e2e).

One real catalogue bug found and fixed (pushed as 2f0de7e): Novita's tencent/hy3 does not support the json_object response format — it 400s with:

Model 'tencent/hy3' does not support 'json_object' response format. Supported formats: json_schema.

It does support json_schema. DeepInfra's tencent/Hy3 supports both. So the flags are now:

jsonOutput jsonOutputSchema
deepinfra ✅ ✅
novita — ✅

Both verified with direct provider calls, not just through the gateway.

Results after the fix

Tests 122 passed | 87 skipped — every chat/streaming/reasoning/tool-call/JSON/prompt-caching test passes for both mappings.

The only remaining failure is responses tool calls 'deepinfra/hy3' (404 on the stored-response GET), which is a pre-existing test-harness race, unrelated to this PR: responses.e2e.ts runs its tests concurrently, and the harness beforeEach calls clearCache() → redisClient.flushdb(), wiping the Redis-backed responses store out from under a concurrently in-flight test. It passes when hy3 runs alone, and it reproduces identically on models this PR doesn't touch (novita/gemma-4-31b-it failed the same assertion twice in two control runs).

Other metadata verified against the provider APIs

Prices ($0.14 / $0.035 cached / $0.58 per M), context 262144, max output (131072 DeepInfra / 262144 Novita), fp8 quantization, and the tools/reasoning/json capability flags all match what DeepInfra and Novita report. 👍

@steebchen
steebchen added this pull request to the merge queue Jul 30, 2026
Merged via the queue into theopenco:main with commit 5bf2bc8 Jul 31, 2026
9 checks passed
@vicovaro
vicovaro deleted the feat/add-hy3-model branch August 3, 2026 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants