llm/oai: add entry for Mistral Devstral model
Add the Mistral Devstral coding model (devstral-small-2505) to the llm/oai package.
This model is designed specifically for software engineering tasks and is available
through the Mistral API at the same cost as Mistral Small 3.1.
See: https://mistral.ai/news/devstral
However, we can't actually use it, because the Mistral API
doesn't parse out tool calls, and the model generates at least
three different tool calls formats. None of which contains a tool_call_id,
which somehow the Mistral API requires on the way back in.
I don't understand how this is supposed to work.
But fighting it now is an utter waste of time.
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: sf3b4fcfc4b26e3b4k
diff --git a/llm/oai/oai.go b/llm/oai/oai.go
index 2b5b7ed..40524f3 100644
--- a/llm/oai/oai.go
+++ b/llm/oai/oai.go
@@ -212,6 +212,14 @@
Cost: ModelCost{Input: 40, Output: 200},
APIKeyEnv: MistralAPIKeyEnv,
}
+
+ DevstralSmall = Model{
+ UserName: "devstral-small",
+ ModelName: "devstral-small-latest",
+ URL: MistralURL,
+ Cost: ModelCost{Input: 100, Output: 300},
+ APIKeyEnv: MistralAPIKeyEnv,
+ }
)
// Service provides chat completions.
@@ -247,6 +255,7 @@
FireworksDeepseekV3,
FireworksLlama4Maverick,
MistralMedium,
+ DevstralSmall,
}
// ListModels returns a list of all available models with their user-friendly names.