Skip to content

fix(anthropic): keep Claude tool turns streaming and Claude 5.5 thinking valid - #98

Merged
ALikesToCode merged 3 commits into
mainfrom
fix/lean-claude-turns
Oct 26, 2026
Merged

ALikesToCode merged 3 commits into
mainfrom
fix/lean-claude-turns

Conversation

@ALikesToCode

Copy link
Copy Markdown
Owner

Running Omni's agent loop against /lean on production (58c58d6) turned up two translation bugs that break Claude turns on the Chat Completions route.

Streaming fails on parallel tool calls. A streamed Haiku 5.5 turn with three parallel tool calls ended with The upstream stream could not be translated. right after the third call started; the same request unstreamed succeeded. A tool call with empty arguments arrives with an empty input_json_delta (or none), and the continuation collector ran json.loads("") at block stop. Empty arguments now become {}, and the stream translator logs the type of any exception it swallows, never its message.

Sonnet and Opus 5.5 reject the thinking parameters we send. reasoning_effort with a large max_tokens became thinking: {type: "enabled", budget_tokens}, which both answer 400. They now get adaptive thinking with output_config.effort, as Haiku 5.5 does, and client sampling parameters are dropped. Turning thinking off differs per model (checked against the API): Haiku accepts disabled, Sonnet needs between_tools, and Opus cannot turn it off, so none keeps adaptive thinking at effort low there.

Tests: regressions for both fail before and pass after; focused suites and the outbound inventory gate pass, and the full suite passed on each fix (5,403 and 5,478 passed) before they were combined.

Haiku 5.5 accepts disabled thinking, but Sonnet 5.5 answers 400 unless it is sent as between_tools, and Opus 5.5 cannot turn thinking off at all (both checked against the API on 2026-10-26). reasoning_effort none and an explicit disabled now map per model; on Opus it thinks adaptively at the lowest effort.
@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cc0f14f6-35bd-4f57-867e-9f63f17604c8
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T19:54:30.084968Z 4fe37b5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ALikesToCode
ALikesToCode merged commit a29b1ae into main Oct 26, 2026
6 checks passed
@ALikesToCode
ALikesToCode deleted the fix/lean-claude-turns branch October 27, 2026 02:17
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