Skip to content

fix(metadata): qwen3.6-plus falls back to generic qwen 131K context instead of 1M #27008

@back2net

Description

@back2net

Describe the bug

qwen3.6-plus is missing from agent/model_metadata.pyDEFAULT_CONTEXT_LENGTHS. The model name does not match any specific entry, so it falls back to the generic qwen 131072 entry.

Actual context: 1,048,576 tokens (1M)
Effective context in Hermes: 131,072 tokens (128K)

Impact

  • Compression threshold auto-lowered from 524,288 to 131,072 tokens
  • Unnecessary context compression triggers in long sessions
  • Degraded reasoning quality due to premature compression
  • Misleading warnings about context mismatch

Reproduction

Configure qwen3.6-plus as the main model via Alibaba/DashScope provider. Start a session, Hermes warns that compression model context 131K is lower than the threshold derived from main model.

Root cause

agent/model_metadata.py has qwen: 131072 as a catch-all, but qwen3.6-plus does not match this key. All new Qwen API models without explicit entries silently inherit wrong context limit.

Proposed fix

Add explicit entry in DEFAULT_CONTEXT_LENGTHS before the generic qwen fallback:

qwen3.6-plus: 1048576,  # 1M context

Affected versions

v2026.5.16 current release

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/agentCore agent loop, run_agent.py, prompt builderprovider/qwenQwen / Alibaba Cloud (OAuth)type/bugSomething isn't working

    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