Mistral
Overview
Section titled “Overview”Mistral is an OpenAI-compatible provider with custom compatibility handling for specific features. DeepIntShield 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
Section titled “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 |
| Image Generation | ❌ | ❌ | - |
| Text Completions | ❌ | ❌ | - |
| Speech (TTS) | ❌ | ❌ | - |
| Files | ❌ | ❌ | - |
| Batch | ❌ | ❌ | - |
1. Chat Completions
Section titled “1. Chat Completions”Request Parameters
Section titled “Request Parameters”Mistral supports most OpenAI chat completion parameters. For standard OpenAI parameter reference, see OpenAI Chat Completions. temperature, top_p, stop, frequency_penalty, and presence_penalty pass through directly. The user field is limited to 64 characters.
The following parameters are not supported and are ignored: prompt_cache_key, cache_control, verbosity, store, service_tier.
Message Content
Section titled “Message Content”Full OpenAI message support:
- All roles: user, assistant, system, tool, developer
- Content types: text, images, audio, files
Tool Support
Section titled “Tool Support”Tool definitions are supported with the following 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 by Mistral |
| Parallel tools | ✅ | Multiple tools in one turn |
Mistral supports only string-valued tool_choice (auto, any, none) - forcing a specific tool by name is not supported.
Response
Section titled “Response”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
Section titled “2. Responses API”Mistral supports the Responses API with the same parameter support and tool handling as Chat Completions. Responses are returned in Responses format.
3. Transcription
Section titled “3. Transcription”Mistral provides native audio transcription with streaming support. Requests are sent as multipart/form-data to /v1/audio/transcriptions.
Request Parameters
Section titled “Request Parameters”| Parameter | Notes |
|---|---|
file | Audio file (required) |
model | Model name (e.g. voxtral-mini-latest) |
language | ISO-639-1 language hint (optional) |
prompt | Context for recognition (optional) |
response_format | json, text, etc. |
temperature | Sampling temperature |
timestamp_granularities | Segment/word timestamps |
Transcription Response
Section titled “Transcription Response”{ "text": "transcribed text", "language": "en", "duration": 3.5, "segments": [{ "id": 0, "start": 0.0, "end": 1.5, "text": "transcribed segment", "temperature": 0.0, "avg_logprob": -0.45, "compression_ratio": 1.2, "no_speech_prob": 0.001 }], "words": [{ "word": "transcribed", "start": 0.0, "end": 0.8 }]}Transcription Streaming
Section titled “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
Section titled “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” |
Response returns embedding vectors with token usage.
5. List Models
Section titled “5. List Models”Lists available Mistral models with context length and capabilities.
Unsupported Features
Section titled “Unsupported Features”| Feature | Reason |
|---|---|
| Text Completions | Not offered by Mistral API |
| Image Generation | Not yet implemented in DeepIntShield integration (Mistral API supports this) |
| Speech/TTS | Not offered by Mistral API |
| File Management | Not offered by Mistral API |
| Batch Operations | Not offered by Mistral API |
Caveats
Section titled “Caveats”Cache Control Stripped
Severity: Medium Behavior: Cache control directives removed from messages Impact: Prompt caching features unavailable
Parameter Filtering
Severity: Low Behavior: OpenAI-specific parameters filtered Impact: prompt_cache_key, verbosity, store removed
User Field Size Limit
Severity: Low Behavior: User field > 64 characters silently dropped Impact: Longer user identifiers are lost