Skip to content

Conversation

@loadchange
Copy link

@loadchange loadchange commented Nov 27, 2025

  • Add optional extra_content field to ToolCall TypedDict
  • Preserve extra_content in parse_tool_call()
  • Include extra_content in OpenAI format conversion

Enables support for Google Gemini's thought_signature and other provider-specific metadata while maintaining backward compatibility.


Cloudflare's AI Gateway offers an OpenAI-style calling method for Google AI Studio and Google Vertex AI. OpenRouter also adopts this style. However, Google's Gemini 3 series models currently require the thought_signature field to be passed. Therefore, this modification is essential for the above scenarios.

https://ai.google.dev/gemini-api/docs/thought-signatures#openai

@github-actions github-actions bot added integration Related to a provider partner package integration core Related to the package `langchain-core` openai feature labels Nov 27, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 27, 2025

CodSpeed Performance Report

Merging #34111 will not alter performance

Comparing loadchange:feat/tool-call-extra-content (7c47dd6) with master (0a6d01e)1

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 19 untouched
⏩ 15 skipped2

Footnotes

  1. No successful run was found on master (65ee43c) during the generation of this report, so 0a6d01e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 15 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@loadchange loadchange force-pushed the feat/tool-call-extra-content branch 5 times, most recently from b541a99 to 1da3a99 Compare November 27, 2025 05:44
@loadchange
Copy link
Author

loadchange commented Nov 27, 2025

@mdrxy Please help me troubleshoot the reason, I didn't modify the file for which the test failed; tests/unit_tests/tracers/test_memory_stream.py

Force-push code retry, CI passed

@loadchange loadchange force-pushed the feat/tool-call-extra-content branch from 6ae11f2 to 976f1c7 Compare November 28, 2025 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Related to the package `langchain-core` feature integration Related to a provider partner package integration openai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant