Overview
Mistral is an OpenAI-compatible provider with custom compatibility handling for specific features. Bifrost converts requests to Mistral’s expected format while supporting their unique API endpoints. Key characteristics:- OpenAI-compatible format - Chat and streaming endpoints
- Transcription API - Native audio transcription support
- Tool calling support - Function definitions with string-based tool choice
- Streaming support - Server-Sent Events for chat and transcription
- Parameter compatibility - max_completion_tokens → max_tokens conversion
Supported Operations
| Operation | Non-Streaming | Streaming | Endpoint |
|---|---|---|---|
| Chat Completions | ✅ | ✅ | /v1/chat/completions |
| Responses API | ✅ | ✅ | /v1/chat/completions |
| Transcriptions (STT) | ✅ | ✅ | /v1/audio/transcriptions |
| Embeddings | ✅ | - | /v1/embeddings |
| List Models | ✅ | - | /v1/models |
| Text Completions | ❌ | ❌ | - |
| Speech (TTS) | ❌ | ❌ | - |
| Files | ❌ | ❌ | - |
| Batch | ❌ | ❌ | - |
Unsupported Operations (❌): Text Completions, Speech (TTS), Files, and Batch are not supported by the upstream Mistral API. These return
UnsupportedOperationError.1. Chat Completions
Request Parameters
Mistral supports most OpenAI chat completion parameters with some conversions. For standard OpenAI parameter reference, see OpenAI Chat Completions.Parameter Mapping & Conversions
| Parameter | OpenAI | Mistral | Notes |
|---|---|---|---|
max_completion_tokens | ✅ | max_tokens | Conversion required |
temperature | ✅ | ✅ | Direct pass-through |
top_p | ✅ | ✅ | Direct pass-through |
stop | ✅ | ✅ | Stop sequences |
tools | ✅ | ✅ | Function definitions |
tool_choice | String only | String only | Limitations apply |
user | ✅ | ✅ | Max 64 characters |
frequency_penalty, presence_penalty | ✅ | ✅ | Direct pass-through |
Critical Conversions
max_completion_tokens → max_tokens:Filtered Parameters
Removed for Mistral compatibility:prompt_cache_key- Not supportedcache_control- Stripped from content blocksverbosity- Anthropic-specificstore- Not supportedservice_tier- Not supported
Message Conversion
Full OpenAI message support:- All roles: user, assistant, system, tool, developer
- Content types: text, images, audio, files
Tool Conversion
Tool definitions supported with constraints:| Aspect | Support | Notes |
|---|---|---|
| Function definitions | ✅ | Full parameter schema support |
| Tool choice “auto” | ✅ | Default mode |
| Tool choice “any” | ✅ | Requires any tool |
| Tool choice “none” | ✅ | No tools |
| Specific tool forcing | ❌ | Not supported - simplified to “any” |
| Parallel tools | ✅ | Multiple tools in one turn |
Response Conversion
Standard OpenAI-compatible response:choices[].message.content- Response textchoices[].message.tool_calls- Function callsusage- Token counts (prompt_tokens, completion_tokens)finish_reason- stop, tool_calls, length
2. Responses API
Converted internally to Chat Completions with format transformation:3. Transcription
Mistral provides native audio transcription with streaming support.Request Parameters
Parameter Mapping
| Parameter | Bifrost | Mistral | Notes |
|---|---|---|---|
file | Binary audio | Multipart form | Converted to multipart |
model | Model name | model | |
language | ISO-639-1 | language | Optional language hint |
prompt | Optional | prompt | Context for recognition |
response_format | Format type | response_format | json, text, etc. |
temperature | float | temperature | Sampling temperature |
timestamp_granularities | Array | Array field | Segment/word timestamps |
Multipart Form Structure
Transcription requests are sent as multipart/form-data:Transcription Response
Transcription Streaming
Mistral supports SSE streaming for transcription with custom event types:| Event Type | Content | Notes |
|---|---|---|
transcription.language | Language code | Language detected |
transcription.text.delta | Text delta | Incremental text |
transcription.segment | Full segment | Complete segment data |
transcription.done | Final usage | Completion with tokens |
4. Embeddings
Mistral supports text embeddings:| Parameter | Notes |
|---|---|
input | Text or array of texts |
model | Embedding model name |
dimensions | Custom output dimensions (optional) |
encoding_format | ”float” or “base64” |
5. List Models
Lists available Mistral models with context length and capabilities.Unsupported Features
| Feature | Reason |
|---|---|
| Text Completions | Not offered by Mistral API |
| Speech/TTS | Not offered by Mistral API |
| File Management | Not offered by Mistral API |
| Batch Operations | Not offered by Mistral API |
Caveats
Cache Control Stripped
Cache Control Stripped
Severity: Medium
Behavior: Cache control directives removed from messages
Impact: Prompt caching features unavailable
Code: Stripped during JSON marshaling
Parameter Filtering
Parameter Filtering
Severity: Low
Behavior: OpenAI-specific parameters filtered
Impact: prompt_cache_key, verbosity, store removed
Code: filterOpenAISpecificParameters
User Field Size Limit
User Field Size Limit
Severity: Low
Behavior: User field > 64 characters silently dropped
Impact: Longer user identifiers are lost
Code: SanitizeUserField enforces 64-char max

