Skip to content

Conversation

simonfr
Copy link

@simonfr simonfr commented Oct 10, 2025

Fixes #1680

Summary

This pull request addresses an incompatibility with the Mistral API's requirements for tool call IDs. The Mistral API expects tool call IDs to be exactly 9 characters long and contain onlyalphanumeric characters (a-z, A-Z, 0-9).

The previous implementation generated longer IDs with a call_ prefix, causing tool calls to fail. This change updates the ID generation logic to produce compliant IDs, ensuring thattool-dependent workflows function correctly with Mistral models.

Mistral API requires tool call IDs to be exactly 9 characters containing only [a-zA-Z0-9]. Refactored normalizeToolCallIds to accept a transform function, allowing provider-specific ID formatting.

Fixes sst#1680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tool Call ID Format Incompatible with Mistral API: "must be a-z, A-Z, 0-9, with a length of 9"

2 participants