Skip to content

The agent that grows with you

test(bedrock): record a missing metadata match as a mismatch, not a TypeError

kshitijk4poorcda237464a51
diff --git a/tests/agent/test_bedrock_adapter.py b/tests/agent/test_bedrock_adapter.py
index ef2959277f3..36ef2d072e4 100644
--- a/tests/agent/test_bedrock_adapter.py
+++ b/tests/agent/test_bedrock_adapter.py
@@ -1094,7 +1094,8 @@ class TestBedrockContextLength:
_, sep, bare = model_id.partition("anthropic.")
if not sep:
continue
- _, expected = _longest_key_match(DEFAULT_CONTEXT_LENGTHS, bare)
+ hit = _longest_key_match(DEFAULT_CONTEXT_LENGTHS, bare)
+ expected = hit[1] if hit else None
actual = get_bedrock_context_length(model_id, probe=False)
if actual != expected:
mismatched.append((model_id, expected, actual))