Repository navigation
Add Tencent Hy4 Flash to the model registry - #200
Draft
adambalogh wants to merge 1 commit into
Draft
adambalogh wants to merge 1 commit into
adambalogh wants to merge 1 commit into
Conversation
Hy4 Flash (released 2026-11-16) is Tencent's ~220B-parameter (12B active) open-weight MoE with text + image input and a 1M-token context. Routed through OpenRouter like hy3, at OpenRouter's list rate ($0.035 / $0.1405 per MTok). chat-api offers it in place of Hy3 on the affordable tier. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQvDLyFCCRZxHeRQ9GM1T5
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.
Summary
Registers Tencent Hy4 Flash (
tencent/hy4-flash, released 2026-11-16) on the existing OpenRouter provider, alongside hy3 / hy4-preview. No routing change is needed:llm_backendroutes offprovider="openrouter".Decimal("0.000000035")/Decimal("0.0000001405")per token. Source:openrouter.ai/api/v1/modelsand the model's/endpoints(Tencent Cloud is the only provider). That endpoint is authoritative for both price and availability.temperature,reasoning,tools,response_formatandstructured_outputsas supported. The Hugging Face model card documentsreasoning_effortwith a no-think mode (it recommends temperature 0.9). So the model needs nosupports_temperatureorforce_temperatureoverride.hy4-flash,tencent/hy4-flash.Why this one
The companion chat-api PR uses it to replace Hy3 on the affordable tier. It costs about a quarter of Hy3's $0.132 / $0.528, and it adds vision and 4× the context. On the model card's base-model table it beats Hy3-preview Base on most rows (MMLU-Pro 71.1 vs 65.8, SuperGPQA 57.8 vs 52.3). Hy3 stays registered because the catalog hides it rather than deleting it, so persisted threads keep their id.
Considered and not registered: Hy4 (GA, 2026-11-04, $0.417 / $1.25). Hy4 Preview was hidden from the pickers after its first month drew under a hundred requests, and the catalog's one-row-per-line-and-tier bar has no slot for it. GPT-6.1 Terra was already declined in #184.
Overlap with open PRs
#197 (Seedream 5.5, from an earlier run of this task) touches the adjacent ByteDance line of the CLAUDE.md provider list. Git will flag a one-line doc conflict there for whichever PR merges second; keep both lines. The registry, tests and README merge cleanly.
Companion PR
chat-api #545 (https://github.com/OpenGradient/chat-api/pull/545) puts Hy4 Flash in the catalog in place of Hy3. Land this PR first.
Test plan
make lintpasses: ruff format, ruff check, mypyPYTHONPATH=. uv run pytest tests/test_pricing.py: 196 passed. Addstest_hy4_flash_resolvesandtest_hy4_flash_cost, which expects 105,250,000,000,000 wei for 1000 tokens in and 500 outuv.lockuntouched🤖 Generated with Claude Code
https://claude.ai/code/session_01SQvDLyFCCRZxHeRQ9GM1T5