Fix: mistral passes references when tool calls are used#409
Merged
Conversation
Member
Author
|
/backport to stable32 |
kyteinsky
reviewed
Jul 23, 2026
Comment on lines
+1482
to
+1487
| // Handle more complex mistral message content | ||
| foreach ($choice['message']['content'] as $content) { | ||
| if ($content['type'] === 'text' && is_string($content['text'])) { | ||
| $messageContent[] = $content['text']; | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
looks like reasoning and multimodal output is also in this same content
maybe reasoning can be also extracted here, and then the multimodal output in the other PR?
not sure how complex it would get though
Contributor
There was a problem hiding this comment.
the current changes are good to merge though, if reasoning is to be extracted later on 👍
Member
Author
There was a problem hiding this comment.
I added a comment that mentions a todo for the future
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
lukasdotcom
enabled auto-merge
July 23, 2026 12:47
kyteinsky
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mistral has a weird format when tool call results exist.
Resolves: #408
🤖 AI (if applicable)