Skip to content

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

@alblez

Description

@alblez

Bug

TestTencentTokenhubContextLength::test_hy3_preview_context_length fails on main:

FAILED tests/hermes_cli/test_tencent_tokenhub_provider.py::TestTencentTokenhubContextLength::test_hy3_preview_context_length
  assert 262144 == 256000

Root Cause

OpenRouter's live API now reports hy3-preview with context_length: 262144 (up from the original 256000 when the model first launched on 2026-04-20).

get_model_context_length("hy3-preview") hits the OpenRouter metadata cache at step 6 in the resolution chain (before reaching the stale static fallback at step 8), so it returns 262144. The test assertion and the DEFAULT_CONTEXT_LENGTHS static table both have the old value.

Fix

Update both:

  • agent/model_metadata.py: "hy3-preview": 262144
  • tests/hermes_cli/test_tencent_tokenhub_provider.py: assert ctx == 262144

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/agentCore agent loop, run_agent.py, prompt buildertype/testTest coverage or test infrastructure

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions