github langchain-ai/langchainjs @langchain/google@0.2.4

latest releases: @langchain/neo4j@0.1.18, @langchain/xai@1.4.11, @langchain/together-ai@0.2.11...
one hour ago

Patch Changes

  • #11426 2e865ea Thanks @thushanth-bengre-langchain! - fix: keep image/audio/video content in ToolMessages as sibling Gemini parts instead of losing it inside functionResponse.response.result JSON, and stop double-stringifying non-string tool results (#10297, #10439)

  • #11477 9a0f244 Thanks @hntrl! - Fix convertMessagesToGeminiContents merging a ToolMessage (functionResponse)
    with a following HumanMessage (text) into one user content. Both map to the
    user role, and Vertex/Gemini rejects a single user content that mixes a
    functionResponse with text, so a tool result followed by a user message would
    fail with a 400. Merging is now limited to runs of adjacent tool results
    (parallel tool calls), which the API requires to be grouped into one content;
    all other same-role contents stay separate.

    Also fixes the v1 standard-content path, where a single ToolMessage could emit
    a user content mixing its functionResponse part with text parts; tool turns
    now carry only their functionResponse part(s), mirroring the legacy path.

Don't miss a new langchainjs release

NewReleases is sending notifications on new releases.