Skip to content

Conversation

@DragosBobolea
Copy link
Contributor

Extract strict from kwargs and pass it to convert_to_openai_tool when converting tools. This ensures that when strict is provided, it's properly used during tool conversion and removed from kwargs before calling the parent bind method.

Also extract reasoning_content from API responses and store it in additional_kwargs for AIMessage objects.

Fixes #34341 and #34342

@github-actions github-actions bot added integration PR made that is related to a provider partner package integration fireworks `langchain-fireworks` package issues & PRs labels Dec 13, 2025
@DragosBobolea DragosBobolea changed the title Fireworks: fix bind_tools(strict: bool) and reasoning_content #34341 #34342 fix: fix Fireworks' bind_tools(strict: bool) and reasoning_content #34341 #34342 Dec 16, 2025
@github-actions github-actions bot added the fix For PRs that implement a fix label Dec 16, 2025
…nd_tools

Extract strict from kwargs and pass it to convert_to_openai_tool when converting
tools. This ensures that when strict is provided, it's properly used during tool
conversion and removed from kwargs before calling the parent bind method.

Also extract reasoning_content from API responses and store it in additional_kwargs
for AIMessage objects.

Add parametrized test to verify strict parameter handling.
Add unit tests to verify reasoning_content extraction.
- Add noqa comment for FBT001 in parametrized test
- Split long line in unit test to comply with line length limit
@DragosBobolea DragosBobolea force-pushed the fix/fireworks-bind-tools-strict branch from a8f171d to 3f38a0c Compare December 16, 2025 12:27
@mdrxy mdrxy changed the title fix: fix Fireworks' bind_tools(strict: bool) and reasoning_content #34341 #34342 fix(fireworks): bind_tools(strict: bool) and reasoning_content Dec 27, 2025
@github-actions github-actions bot added fix For PRs that implement a fix and removed fix For PRs that implement a fix labels Dec 27, 2025
@mdrxy mdrxy merged commit 6d447f8 into langchain-ai:master Dec 27, 2025
40 of 41 checks passed
devbyteai pushed a commit to devbyteai/langchain that referenced this pull request Jan 21, 2026
…angchain-ai#34343)

Extract strict from kwargs and pass it to convert_to_openai_tool when
converting tools. This ensures that when strict is provided, it's
properly used during tool conversion and removed from kwargs before
calling the parent bind method.

Also extract reasoning_content from API responses and store it in
additional_kwargs for AIMessage objects.

Fixes langchain-ai#34341 and
langchain-ai#34342

---------

Co-authored-by: Mason Daugherty <mason@langchain.dev>
@mdrxy mdrxy added the external label Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external fireworks `langchain-fireworks` package issues & PRs fix For PRs that implement a fix integration PR made that is related to a provider partner package integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fireworks: bind_tools(strict: bool) not working

2 participants