Skip to content

(refactor): replace legacy Anthropic constants #1616

Merged
gold-silver-copper merged 2 commits into0xPlaygrounds:mainfrom
gold-silver-copper:update-consts
Apr 11, 2026
Merged

(refactor): replace legacy Anthropic constants #1616
gold-silver-copper merged 2 commits into0xPlaygrounds:mainfrom
gold-silver-copper:update-consts

Conversation

@gold-silver-copper
Copy link
Copy Markdown
Contributor

Summary

This PR updates rig-core's direct Anthropic provider to the current Claude model families and removes the old public Anthropic constants.

It also fixes a shared streaming test helper bug that surfaced once Anthropic started emitting short pre-tool assistant text before the final tool-backed answer.

What changed

  • Removed the old Anthropic model constants from rig-core
  • Added only the current family constants:
    • CLAUDE_OPUS_4_6
    • CLAUDE_SONNET_4_6
    • CLAUDE_HAIKU_4_5
  • Updated rig-core examples, tests, and docs to use the new constants
  • Refreshed Anthropic default max token resolution for the current 4.x families
  • Switched Anthropic reasoning tests from thinking.enabled + budget_tokens to thinking.type = "adaptive"
  • Fixed the shared reasoning streaming helper to compare FinalResponse.response() with the final assistant turn only, excluding pre-tool assistant chatter

Breaking changes

This PR intentionally removes the previous Anthropic constants with no alias or deprecation layer.

Removed public API items:

  • anthropic::completion::CLAUDE_4_OPUS
  • anthropic::completion::CLAUDE_4_SONNET
  • anthropic::completion::CLAUDE_3_5_HAIKU

Replacement migration path:

  • CLAUDE_4_OPUS -> CLAUDE_OPUS_4_6
  • CLAUDE_4_SONNET -> CLAUDE_SONNET_4_6
  • CLAUDE_3_5_HAIKU -> CLAUDE_HAIKU_4_5

@gold-silver-copper gold-silver-copper changed the title refactor: replace legacy Anthropic constants with Claude 4.6/4.5 (refactor): replace legacy Anthropic constants Apr 11, 2026
@gold-silver-copper gold-silver-copper added this pull request to the merge queue Apr 11, 2026
Merged via the queue into 0xPlaygrounds:main with commit d285b6c Apr 11, 2026
6 checks passed
@github-actions github-actions bot mentioned this pull request Apr 11, 2026
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