https://api.mistral.ai/v1 with an OpenAI-compatible
API. GoModel routes chat completions, model listing, embeddings, and passthrough requests
through the shared OpenAI adapter; the /v1/responses endpoint is translated through chat
completions (Mistral also offers a native one, but serving it through chat lets the reasoning
normalization below apply to chat completions, streaming, and /v1/responses; /p/mistral/...
passthrough requests are forwarded unchanged). Files and batches are not exposed for this
provider.
Reasoning (thinking) output
When reasoning is enabled, models such asmistral-large-4-0 and mistral-small-2603, and
hosted models such as zai-glm-5-3, return the assistant content as a list of
typed chunks — a thinking chunk for the reasoning trace and text chunks for the answer —
in both buffered responses and SSE streams. That shape is not standard OpenAI chat output, and
clients like SillyTavern render it as gibberish.
GoModel’s mistral provider converts it to the standard shape automatically:
- the
thinkingchunks are joined into thereasoning_contentfield, and - the
textchunks are joined into a plain stringcontent
choices[].delta) and non-streaming (choices[].message) responses. No
client-side configuration is needed. Chunk types with no standard chat equivalent — Mistral’s citation reference
chunks, for example — are preserved in a mistral_content_chunks vendor member so no
upstream data is dropped. SSE events larger than 16 MiB also pass through unconverted.
Send effort with the standard nested parameter; GoModel maps it to Mistral’s flat
reasoning_effort:
none, minimal, low, medium, high, xhigh, max, and the
value is normalized to lowercase and passed through. Which levels a model accepts is model-specific — for
example Mistral Large 4 takes low/medium/high, hosted GLM models take low/high/max,
and mistral-small-2603 also accepts none — so an unsupported level for the chosen model is
rejected by Mistral itself, as with their own SDKs. On zai-glm-5-3 the response is always a
chunk list, whatever the effort value.
When a client replays an earlier assistant turn, GoModel sends the turn’s reasoning back as a
Mistral thinking chunk inside the message content — Mistral’s guide warns that stripping the
trace degrades output — and drops members Mistral cannot parse but the client echoed
(mistral_content_chunks), which Mistral rejects with a 422. A replayed reasoning member
(the spelling some clients use) is treated like reasoning_content.
Mistral rejects request members its schema does not define, so GoModel adapts common OpenAI
fields instead of letting the request fail:
max_completion_tokensbecomesmax_tokens, andseedbecomesrandom_seed.service_tier: "default"becomesstandard_only; tiers Mistral does not offer are dropped.stream_options,user,logit_bias,store,verbosity, andsafety_identifierare dropped. Streams still report usage in their final chunk.- Messages keep only the members Mistral accepts for their role: for example,
namestays on tool messages only, andrefusalorannotationsechoed on assistant turns are dropped.
Configure
config.yaml:
The provider
type is mistral. The config key (mistral in the example above) is
arbitrary and only identifies this entry inside your config; it may be changed.Setting
MISTRAL_MODELS limits the models this provider serves to that list under the
default allowlist mode — requests for other models return 404. See
Models modes for merge/fallback alternatives.
The 404 applies to model-based routing only: when the operator enables passthrough for
this provider (ENABLED_PASSTHROUGH_PROVIDERS, see
Passthrough), /p/mistral/... requests reach the upstream
regardless of this list.Models
GoModel’sGET /v1/models is a gateway-wide list (every configured provider’s visible
models, not only this one’s); what this provider serves follows its models mode, so it can be
a subset of your Mistral account’s inventory. Call one of its models directly through the
OpenAI-compatible /v1/chat/completions endpoint:
Embeddings
Mistral’s/v1/embeddings endpoint (for example mistral-embed) is supported.