Skip to content

fix(metadata): update hy3-preview context length to 262144 - #22270

Closed
alblez wants to merge 1 commit into
NousResearch:mainfrom
alblez:fix/test-tencent-hy3-context-length
Closed

fix(metadata): update hy3-preview context length to 262144#22270
alblez wants to merge 1 commit into
NousResearch:mainfrom
alblez:fix/test-tencent-hy3-context-length

Conversation

@alblez

@alblez alblez commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the failing test TestTencentTokenhubContextLength::test_hy3_preview_context_length by updating the stale context length value for hy3-preview.

Fixes #22268

Changes

agent/model_metadata.py

  • Update DEFAULT_CONTEXT_LENGTHS["hy3-preview"] from 256000 → 262144
  • Update comment to reflect the token count

tests/hermes_cli/test_tencent_tokenhub_provider.py

  • Update assertion: assert ctx == 262144

Why

OpenRouter's live API now reports hy3-preview with context_length: 262144 (the model provider updated it after the initial 256000 launch value). Since get_model_context_length("hy3-preview") hits the OpenRouter metadata cache (step 6 in resolution) before the static fallback table (step 8), the function already returns 262144 in practice — the static table and test assertion were just stale.

How to Test

pytest tests/hermes_cli/test_tencent_tokenhub_provider.py::TestTencentTokenhubContextLength::test_hy3_preview_context_length -v

Platforms Tested

  • macOS (local, pytest)

OpenRouter's live API now reports hy3-preview with context_length=262144
(up from the original 256000). Update both the static fallback table in
DEFAULT_CONTEXT_LENGTHS and the corresponding test assertion.

The test was failing because get_model_context_length() hits the
OpenRouter metadata cache (step 6 in resolution order) which returns
262144, taking priority over the stale hardcoded 256000 in step 8.
@alt-glitch alt-glitch added type/test Test coverage or test infrastructure comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have labels May 9, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Automated hermes-sweeper review: this fix is already present on current main.

Evidence:

  • agent/model_metadata.py:232 documents the OpenRouter 262144 value for hy3-preview, and agent/model_metadata.py:235 sets the static fallback to 262144.
  • tests/hermes_cli/test_tencent_tokenhub_provider.py:305 now covers the same context-length registration path without pinning the brittle exact value, matching the repo's AGENTS.md guidance against change-detector tests.
  • The implementation is in 1c9ffb177c378bba24ef208ba8f551722961c655 (fix(model-metadata): align hy3-preview static fallback + delete change-detector test (#22805)).

Thanks for catching the stale metadata; main now has the fix.

@teknium1 teknium1 closed this Jun 11, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(metadata): hy3-preview context length test fails (256000 vs 262144)

3 participants