Skip to content

feat(anthropic): support claude-sonnet-5#83

Open
ibash wants to merge 1 commit into
gsuuon:mainfrom
ibash:anthropic-sonnet-5-support
Open

feat(anthropic): support claude-sonnet-5#83
ibash wants to merge 1 commit into
gsuuon:mainfrom
ibash:anthropic-sonnet-5-support

Conversation

@ibash

@ibash ibash commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Sonnet 5 runs adaptive thinking by default (no thinking field sent), which streams thinking_delta/signature_delta content_block_delta events that have no .text. The provider assumed every delta carried text, so consume(nil) crashed with "attempt to concatenate local 'partial' (a nil value)".

Guard the streaming handler to only forward text_delta blocks, and add a claude-sonnet-5 chat prompt with a larger max_tokens so adaptive thinking doesn't crowd out the answer.

Sonnet 5 runs adaptive thinking by default (no `thinking` field sent),
which streams thinking_delta/signature_delta content_block_delta events
that have no `.text`. The provider assumed every delta carried text,
so `consume(nil)` crashed with "attempt to concatenate local 'partial'
(a nil value)".

Guard the streaming handler to only forward text_delta blocks, and add
a `claude-sonnet-5` chat prompt with a larger max_tokens so adaptive
thinking doesn't crowd out the answer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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