Skip to content

fix(openclaw): default to claude-sonnet-4-6 instead of retired claude-sonnet-4-5 - #420

Open
pcbeingused33 wants to merge 2 commits into
simular-ai:mainfrom
pcbeingused33:fix/openclaw-retired-sonnet-4-5
Open

pcbeingused33 wants to merge 2 commits into
simular-ai:mainfrom
pcbeingused33:fix/openclaw-retired-sonnet-4-5

Conversation

@pcbeingused33

Copy link
Copy Markdown

integrations/openclaw/agent_s_wrapper.py hardcodes --model claude-sonnet-4-5. Anthropic retired claude-sonnet-4-5 on 2026-11-30 (https://platform.claude.com/docs/en/about-claude/model-deprecations), so every task started through the OpenClaw wrapper now fails at the first API call with a not_found error.

Changes:

  • The wrapper defaults to claude-sonnet-4-6 and reads AGENT_S_MODEL to override it, following the existing AGENT_S_GROUND_MODEL pattern.
  • The OpenClaw README and SKILL.md name the new default and document AGENT_S_MODEL.
  • Added tests/test_openclaw_wrapper.py. It mocks shutil.which and subprocess.run and checks the --model value passed to agent_s: the default, and the value set through AGENT_S_MODEL. Both tests fail on main and pass with this change (python -m unittest tests.test_openclaw_wrapper).

Why claude-sonnet-4-6 and not the listed replacement claude-sonnet-5-5: Sonnet 5.5 thinks by default and rejects a non-default temperature. The s3 Anthropic engine currently returns content[0].text (the thinking block on 5.5) and always sends temperature (e.g. 0.0 from the grounding text-span call), so a 5.5 default would just trade the not_found error for another failure. Sonnet 4.6 is active (retirement not before February 2027), does not think unless asked and accepts temperature, so it matches the request the engine sends today. Once #205 lands (it reads text blocks by type and omits temperature for sonnet-5*), the default can move to claude-sonnet-5-5; in the meantime AGENT_S_MODEL=claude-sonnet-5-5 is available for anyone running with #205.

This PR was prepared with the help of an AI coding assistant.

claude-sonnet-4-5 was retired on 2026-11-30, so every wrapper run now fails
with not_found. Default to claude-sonnet-5-5 and allow overriding it via
AGENT_S_MODEL, like the existing AGENT_S_GROUND_MODEL.
…-sonnet-4-5

claude-sonnet-4-5 was retired, so every wrapper run fails with
not_found. claude-sonnet-4-6 is active and works with the current
Anthropic engine (no default thinking, accepts temperature).

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