Repository navigation
feat(anthropic): support Claude Haiku 5.5 - #166706
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: needs maintainer review before merge. Reviewed October 7, 2026, 4:23 PM ET / 20:23 UTC (Revision 4). ClawSweeper reviewWhat this changesAdds Haiku 5.5 catalog, pricing, thinking, and transcript-replay support for Anthropic API and Claude CLI access, and advances the Haiku alias and utility-model default. Merge readiness✅ Ready for maintainer review The prior signed-replay blocker is resolved, and no remaining actionable patch defect was found. Current main still lacks the requested Haiku support, so this PR remains useful; exact-head CI is pending. Priority: P2 Review scores
Verification
How this fits togetherThe Anthropic plugin resolves model selections and capabilities, while shared Claude contracts shape requests and replay conversation history. These feed the direct API transport, managed transport, and Claude CLI backend. flowchart TD
A[Configured model selection] --> B[Anthropic catalog and aliases]
B --> C[Shared Claude model contracts]
D[Conversation history] --> E[Agent replay policy and sanitizer]
C --> E
C --> F[API transports or Claude CLI]
E --> F
F --> G[Model response and usage cost]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +110, Tests +180, Docs +20. Total +310 across 25 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep Haiku support in the existing catalog and shared Claude contract owners, with explicit older selections preserved and signed replay retained through the agent boundary. Do we have a high-confidence way to reproduce the issue? Not applicable to the model-support request. The previously reported replay defect has a source-backed regression and recorded failing-before/passing-after evidence, and is repaired at the reviewed head. Is this the best way to solve the issue? Yes. The patch extends the existing catalog, pricing normalizer, model contracts, and replay policy instead of introducing competing owners, and preserves explicit older-model selections. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c18456cce92e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
@clawsweeper re-review The shared agent replay-policy defect is repaired at |
|
🦞👀 Re-review progress:
|
(cherry picked from commit b1697e2)
* feat(anthropic): support Claude Haiku 5.5 * fix(anthropic): use typed open-ended pricing ranges * test(anthropic): keep model contract fixtures in their support owner * fix(anthropic): consume typed manifest pricing * fix(anthropic): align startup Haiku aliases with the catalog * fix(anthropic): preserve prefix-bound Haiku thinking replay (cherry picked from commit b1697e2)
* feat(anthropic): support Claude Haiku 5.5 * fix(anthropic): use typed open-ended pricing ranges * test(anthropic): keep model contract fixtures in their support owner * fix(anthropic): consume typed manifest pricing * fix(anthropic): align startup Haiku aliases with the catalog * fix(anthropic): preserve prefix-bound Haiku thinking replay
What Problem This Solves
Claude Haiku 5.5 is released, but OpenClaw still advertises Haiku 4.5 and treats the new model as an unknown future generation.
User Impact
Users can select Haiku 5.5 through the Anthropic API or Claude CLI with its 1M context, 128K output, adaptive thinking, and correct tiered API pricing. The
haikualias and default utility model advance to 5.5; explicit 4.5 selections remain available. No Gateway/config mutation or release publication is included.Why This Change Was Made
Encode the published Haiku contract at the existing catalog and shared Claude runtime owners. Default effort is medium; thinking can be disabled, forced tools remain supported, and unsupported sampling/priority/fast/fallback options are omitted. Preserve signed same-model thinking and drop unverified cross-model replay. Fix pricing equality so a discovered flat-rate row cannot suppress the published long-prompt tier.
Provider sources: overview, migration guide, effort.
Evidence
pnpm test <file> --maxWorkers=1; wall times: transport parity 3.55s, Claude contracts 1.99s, provider catalog 17.10s, CLI migration 12.89s, forward compatibility 8.99s, manifest 2.05s, shared pricing 1.91s. Prior-head CI used 8,591 elapsed job-seconds across 51 executed jobs (49 success, 2 failures); 23 jobs skipped. This includes setup, cleanup, and unrelated shards, not wall time or marginal Haiku-test cost.git diff --checkpassed.node scripts/check-changed.mjspassed: core/plugin/test typechecks, SDK boundaries, formatting, dead-export scans, core/plugin lint, and repository guards. Final startup-only alias delta also passed formatting, line-cap, assertion safety, and focused normalization proof. Prior-head CI passed compact Node shards, production/test types, and lint, butchecks-node-changedfailed when the Doctor legacy-state yes-mode E2E test timed out after 30 seconds; the aggregate gate consequently failed. The test, harness, and maintenance owner are unchanged by this PR. Bounded unchanged-head local replay (node scripts/run-vitest.mjs src/commands/doctor.runs-legacy-state-migrations-yes-mode-without.e2e.test.ts --maxWorkers=1) passed all 5 tests on macOS. The timed-out case took 24.616s against its unchanged 30s limit; suite runtime was 55.41s, and the wrapper took 641.39s including cold compiled-runtime preparation. This does not prove a fix or Linux parity, and the CI timeout is not established as inherited. No timeout, assertion, fixture, or source changes were made, and CI was not rerun just to obtain green. Prior-head ClawSweeper review later identified older signed Haiku thinking being stripped at the agent replay-policy boundary; the follow-up repair and proof are recorded below. The PR remains non-draft. The repaired head is conflict-free and non-draft. Exact-head ClawSweeper re-review is complete: Platinum Hermit (4/6), sufficient live proof, and no remaining code or security findings. Exact-head CI is now green, with 51 successful jobs and 23 skipped. The single unexecuted self-hosted type job was retried after GitHub confirmed runner acquisition failure; no source change or rebase was made.Live Proof
--model claude-haiku-5-5 --effort medium, isolated temporary cwd, disabled tools/skills/MCP, and no persisted session. Exit 0; explicit model usageclaude-haiku-5-5returnedOK. Existing CLI login used internally; no credentials exposed.Follow-up: Signed Agent Replay
bindsClaudeThinkingPrefixin the existing preservation decision. All prefix-bound models now retain signed thinking; legacy models, invalid signatures, and compaction-stale signatures retain their prior handling. Production delta: +1 line. No new config, SDK contract, or Gateway mutation.sanitizeSessionHistorywith two signed Haiku assistant turns and an appended context update failed before the fix (older signature stripped) and passes after. Focused sanitizer, transcript-policy, and replay-helper suites: 62 tests passed. Command:pnpm test src/agents/embedded-agent-runner/sanitize-session-history.tool-result-details.test.ts src/plugins/provider-replay-helpers.test.ts src/agents/transcript-policy.test.ts --maxWorkers=1; wrapper wall 57.95s. Individual reported suite durations: sanitizer 17.27s, transcript policy 33.43s, replay helper 1.17s, chiefly import/transform time. Baseline single-filepnpm test src/agents/embedded-agent-runner/sanitize-session-history.tool-result-details.test.ts --maxWorkers=1failed in 24.13s. Final observed new-head CI used 8,869 elapsed job-seconds across 51 successful jobs; 23 jobs skipped. This is the final composite job view, not marginal test cost or cumulative billed compute across attempts.node scripts/check-changed.mjs -- src/plugins/provider-replay-helpers.ts src/agents/embedded-agent-runner/sanitize-session-history.tool-result-details.test.ts(formatting, core types, all 27 test-type graphs, core lint, dead exports, SDK/runtime/repository guards).git diff --checkalso passed. The reviewed repair is commitbc241c93f4319caaaf7199ffe1a74402b3f64484; ClawSweeper reviewed this exact head at 20:23 UTC with Platinum Hermit (4/6) and no actionable findings; review run completed successfully. Exact-head CI passed on attempt 2. Attempt 1 had 49 successful jobs, 23 skipped, one unexecuted cancelled type job, and the consequently failed aggregate gate. GitHub annotated the cancellation: "The job was not acquired by Runner of type self-hosted even after multiple attempts"; runner_id was 0 and steps were empty. Only that unexecuted job was requested for retry on the unchanged head; the native workflow reran the dependent aggregate gate and used its built-in hosted fallback. Final result: 51 success, 23 skipped, no failure. Both the Actions gate and publishedopenclaw/ci-gatestatus passed.c95714510525: Anthropic models API returned 200 forclaude-haiku-5-5. Direct and managed transports accepted forcedlookupwith default medium adaptive thinking and with thinking disabled; unsupported temperature was omitted on both routes.sanitizeSessionHistorypreserved the full prefix. All three responses stopped normally; both earlier signed assistant turns remained on the wire. Isolated in-memory session state and stable system prompt; only synthetic task prompts. This is agent sanitizer + API boundary proof, not a running-Gateway UI test.normalizeMessagesForLlmBoundary, resolve the transcript policy, sanitize session history, convert the harness transcript, and send the unchanged two-signed-turn prefix to the API. Observed wire roles:user, assistant, user, assistant, user, system; response stopped normally with signed thinking. Early tool probes incorrectly placed the carrier before its owning user or used the hook-only normalizer (which omits the pending user), causing API 400s; these were probe assembly errors, not additional product defects. The corrected production-boundary probe passed without further source changes. Credential values and signatures are not logged, persisted, committed, or included here. The 1Password key is only injected into the validation subprocess environment, and no Gateway configuration is changed.Final State
The repaired head reached non-draft, conflict-free, green-CI, Platinum Hermit readiness with no remaining actionable review findings. While monitoring, GitHub recorded a merge by
RomneyDaat 20:41:51 UTC, commitb1697e2ae8f6333d88dc978b84f87c2f59773639, verified on main. This task submitted no merge or auto-merge request.