Skip to content

Fix Claude Sonnet 5 & Opus 4.8 compatibility#205

Open
Darrow8 wants to merge 1 commit into
simular-ai:mainfrom
Darrow8:fix/claude-anthropic-api
Open

Fix Claude Sonnet 5 & Opus 4.8 compatibility#205
Darrow8 wants to merge 1 commit into
simular-ai:mainfrom
Darrow8:fix/claude-anthropic-api

Conversation

@Darrow8

@Darrow8 Darrow8 commented Jul 6, 2026

Copy link
Copy Markdown

Summary

  • Omit temperature for Anthropic models that reject it (Sonnet 5, Opus 4.7/4.8).
  • Handle Sonnet 5 and Opus 4.8 adaptive thinking responses by extracting text blocks instead of assuming content[0].text.
  • Only pass model_temperature from the CLI when explicitly set.
  • Add regression tests in tests/test_providers.py.

Test plan

  • Run Agent S with claude-sonnet-5, claude-opus-4-8 and confirm agent is running properly.
  • Verify reflection and action generation succeed on a simple task.
  • Confirm older models like claude-sonnet-4-20250514 still work.
  • Run python -m unittest tests.test_providers -v

…nd Opus 4.8, by handling adaptive thinking and updating api parameters. Confirmed backwards compatability with Sonnet 4
@Darrow8 Darrow8 changed the title Fix Claude Sonnet 5 Anthropic API compatibility Fix Claude Sonnet 5 & Opus 4.8 compatibility Jul 6, 2026

@011235813 011235813 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants