Skip to content

Replace retired Claude model ids in rvagent defaults and demo scripts - #997

Open
kasparovabi wants to merge 1 commit into
ruvnet:mainfrom
kasparovabi:chore/opus5-compat
Open

kasparovabi wants to merge 1 commit into
ruvnet:mainfrom
kasparovabi:chore/opus5-compat

Conversation

@kasparovabi

Copy link
Copy Markdown

rvagent defaults to anthropic:claude-sonnet-4-20250514 and the three demo scripts under crates/rvAgent/examples/ send claude-sonnet-4-20250514 or claude-3-5-haiku-20241022 straight to api.anthropic.com. Both ids are on Anthropic's retirement list (model deprecations), so a fresh rvagent run with no --model flag, and each of the demos, now get an error back from the API instead of a completion.

File Before After
rvagent-cli/src/main.rs (--model default, and the test that asserts it) anthropic:claude-sonnet-4-20250514 anthropic:claude-sonnet-5
rvagent-wasm/src/lib.rs (default_model(), its test, two doc comments) anthropic:claude-sonnet-4-20250514 anthropic:claude-sonnet-5
rvagent-backends/tests/live_anthropic_test.rs anthropic:claude-sonnet-4-20250514 anthropic:claude-sonnet-5
examples/demo_coder_agent.sh, examples/demo_security_agent.sh claude-sonnet-4-20250514 claude-sonnet-5
examples/demo_tester_agent.sh claude-3-5-haiku-20241022 claude-haiku-4-5-20251001

Nothing else changes. resolve_model already splits on the first colon, so the new id needs no code path of its own. The backend omits temperature when the config value is 0.0 (the default), which matters because the Sonnet 5 endpoint rejects non-default sampling parameters. None of the demo payloads set one.

Left alone on purpose. The mock fixtures inside rvagent-backends/src/anthropic.rs (test_config() and the serialized request/response samples) still say claude-sonnet-4-20250514. They never reach the network, they only check wire format, and I did not want to churn a hundred lines of test JSON for a string that has no effect there. Same for rvagent-cli/tests/integration_tests.rs, session.rs and app.rs, where the id is a literal passed in by the test rather than a default.

Verified locally with cargo test -p rvagent-cli --bin rvagent test_cli_parse_defaults and cargo test -p rvagent-wasm --lib test_config_defaults. I have not run the live test or the demo scripts against the API, the claim rests on the published retirement dates.

I read this diff line by line before opening it, and I am happy to adjust or drop any part of it. What brought me here was a checker I maintain that flags retired Claude model ids, so I am mentioning that up front rather than leaving you to wonder. If you would rather handle this your own way, or would rather not get this kind of contribution at all, tell me and I will not send another.

claude-sonnet-4-20250514 and claude-3-5-haiku-20241022 are on Anthropic's
retirement list. The CLI and WASM defaults move to claude-sonnet-5, the
tester demo to claude-haiku-4-5-20251001. Mock fixtures in anthropic.rs are
left as they are since they never reach the network.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant