Patch Changes
-
#10106
9f30267Thanks @hntrl! - Add package version metadata to runnable traces. Each package now stamps its version inthis.metadata.versionsat construction time, making version info available in LangSmith trace metadata. -
#10164
4eae353Thanks @hntrl! - fix(google): fix inflated usage_metadata during streaming by converting cumulative token counts to deltasThe Gemini API sends cumulative
usageMetadataon every streaming chunk. Previously, these cumulative values were attached directly to eachAIMessageChunk, causingmergeUsageMetadata()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
streamUsageis enabled. -
#10170
d42f735Thanks @hntrl! - fix(google): generate unique tool_call IDs to prevent ToolNode from silently skipping execution- Use native
functionCall.idfrom Gemini API when present, fall back touuid.v4()(matching@langchain/google-commonbehavior) - Pass
tool_call_idthrough asfunctionResponse.idon both v1 standard and legacy code paths
- Use native
-
#10072
5f6940dThanks @kyrisu! - fix(google): emit on_chat_model_stream events for non-text content blocks