Skip to content

Claude Opus 4.6/4.7 and Sonnet 4.6 context window understated 5x (200K vs 1M) in MODEL_METADATA; Sonnet 4.6 output cap halved #13582

Description

@sushantlokhande14

What happened?

MODEL_METADATA in autogpt_platform/backend/backend/blocks/llm.py understates the context window for three current Anthropic models by 5x, and halves one output cap:

Enum Current metadata Actual (Anthropic docs)
CLAUDE_4_6_OPUS (claude-opus-4-6) context 200000 context 1,000,000
CLAUDE_4_7_OPUS (claude-opus-4-7) context 200000 context 1,000,000
CLAUDE_4_6_SONNET (claude-sonnet-4-6) context 200000, max output 64000 context 1,000,000, max output 128,000

Sources:

  • The comment above the table itself cites https://docs.anthropic.com/en/docs/about-claude/models — which lists Opus 4.6/4.7 and Sonnet 4.6 at a 1M context window and 128K max output.
  • The repo's own vendored backend/copilot/anthropic_rates.json (snapshot of litellm's catalog) carries max_input_tokens: 1000000 / max_output_tokens: 128000 for these same models — llm.py contradicts its sibling data file.
  • Not a deliberate platform cap: the same table records GPT-4.1 at 1047576 and Grok 4 Fast at 2000000.

Impact

These values are load-bearing in llm.py:

  • context_window drives prompt-window budgeting and compression (target_tokens=llm_model.context_window // 2), so conversations on these models get compressed/trimmed at 1/5th of real capacity.
  • available_tokens = max(context_window - estimated_input_tokens, 0) strangles the output budget the same way.
  • input_data.max_tokens = llm_model.max_output_tokens caps Sonnet 4.6 completions at half their real ceiling.

Steps to reproduce

Select claude-opus-4-6 / claude-opus-4-7 / claude-sonnet-4-6 in an AI block with a long prompt (>200K tokens): the platform compresses/trims it even though the model would accept it as-is.

PR with the three-line metadata fix incoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions