Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/assistant/model_tiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@
_DEFAULTS = {
"bedrock": {
"frontier": "us.anthropic.claude-opus-4-8",
"balanced": "us.anthropic.claude-sonnet-4-6",
"balanced": "us.anthropic.claude-sonnet-5-5",
"cheap": "us.anthropic.claude-haiku-4-5",
},
"anthropic": {
"frontier": "claude-opus-4-8",
"balanced": "claude-sonnet-4-6",
"balanced": "claude-sonnet-5-5",
"cheap": "claude-haiku-4-5",
},
"vertex": {
"frontier": "claude-opus-4-8",
"balanced": "claude-sonnet-4-6",
"balanced": "claude-sonnet-5-5",
"cheap": "claude-haiku-4-5",
},
}
Expand Down
6 changes: 3 additions & 3 deletions tests/test_comms_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_warm_launch_declares_bedrock_backend_and_keeps_1m_context(monkeypatch):
monkeypatch.setenv("CLAUDE_CODE_USE_BEDROCK", "1")
cmd = cs._warm_launch(ag.CLAUDE)
assert cmd.startswith("CLAUDE_CODE_USE_BEDROCK=1 ")
assert "us.anthropic.claude-sonnet-4-6[1m]" in cmd
assert "us.anthropic.claude-sonnet-5-5[1m]" in cmd


def test_warm_launch_declares_non_bedrock_backend_and_still_gets_1m_context(monkeypatch):
Expand Down Expand Up @@ -120,13 +120,13 @@ def test_resolve_warm_model_and_backend_respects_env(monkeypatch):
monkeypatch.setenv("CLAUDE_CODE_USE_BEDROCK", "1")
model, backend, pinned = cs._resolve_warm_model_and_backend()
assert backend == "bedrock"
assert model == "us.anthropic.claude-sonnet-4-6[1m]"
assert model == "us.anthropic.claude-sonnet-5-5[1m]"
assert pinned is False

monkeypatch.setenv("CLAUDE_CODE_USE_BEDROCK", "0")
model, backend, pinned = cs._resolve_warm_model_and_backend()
assert backend == "anthropic"
assert model == "claude-sonnet-4-6[1m]"
assert model == "claude-sonnet-5-5[1m]"
assert pinned is False

monkeypatch.setenv("COMMS_MODEL", "my-pinned-id")
Expand Down
6 changes: 3 additions & 3 deletions tests/test_model_tiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_bedrock_ids(self):
os.environ["CLAUDE_CODE_USE_BEDROCK"] = "1"
# frontier is a CURRENT Opus (not the deprecated 4-1 the review flagged)
self.assertEqual(mt.model_for("frontier"), "us.anthropic.claude-opus-4-8")
self.assertEqual(mt.model_for("balanced"), "us.anthropic.claude-sonnet-4-6")
self.assertEqual(mt.model_for("balanced"), "us.anthropic.claude-sonnet-5-5")
self.assertEqual(mt.model_for("cheap"), "us.anthropic.claude-haiku-4-5")

def test_anthropic_ids_are_bare(self):
Expand All @@ -113,15 +113,15 @@ def test_provider_hint_pins_id_format_independent_of_detection(self):
def test_long_context_suffix_is_opt_in_on_bedrock_and_anthropic(self):
os.environ["CLAUDE_CODE_USE_BEDROCK"] = "1"
self.assertEqual(mt.model_for("balanced", long_context=True),
"us.anthropic.claude-sonnet-4-6[1m]")
"us.anthropic.claude-sonnet-5-5[1m]")
# not requested → no suffix (the mem0 path stays clean)
self.assertNotIn("[1m]", mt.model_for("cheap"))
# direct Anthropic ALSO gets it when requested — verified live: the
# operator's non-Bedrock ~/.zprofile alias runs `[1m]` on a bare id
# (2026-09-05 — an earlier version wrongly called this Bedrock-only).
os.environ["MODEL_PROVIDER"] = "anthropic"
self.assertEqual(mt.model_for("balanced", long_context=True),
"claude-sonnet-4-6[1m]")
"claude-sonnet-5-5[1m]")

def test_per_tier_override_is_verbatim(self):
os.environ["CLAUDE_CODE_USE_BEDROCK"] = "1"
Expand Down
Loading