Try Bifrost Enterprise free for 14 days.
Request access

[ Provider Guide ]

Mistral Provider on Bifrost

Bifrost routes Mistral models with OpenAI-compatible chat, Responses API, transcription, OCR, and embeddings. The integration handles parameter conversion, native audio transcription, and tool calling with Mistral-specific constraints.

Mistral provider summary

Bifrost routes Mistral with OpenAI-compatible chat and streaming, native transcription and OCR, and embeddings. Parameter conversion maps OpenAI fields (for example max_completion_tokensmax_tokens) to Mistral equivalents.

Common Mistral model IDs used in Bifrost routes:

  • mistral-large-latest (Latest)
  • mistral-medium-latest (Balanced)
  • mistral-small-latest (Fast)
  • mistral-embed (Embeddings)
PropertyDetails
DescriptionMistral AI models for chat, embeddings, transcription, and OCR.
Provider route on Bifrostmistral/<model>
Provider docMistral
API endpoint for providerhttps://api.mistral.ai
Supported endpoints/v1/chat/completions, /v1/embeddings, /v1/audio/transcriptions, /v1/ocr

Supported operations

Mistral provides chat, Responses API (via chat upstream), transcription (with streaming), OCR, embeddings, and model listing. Text Completions, Speech, Files, and Batch return UnsupportedOperationError. Image generation is supported by the Mistral API but not yet in Bifrost's integration. See Supported operations in Bifrost docs.

OperationNon-streamingStreamingUpstream endpoint
Chat CompletionsYesYes/v1/chat/completions
Responses APIYesYes/v1/chat/completions
Transcriptions (STT)YesYes/v1/audio/transcriptions
OCRYesNo/v1/ocr
EmbeddingsYesNo/v1/embeddings
List ModelsYesNo/v1/models
Text CompletionsNoNo-
Image GenerationNoNo-
Speech (TTS)NoNo-
FilesNoNo-
BatchNoNo-

Supported OpenAI parameters

Quick reference of OpenAI parameters accepted when routing through Mistral via Bifrost. The main adjustment is max_completion_tokensmax_tokens.

[
  "stream",
  "temperature",
  "top_p",
  "max_tokens",
  "max_completion_tokens",
  "stop",
  "tools",
  "tool_choice",
  "user",
  "reasoning"
]

Supported Mistral models

Use the provider prefix mistral/ in Bifrost model routes for deterministic provider targeting.

FamilyModel IDBifrost routeTypical usage
Mistral Largemistral-large-latestmistral/mistral-large-latestMost capable model
Mistral Mediummistral-medium-latestmistral/mistral-medium-latestBalanced performance
Mistral Smallmistral-small-latestmistral/mistral-small-latestFast, lower-cost
Mistral Embedmistral-embedmistral/mistral-embedEmbeddings
Mistral Rerankmistral-rerank-latestmistral/mistral-rerank-latestReranking

API reference

OpenAI-compatible Bifrost gateway routes mapped to Mistral upstream APIs. Content aligned with Bifrost Mistral provider docs.

1) Chat Completions

Primary chat endpoint with OpenAI-compatible request/response handling. For standard parameter reference, see OpenAI Chat Completions. See Chat Completions in Bifrost docs.

ParameterMistralNotes
max_completion_tokensmax_tokensConversion required
temperatureDirect pass-through
top_pDirect pass-through
stopStop sequences
toolsFunction definitions
tool_choiceString onlyauto, any, none — not structured
userDirect pass-throughMax 64 characters
frequency_penalty, presence_penaltyDirect pass-through

Critical conversions

// max_completion_tokens → max_tokens
{"max_completion_tokens": 4096}  →  {"max_tokens": 4096}

// Tool choice: Mistral supports string only
{"tool_choice": {"type": "function", "function": {"name": "specific_tool"}}}
  →  {"tool_choice": "any"}  // or "none", "auto"

Filtered before upstream: prompt_cache_key, cache_control (stripped from content blocks), verbosity, store, service_tier.

Message conversion supports all roles (user, assistant, system, tool, developer) and content types: text, images, audio, and files.

AspectSupportNotes
Function definitionsYesFull parameter schema support
Tool choice "auto"YesDefault mode
Tool choice "any"YesRequires any tool
Tool choice "none"YesNo tools
Specific tool forcingNoSimplified to "any"
Parallel toolsYesMultiple tools in one turn

Responses use standard OpenAI shape: choices[].message.content, choices[].message.tool_calls, usage, and finish_reason (stop, tool_calls, length).

curl -X POST http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-large-latest",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

2) Responses API

The Responses API is converted internally to Chat Completions with format transformation. Upstream routes to /v1/chat/completions. Same parameter support and tool handling as Chat Completions; response format uses output items instead of a single message content field. See Responses API in Bifrost docs.

ResponsesRequest → ChatRequest → ChatCompletion → ResponsesResponse
curl -X POST http://localhost:8080/v1/responses \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-large-latest",
    "input": "Summarize this in one sentence."
  }'

3) Transcription

Mistral provides native audio transcription with streaming support. Bifrost gateway route: /v1/audio/transcriptions; upstream: /v1/audio/transcriptions. Requests are sent as multipart/form-data. See Transcription in Bifrost docs.

ParameterBifrostMistralNotes
fileBinary audioMultipart formConverted to multipart
modelModel namemodel
languageISO-639-1languageOptional language hint
promptOptionalpromptContext for recognition
response_formatFormat typeresponse_formatjson, text, etc.
temperaturefloattemperatureSampling temperature
timestamp_granularitiesArrayArray fieldSegment/word timestamps

Multipart form structure

--boundary
Content-Disposition: form-data; name="file"; filename="audio.mp3"
[binary audio data]
--boundary
Content-Disposition: form-data; name="model"
voxtral-mini-latest
--boundary
Content-Disposition: form-data; name="language"
en
--boundary--

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}
  ]
}
curl -X POST http://localhost:8080/v1/audio/transcriptions \
  -H "Content-Type: multipart/form-data" \
  -F file=@audio.mp3 \
  -F model=mistral/voxtral-mini-latest

Transcription streaming (SSE)

Event typeContentNotes
transcription.languageLanguage codeLanguage detected
transcription.text.deltaText deltaIncremental text
transcription.segmentFull segmentComplete segment data
transcription.doneFinal usageCompletion with tokens

4) Embeddings

Mistral supports text embeddings via /v1/embeddings. See Embeddings in Bifrost docs.

ParameterNotes
inputText or array of texts
modelEmbedding model name
dimensionsCustom output dimensions (Optional)
encoding_format"float" or "base64"

Response returns embedding vectors with token usage.

curl -X POST http://localhost:8080/v1/embeddings \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-embed",
    "input": ["text to embed"]
  }'

5) OCR

Native OCR for extracting text and content from documents and images via the mistral-ocr-latest model. Gateway route: /v1/ocr. See OCR in Bifrost docs.

ParameterNotes
modelOCR model (e.g. mistral/mistral-ocr-latest)
documentDocument input
include_image_base64Return extracted images as base64
pagesPage indices to process
image_limitMax images per page
image_min_sizeMinimum image size (px)
table_formatFormat for extracted tables (e.g. markdown, html)
extract_headerExtract page headers
extract_footerExtract page footers
confidence_scores_granularitypage, block, word, document
bbox_annotation_formatBounding box annotation format
document_annotation_formatDocument-level annotation format
document_annotation_promptCustom annotation prompt

Document types

typeRequired fieldUse case
document_urldocument_urlPDF URL or base64 data URL
image_urlimage_urlImage URL
curl -X POST http://localhost:8080/v1/ocr \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral/mistral-ocr-latest",
    "document": {
      "type": "document_url",
      "document_url": "https://example.com/document.pdf"
    },
    "table_format": "markdown"
  }'

6) List Models

Lists available Mistral models with context length and capabilities. See List Models in Bifrost docs.

Lists available Mistral models with context length and capabilities.

curl http://localhost:8080/v1/models

Unsupported features

These operations return UnsupportedOperationError when routed through Bifrost's Mistral provider. See Unsupported features in Bifrost docs.

FeatureReason
Text CompletionsNot offered by Mistral API
Image GenerationNot yet implemented in Bifrost (Mistral API supports this)
Speech/TTSNot offered by Mistral API
File ManagementNot offered by Mistral API
Batch OperationsNot offered by Mistral API

Implementation caveats

CaveatImpactSeverity
Cache control strippedCache control directives removed from messages; prompt caching unavailableMedium
Parameter filteringprompt_cache_key, verbosity, store removed for Mistral compatibilityLow
Tool choice limitationsCannot force specific tool; structured tool_choice simplified to "any"Medium
User field truncationUser IDs over 64 characters are silently droppedLow
Image generation not supportedMistral API supports it but not yet implemented in BifrostLow

Authoritative references

[ BIFROST FEATURES ]

Open Source & Enterprise

Everything you need to run AI in production, from free open source to enterprise-grade features.

01 Governance

SAML support for SSO and Role-based access control and policy enforcement for team collaboration.

02 Adaptive Load Balancing

Automatically optimizes traffic distribution across provider keys and models based on real-time performance metrics.

03 Cluster Mode

High availability deployment with automatic failover and load balancing. Peer-to-peer clustering where every instance is equal.

04 Alerts

Real-time notifications for budget limits, failures, and performance issues on Email, Slack, PagerDuty, Teams, Webhook and more.

05 Log Exports

Export and analyze request logs, traces, and telemetry data from Bifrost with enterprise-grade data export capabilities for compliance, monitoring, and analytics.

06 Audit Logs

Comprehensive logging and audit trails for compliance and debugging.

07 Vault Support

Secure API key management with HashiCorp Vault, AWS Secrets Manager, Google Secret Manager, and Azure Key Vault integration.

08 VPC Deployment

Deploy Bifrost within your private cloud infrastructure with VPC isolation, custom networking, and enhanced security controls.

09 Guardrails

Automatically detect and block unsafe model outputs with real-time policy enforcement and content moderation across all agents.

[ SHIP RELIABLE AI ]

Try Bifrost Enterprise with a 14-day Free Trial

[quick setup]

Drop-in replacement for any AI SDK

Change just one line of code. Works with OpenAI, Anthropic, Vercel AI SDK, LangChain, and more.

1import os
2from anthropic import Anthropic
3
4anthropic = Anthropic(
5 api_key=os.environ.get("ANTHROPIC_API_KEY"),
6 base_url="https://<bifrost_url>/anthropic",
7)
8
9message = anthropic.messages.create(
10 model="claude-3-5-sonnet-20241022",
11 max_tokens=1024,
12 messages=[
13 {"role": "user", "content": "Hello, Claude"}
14 ]
15)
Drop in once, run everywhere.