mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
chore(models): finish the opus-5 replacement — no stale opus-4 fixtures remain
Every fixture, comment example, and panel mock that presented an Opus 4.x id as current now carries claude-opus-5 (or the current sonnet/haiku ids in the panel usage mocks). The only deliberate claude-opus-4 survivors are the pricing-table fragment and its tests — they price the historical usage rows, which would otherwise re-read as $0.
This commit is contained in:
@@ -113,9 +113,9 @@ function mockTeamUsage(period: UsagePeriod = "24h"): TeamUsageRow[] {
|
||||
function mockModelUsage(period: UsagePeriod = "24h"): ModelUsageSlice[] {
|
||||
const scale = scaleFor(period);
|
||||
const models = [
|
||||
{ model: "claude-opus-4", share: 0.548 },
|
||||
{ model: "claude-sonnet-4", share: 0.346 },
|
||||
{ model: "claude-haiku-4", share: 0.106 },
|
||||
{ model: "claude-opus-5", share: 0.548 },
|
||||
{ model: "claude-sonnet-5", share: 0.346 },
|
||||
{ model: "claude-haiku-4-5", share: 0.106 },
|
||||
];
|
||||
const base = 124_800 * scale;
|
||||
return models.map((m) => {
|
||||
@@ -227,7 +227,7 @@ function mockSpawnWaste(period: UsagePeriod = "24h"): SpawnWasteResponse {
|
||||
}
|
||||
|
||||
function mockSessions(): UsageSession[] {
|
||||
const models = ["claude-opus-4", "claude-sonnet-4", "claude-haiku-4"];
|
||||
const models = ["claude-opus-5", "claude-sonnet-5", "claude-haiku-4-5"];
|
||||
const agentSlugs = ["be-dev-1", "be-dev-2", "fe-dev-1", "fe-qa", "main-pm"];
|
||||
return Array.from({ length: 35 }, (_, i) => {
|
||||
const agent_slug = agentSlugs[i % agentSlugs.length];
|
||||
|
||||
@@ -62,10 +62,9 @@ _ANTHROPIC_FRAGMENTS = ("claude", "opus", "sonnet", "haiku")
|
||||
# ---------------------------------------------------------------------------
|
||||
_PRICING: list[tuple[str, float, float, float, float]] = [
|
||||
# (fragment, input/1M, output/1M, cache_read/1M, cache_write/1M)
|
||||
# Opus 5 — same sticker as the Opus 4 family; needs its own fragment
|
||||
# because "claude-opus-4" doesn't substring-match it.
|
||||
# Opus 5
|
||||
("claude-opus-5", 5.00, 25.00, 0.50, 6.25),
|
||||
# Opus 4 family
|
||||
# Opus 4 family — prices the historical usage rows only
|
||||
("claude-opus-4", 5.00, 25.00, 0.50, 6.25),
|
||||
# Sonnet 4 / 3.7 / 3.5 family
|
||||
("claude-sonnet-4", 3.00, 15.00, 0.30, 0.75),
|
||||
|
||||
+1
-1
@@ -1798,7 +1798,7 @@ class ModelAssignmentTable(Base):
|
||||
ForeignKey("provider_configs.id", ondelete="RESTRICT"),
|
||||
nullable=False,
|
||||
)
|
||||
# Raw Claude Code `--model` identifier (`claude-opus-4-7`,
|
||||
# Raw Claude Code `--model` identifier (`claude-opus-5`,
|
||||
# `kimi-k2.6:cloud`, etc.). The orchestrator's CLI-translation only
|
||||
# fires for anthropic providers; non-anthropic values pass through.
|
||||
model_name: Mapped[str] = mapped_column(String(100), nullable=False)
|
||||
|
||||
@@ -940,7 +940,7 @@ async def test_review_code(optimal_client: AsyncClient) -> None:
|
||||
async def test_estimate_tokens(optimal_client: AsyncClient) -> None:
|
||||
response = await optimal_client.post(
|
||||
"/api/optimal/tokens/estimate",
|
||||
json={"content": "Hello world", "model": "claude-opus-4-7"},
|
||||
json={"content": "Hello world", "model": "claude-opus-5"},
|
||||
headers=_HDR,
|
||||
)
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
|
||||
@@ -562,15 +562,7 @@ 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-opus-4-8",
|
||||
"claude-opus-5",
|
||||
"claude-fable-5",
|
||||
"opus",
|
||||
"sonnet",
|
||||
"haiku",
|
||||
):
|
||||
for name in ("claude-opus-5", "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:
|
||||
@@ -629,7 +621,7 @@ class TestCostResult:
|
||||
assert result.is_anthropic is False
|
||||
|
||||
def test_calculate_cost_matches_structured_cost_usd(self) -> None:
|
||||
model = "claude-opus-4-6"
|
||||
model = "claude-opus-5"
|
||||
assert (
|
||||
calculate_cost(model, tokens_input=_M, tokens_output=_M)
|
||||
== calculate_cost_result(model, tokens_input=_M, tokens_output=_M).cost_usd
|
||||
|
||||
@@ -104,7 +104,7 @@ class TestWriteManifest:
|
||||
role="developer",
|
||||
team="backend",
|
||||
workspace_path=tmp_path,
|
||||
agent_model="claude-opus-4-7",
|
||||
agent_model="claude-opus-5",
|
||||
)
|
||||
)
|
||||
manifest_path = tmp_path / "tool-manifest.json"
|
||||
|
||||
@@ -629,7 +629,7 @@ class TestGetByModel:
|
||||
cost_usd=0.02,
|
||||
),
|
||||
_make_row(
|
||||
model="claude-opus-4-5",
|
||||
model="claude-opus-5",
|
||||
tokens_input=100,
|
||||
tokens_output=100,
|
||||
tokens_cache_read=0,
|
||||
|
||||
Reference in New Issue
Block a user