Commit 92d5451
committed
Add Mistral AI provider support
Implements Mistral AI as an OpenAI-compatible provider with minimal customizations:
- Extends OpenAI provider for core functionality
- Custom Chat module to handle system role mapping (uses 'system' instead of 'developer')
- Custom render_payload to remove unsupported stream_options parameter
- Custom Embeddings module that ignores dimensions parameter (not supported by Mistral)
- Implements capabilities detection for vision (pixtral), embeddings, and chat models
- Adds ministral-3b-latest for chat tests (cheapest option)
- Adds pixtral-12b-latest for vision tests
- Adds mistral-embed for embedding tests
- Fetches and includes 63 Mistral models in models.json
- Adds appropriate test skips for known model limitations1 parent a72bcae commit 92d5451
File tree
28 files changed
+3935
-151
lines changed- docs
- lib
- ruby_llm
- providers
- mistral
- tasks
- spec
- fixtures/vcr_cassettes
- ruby_llm
28 files changed
+3935
-151
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | | - | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 84 | | |
88 | | - | |
89 | | - | |
| 85 | + | |
| 86 | + | |
90 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
0 commit comments