Skip to content

Conversation

@AstraBert
Copy link
Member

Add support for ToolCallBlock in MistralAI

@AstraBert AstraBert marked this pull request as ready for review October 16, 2025 18:54
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 16, 2025
@AstraBert AstraBert changed the title wip: mistralai integration with tool call block feat: mistralai integration with tool call block Oct 16, 2025
Comment on lines +137 to +144
if len(m.additional_kwargs.get("tool_calls", [])) > 0:
tcs = m.additional_kwargs.get("tool_calls", [])
for tc in tcs:
if (
isinstance(tc, ToolCall)
and (tc.id, tc.function.name) not in unique_tool_calls
):
tool_calls.append(tc)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check for duplicates :))

Copy link
Collaborator

@logan-markewich logan-markewich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems ok I think, just bumped the min SDK version to ensure ThinkBlock is importable

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 27, 2025
@logan-markewich logan-markewich merged commit f556585 into main Oct 27, 2025
10 of 11 checks passed
@logan-markewich logan-markewich deleted the clelia/mistral-tool-call-block branch October 27, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants