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

Patch Changes

  • #10106 9f30267 Thanks @hntrl! - Add package version metadata to runnable traces. Each package now stamps its version in this.metadata.versions at construction time, making version info available in LangSmith trace metadata.

  • #10164 4eae353 Thanks @hntrl! - fix(google): fix inflated usage_metadata during streaming by converting cumulative token counts to deltas

    The Gemini API sends cumulative usageMetadata on every streaming chunk. Previously, these cumulative values were attached directly to each AIMessageChunk, causing mergeUsageMetadata() to sum them and produce inflated token counts when chunks were concatenated.

    Now the provider tracks previous cumulative values and emits per-chunk deltas, so additive merging produces the correct final totals while still providing meaningful per-chunk usage data when streamUsage is enabled.

  • #10170 d42f735 Thanks @hntrl! - fix(google): generate unique tool_call IDs to prevent ToolNode from silently skipping execution

    • Use native functionCall.id from Gemini API when present, fall back to uuid.v4() (matching @langchain/google-common behavior)
    • Pass tool_call_id through as functionResponse.id on both v1 standard and legacy code paths
  • #10072 5f6940d Thanks @kyrisu! - fix(google): emit on_chat_model_stream events for non-text content blocks

Don't miss a new langchainjs release

NewReleases is sending notifications on new releases.