Repository navigation
Conversation
Mistral's OpenAI-compatible API rejects any field its schema doesn't declare. With base_url pointing at api.mistral.ai the plugin now: - drops stream_options on streaming calls - sends max_tokens instead of max_completion_tokens - sends seed as random_seed - sends an embedder's dimensions as output_dimension Requests to any other host are unchanged.
…rd top_k - Reply content that arrives as a list of chunks (Magistral) is split: thinking chunks become reasoning parts, text chunks the text, on the streamed and non-streamed paths. String content is unchanged. - codestral.mistral.ai gets the same rewrite as api.mistral.ai. - top_k goes out to Mistral, which declares it. - Streaming no longer adds stream_options for Mistral only to drop it. - The embedder makes one create() call with only the options that are set. - raw no longer warns when the reply content is a list.
…S hosts - On Mistral hosts, a model message's reasoning goes back on the next turn as one leading thinking chunk, with the signature the reply carried. Other hosts still drop reasoning. - A thinking chunk's signature is kept on the reasoning part as metadata.thoughtSignature. - finish_reason model_length maps to LENGTH. - api.eu.mistral.ai and api.us.mistral.ai get the Mistral rewrite.
adesinah
force-pushed
the
feat/ai-832-mistral-openai-compat
branch
from
November 12, 2026 16:21
0b8dfbe to
904466d
Compare
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.
What's new
The OpenAI plugin now works against Mistral when
base_urlpoints at a Mistral host:random_seed,max_tokens,output_dimension, and nostream_options.thinkingchunks as reasoning parts and replays them on the next turn.Why
Mistral rejects request fields it doesn't define (422), so streaming,
seedand embedderdimensionsall failed against it.Not doing here
Mistralplugin: models stayopenai/<id>, unlike the JS, Go and Dart providers.stream_optionsstill needs a live call to confirm.