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.
What happened?
MODEL_METADATAinautogpt_platform/backend/backend/blocks/llm.pyunderstates the context window for three current Anthropic models by 5x, and halves one output cap:CLAUDE_4_6_OPUS(claude-opus-4-6)CLAUDE_4_7_OPUS(claude-opus-4-7)CLAUDE_4_6_SONNET(claude-sonnet-4-6)Sources:
backend/copilot/anthropic_rates.json(snapshot of litellm's catalog) carriesmax_input_tokens: 1000000/max_output_tokens: 128000for these same models —llm.pycontradicts its sibling data file.Impact
These values are load-bearing in
llm.py:context_windowdrives 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_tokenscaps Sonnet 4.6 completions at half their real ceiling.Steps to reproduce
Select
claude-opus-4-6/claude-opus-4-7/claude-sonnet-4-6in 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.