mirror of
https://github.com/hwchase17/langchain.git
synced 2026-07-02 07:07:48 +00:00
## Summary - Fix `ChatAnthropic._make_message_chunk_from_anthropic_event` dropping the first text chunk of an assistant turn when Anthropic carries the opening text on the `content_block_start` event rather than a following `text_delta`. This most often hits the assistant turn right after a tool result. - The dropped content streams to clients but never reaches the aggregated `AIMessage`, so anything reading message history back (e.g. a checkpointer) sees a truncated message (`Here's the answer.` → `'s the answer.`). Reported via Pylon 25478 (Zip), whose `<canvaspreview>` parser broke because the dropped chunk was the opening `<can` tag. - Add a `content_block_start` branch for `text` and `thinking` blocks: emit non-empty start-event content on both the string (`coerce_content_to_string=True`) and structured content paths; empty starts still emit no chunk (preserving prior behavior) and update `block_start_event` so following deltas resolve against the current block. --------- Co-authored-by: Mason Daugherty <mason@langchain.dev> Co-authored-by: Mason Daugherty <github@mdrxy.com>
FAQ
Looking for an integration not listed here? Check out the integrations documentation and the note in the libs/ README about third-party maintained packages.
Integration docs
For full documentation, see the primary and API reference docs for integrations.