mistral://¶
Mistral AI — Mistral Large, Small, Codestral, Embed, etc. via Mistral's OpenAI-compatible chat-completions API.
Built on pkg/component/llmutil/ — the same chat/embeddings shape as
openai://. Wire format, headers, and timeout semantics
are inherited from there; this page documents the Mistral-specific
defaults.
URI shape¶
mistral://chat?model=<id>&apiKey=<key>&temperature=<float>&maxTokens=<int>&baseURL=<url>
mistral://embeddings?model=<id>&apiKey=<key>
Parameters¶
| Param | Type | Default | Producer/Consumer/Both | Description |
|---|---|---|---|---|
| path | enum | required | Producer | chat or embeddings. |
model |
string | mistral-large-latest |
Producer | Mistral model id. Common chat: mistral-large-latest, mistral-small-latest, open-mixtral-8x22b, codestral-latest. Embeddings: mistral-embed. |
apiKey |
string | (from constructor) | Producer | Mistral API key. Sent as Authorization: Bearer <key>. |
baseURL |
string | https://api.mistral.ai/v1 |
Producer | Override for proxies. |
temperature |
float | 0.7 |
Producer | Sampling temperature. |
maxTokens |
int | 4096 |
Producer | Output cap. |
Producer-only. Default timeout 120 s.
Headers¶
Same as openai:// but namespaced under mistral.*
(mistral.model, mistral.id, mistral.finishReason,
mistral.usage.promptTokens, mistral.usage.completionTokens,
mistral.usage.totalTokens). Input header systemPrompt works the
same way.
Examples¶
Code generation via Codestral:
Embeddings:
Behavior notes¶
See openai:// for the shared
behaviour — no streaming on this raw client, no tool use, single-turn,
120 s timeout. The full Mistral model list is at
https://docs.mistral.ai/getting-started/models/models_overview/.
Source¶
pkg/component/mistral/mistral.go— eight-line wrapper aroundllmutil.NewComponent.pkg/component/llmutil/llmutil.go— shared base.