fix(bedrock): add Claude Sonnet/Opus/Haiku 5 to Bedrock context-length table
au.anthropic.claude-sonnet-5 (and opus-5/haiku-5) had no entry in
BEDROCK_CONTEXT_LENGTHS, so get_bedrock_context_length() silently fell
back to BEDROCK_DEFAULT_CONTEXT_LENGTH (128_000) instead of the actual
200_000 token window AWS documents for this model family on Bedrock.
Impact: ContextCompressor's small-context floor treats any resolved
window under 512K as 'small' and raises the compaction threshold to
75% of window. With the wrong 128K window that floor fires at 96,000
tokens instead of 150,000 tokens at the correct 200K window -- roughly
36% less usable headroom before Hermes force-compacts the conversation,
causing more frequent/premature compaction on long agentic sessions.
Verified locally:
get_bedrock_context_length('au.anthropic.claude-sonnet-5') -> 200000
(was 128000 before this change)
This commit is contained in:
parent
4281151ae8
commit
d86500efea
|
|
@ -1297,6 +1297,9 @@ def classify_bedrock_error(error_message: str) -> str:
|
|||
|
||||
BEDROCK_CONTEXT_LENGTHS: Dict[str, int] = {
|
||||
# Anthropic Claude models on Bedrock
|
||||
"anthropic.claude-opus-5": 200_000,
|
||||
"anthropic.claude-sonnet-5": 200_000,
|
||||
"anthropic.claude-haiku-5": 200_000,
|
||||
"anthropic.claude-opus-4-6": 200_000,
|
||||
"anthropic.claude-sonnet-4-6": 200_000,
|
||||
"anthropic.claude-sonnet-4-5": 200_000,
|
||||
|
|
|
|||
Loading…
Reference in New Issue