mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
chore(models): upgrade the opus alias to claude-opus-4-8
MODEL_MAP["opus"] moves off claude-opus-4-6 to the newest Opus tier at the same price; pricing already matched via the claude-opus-4 fragment, and a new test_opus_is_priced guard keeps the alias priced. Fixtures, panel mocks, and docs follow.
This commit is contained in:
@@ -562,7 +562,14 @@ class TestProviderAwareness:
|
||||
assert cost == _ZERO_COST
|
||||
|
||||
def test_is_anthropic_model_true_for_claude_names(self) -> None:
|
||||
for name in ("claude-opus-4-6", "claude-fable-5", "opus", "sonnet", "haiku"):
|
||||
for name in (
|
||||
"claude-opus-4-6",
|
||||
"claude-opus-4-8",
|
||||
"claude-fable-5",
|
||||
"opus",
|
||||
"sonnet",
|
||||
"haiku",
|
||||
):
|
||||
assert _is_anthropic_model(name) is True, name
|
||||
|
||||
def test_is_anthropic_model_false_for_non_claude_names(self) -> None:
|
||||
|
||||
@@ -106,7 +106,7 @@ def test_build_anthropic_entries_skips_missing_models() -> None:
|
||||
# Patch MODEL_MAP to be missing one entry → loop hits the `continue` branch.
|
||||
with patch(
|
||||
"roboco.models.llm_catalog.MODEL_MAP",
|
||||
{"opus": "claude-opus-4-6"}, # sonnet+haiku missing
|
||||
{"opus": "claude-opus-4-8"}, # sonnet+haiku missing
|
||||
):
|
||||
entries = _build_anthropic_entries()
|
||||
# Only one entry survives — opus.
|
||||
|
||||
@@ -12,9 +12,10 @@ def test_sonnet_alias_resolves_to_sonnet_5() -> None:
|
||||
assert MODEL_MAP["sonnet"] == "claude-sonnet-5"
|
||||
|
||||
|
||||
def test_opus_alias_unchanged() -> None:
|
||||
# CEO preference: stay on Opus 4.6 (4.7/4.8 not preferred).
|
||||
assert MODEL_MAP["opus"] == "claude-opus-4-6"
|
||||
def test_opus_alias_resolves_to_opus_4_8() -> None:
|
||||
# CEO upgrade to the newest Opus tier ("Opus 5" does not exist — the
|
||||
# Claude 5 family is Fable/Mythos/Sonnet; Opus tops out at 4.8).
|
||||
assert MODEL_MAP["opus"] == "claude-opus-4-8"
|
||||
|
||||
|
||||
def test_sonnet_5_is_priced() -> None:
|
||||
@@ -23,6 +24,12 @@ def test_sonnet_5_is_priced() -> None:
|
||||
assert cost > 0.0
|
||||
|
||||
|
||||
def test_opus_is_priced() -> None:
|
||||
# Same silent-$0 guard for the opus alias.
|
||||
cost = calculate_cost(MODEL_MAP["opus"], tokens_input=_M, tokens_output=0)
|
||||
assert cost > 0.0
|
||||
|
||||
|
||||
def test_no_lifecycle_role_routes_below_the_structured_verb_floor() -> None:
|
||||
# Retired haiku from lifecycle roles (2026-07-24): a haiku QA/documenter
|
||||
# can't emit the structured review envelopes (criteria_verified, findings)
|
||||
|
||||
@@ -56,7 +56,7 @@ def _spec(**overrides: Any) -> _IntakeRunSpec:
|
||||
},
|
||||
"session_id": "sess-abc",
|
||||
"cwd": "/data/workspaces/roboco/board/intake-1",
|
||||
"cli_model": "claude-opus-4-6",
|
||||
"cli_model": "claude-opus-4-8",
|
||||
"api_url": "http://roboco-orchestrator:8000",
|
||||
"provider_base_url": None,
|
||||
"provider_auth_token": None,
|
||||
@@ -108,7 +108,7 @@ class TestBuildIntakeRunCmd:
|
||||
assert "ROBOCO_WORKSPACE=/data/workspaces/roboco/board/intake-1" in cmd
|
||||
assert "ROBOCO_API_URL=http://roboco-orchestrator:8000" in cmd
|
||||
assert "ROBOCO_AGENT_ID=intake-1" in cmd
|
||||
assert "CLAUDE_CODE_SUBAGENT_MODEL=claude-opus-4-6" in cmd
|
||||
assert "CLAUDE_CODE_SUBAGENT_MODEL=claude-opus-4-8" in cmd
|
||||
|
||||
def test_mounts_prompt_and_workspaces(self) -> None:
|
||||
cmd = AgentOrchestrator._build_intake_run_cmd(_spec())
|
||||
|
||||
@@ -99,7 +99,7 @@ class TestBuildManifestForAgent:
|
||||
mock_settings.manifest_host_dir = str(tmp_path)
|
||||
mock_settings.workspaces_root = str(tmp_path / "workspaces")
|
||||
|
||||
result = _build_manifest_for_agent("be-dev-1", "claude-opus-4-6")
|
||||
result = _build_manifest_for_agent("be-dev-1", "claude-opus-4-8")
|
||||
|
||||
assert result is not None
|
||||
data = json.loads(result.read_text())
|
||||
|
||||
@@ -87,7 +87,7 @@ class TestBuildForRole:
|
||||
role=role,
|
||||
team="board",
|
||||
workspace_path=Path("/tmp/x"),
|
||||
agent_model="claude-opus-4-6",
|
||||
agent_model="claude-opus-4-8",
|
||||
)
|
||||
)
|
||||
assert "read_messages" in m.do_tools
|
||||
|
||||
@@ -182,7 +182,7 @@ async def test_log_agent_event_resolves_slug_to_uuid(
|
||||
event_type="agent.spawned",
|
||||
agent_slug=slug,
|
||||
task_id=task_id,
|
||||
details={"container_id": "abc123def456", "model": "claude-opus-4-6"},
|
||||
details={"container_id": "abc123def456", "model": "claude-opus-4-8"},
|
||||
)
|
||||
|
||||
# Read back the row.
|
||||
|
||||
@@ -945,7 +945,7 @@ class TestGetRecentSessions:
|
||||
row = MagicMock()
|
||||
row.id = sid
|
||||
row.agent_slug = "product-owner"
|
||||
row.model = "claude-opus-4-6"
|
||||
row.model = "claude-opus-4-8"
|
||||
row.started_at = datetime.datetime(2026, 6, 11, 20, 41, tzinfo=datetime.UTC)
|
||||
row.ended_at = datetime.datetime(2026, 6, 11, 20, 42, tzinfo=datetime.UTC)
|
||||
row.tokens_input = exp_in
|
||||
@@ -966,7 +966,7 @@ class TestGetRecentSessions:
|
||||
s = out[0]
|
||||
assert s["id"] == str(sid)
|
||||
assert s["agent_slug"] == "product-owner"
|
||||
assert s["model"] == "claude-opus-4-6"
|
||||
assert s["model"] == "claude-opus-4-8"
|
||||
assert s["tokens_input"] == exp_in
|
||||
assert s["tokens_output"] == exp_out
|
||||
assert s["tokens_cache"] == exp_cr + exp_cw
|
||||
|
||||
Reference in New Issue
Block a user