diff --git a/internal/providers/configs/mistral.json b/internal/providers/configs/mistral.json new file mode 100644 index 00000000..b0ceeda7 --- /dev/null +++ b/internal/providers/configs/mistral.json @@ -0,0 +1,427 @@ +{ + "name": "Mistral AI", + "id": "mistral", + "api_key": "$MISTRAL_API_KEY", + "api_endpoint": "https://api.mistral.ai/v1", + "type": "mistral", + "default_large_model_id": "devstral-medium-latest", + "default_small_model_id": "devstral-small-latest", + "models": [ + { + "id": "mistral-large", + "name": "Mistral Large", + "cost_per_1m_in": 2, + "cost_per_1m_out": 6, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 128000, + "default_max_tokens": 12800, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "mistral-large-2407", + "name": "Mistral Large 2407", + "cost_per_1m_in": 2, + "cost_per_1m_out": 6, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "mistral-large-2411", + "name": "Mistral Large 2411", + "cost_per_1m_in": 2, + "cost_per_1m_out": 6, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "mistral-tiny", + "name": "Mistral Tiny", + "cost_per_1m_in": 0.25, + "cost_per_1m_out": 0.25, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 32768, + "default_max_tokens": 3276, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "codestral-2508", + "name": "Codestral 2508", + "cost_per_1m_in": 0.3, + "cost_per_1m_out": 0.9, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 256000, + "default_max_tokens": 25600, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "devstral-medium", + "name": "Devstral Medium", + "cost_per_1m_in": 0.4, + "cost_per_1m_out": 2, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "devstral-medium-latest", + "name": "Devstral Medium (Latest)", + "cost_per_1m_in": 0.4, + "cost_per_1m_out": 2, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "devstral-small", + "name": "Devstral Small 1.1", + "cost_per_1m_in": 0.1, + "cost_per_1m_out": 0.3, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "devstral-small-latest", + "name": "Devstral Small (Latest)", + "cost_per_1m_in": 0.1, + "cost_per_1m_out": 0.3, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "ministral-14b-2512", + "name": "Ministral 3 14B 2512", + "cost_per_1m_in": 0.2, + "cost_per_1m_out": 0.2, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 262144, + "default_max_tokens": 26214, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "ministral-3b-2512", + "name": "Ministral 3 3B 2512", + "cost_per_1m_in": 0.1, + "cost_per_1m_out": 0.1, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "ministral-8b-2512", + "name": "Ministral 3 8B 2512", + "cost_per_1m_in": 0.15, + "cost_per_1m_out": 0.15, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 262144, + "default_max_tokens": 26214, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "ministral-3b", + "name": "Ministral 3B", + "cost_per_1m_in": 0.04, + "cost_per_1m_out": 0.04, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "ministral-8b", + "name": "Ministral 8B", + "cost_per_1m_in": 0.09999999999999999, + "cost_per_1m_out": 0.09999999999999999, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "mistral-7b-instruct", + "name": "Mistral 7B Instruct", + "cost_per_1m_in": 0.028, + "cost_per_1m_out": 0.054, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 32768, + "default_max_tokens": 8192, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "mistral-7b-instruct:free", + "name": "Mistral 7B Instruct (free)", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 32768, + "default_max_tokens": 8192, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "mistral-large-2512", + "name": "Mistral Large 3 2512", + "cost_per_1m_in": 0.5, + "cost_per_1m_out": 1.5, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 262144, + "default_max_tokens": 26214, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "mistral-large-latest", + "name": "Mistral Large (Latest)", + "cost_per_1m_in": 0.5, + "cost_per_1m_out": 1.5, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 262144, + "default_max_tokens": 26214, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "mistral-medium-3", + "name": "Mistral Medium 3", + "cost_per_1m_in": 0.4, + "cost_per_1m_out": 2, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "mistral-medium-3.1", + "name": "Mistral Medium 3.1", + "cost_per_1m_in": 0.4, + "cost_per_1m_out": 2, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "mistral-medium-latest", + "name": "Mistral Medium (Latest)", + "cost_per_1m_in": 0.4, + "cost_per_1m_out": 2, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "mistral-nemo", + "name": "Mistral Nemo", + "cost_per_1m_in": 0.15, + "cost_per_1m_out": 0.15, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "mistral-small-24b-instruct-2501", + "name": "Mistral Small 3", + "cost_per_1m_in": 0.7999999999999999, + "cost_per_1m_out": 0.7999999999999999, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 32768, + "default_max_tokens": 1024, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "mistral-small-3.1-24b-instruct", + "name": "Mistral Small 3.1 24B", + "cost_per_1m_in": 0.03, + "cost_per_1m_out": 0.11, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 65536, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "mistral-small-3.1-24b-instruct:free", + "name": "Mistral Small 3.1 24B (free)", + "cost_per_1m_in": 0, + "cost_per_1m_out": 0, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 128000, + "default_max_tokens": 12800, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "mistral-small-3.2-24b-instruct", + "name": "Mistral Small 3.2 24B", + "cost_per_1m_in": 0.1, + "cost_per_1m_out": 0.3, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "mistral-small-latest", + "name": "Mistral Small (Latest)", + "cost_per_1m_in": 0.09999999999999999, + "cost_per_1m_out": 0.3, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "mixtral-8x22b-instruct", + "name": "Mixtral 8x22B Instruct", + "cost_per_1m_in": 2, + "cost_per_1m_out": 6, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 65536, + "default_max_tokens": 6553, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "mixtral-8x7b-instruct", + "name": "Mixtral 8x7B Instruct", + "cost_per_1m_in": 0.54, + "cost_per_1m_out": 0.54, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 32768, + "default_max_tokens": 8192, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "pixtral-large-2411", + "name": "Pixtral Large 2411", + "cost_per_1m_in": 2, + "cost_per_1m_out": 6, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 131072, + "default_max_tokens": 13107, + "can_reason": false, + "supports_attachments": true, + "options": {} + }, + { + "id": "mistral-saba", + "name": "Saba", + "cost_per_1m_in": 0.19999999999999998, + "cost_per_1m_out": 0.6, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 32768, + "default_max_tokens": 3276, + "can_reason": false, + "supports_attachments": false, + "options": {} + }, + { + "id": "voxtral-small-24b-2507", + "name": "Voxtral Small 24B 2507", + "cost_per_1m_in": 0.09999999999999999, + "cost_per_1m_out": 0.3, + "cost_per_1m_in_cached": 0, + "cost_per_1m_out_cached": 0, + "context_window": 32000, + "default_max_tokens": 3200, + "can_reason": false, + "supports_attachments": false, + "options": {} + } + ] +} \ No newline at end of file diff --git a/internal/providers/providers.go b/internal/providers/providers.go index d5299c49..fa9351aa 100644 --- a/internal/providers/providers.go +++ b/internal/providers/providers.go @@ -66,6 +66,9 @@ var kimiCodingConfig []byte //go:embed configs/copilot.json var copilotConfig []byte +//go:embed configs/mistral.json +var mistralConfig []byte + // ProviderFunc is a function that returns a Provider. type ProviderFunc func() catwalk.Provider @@ -87,6 +90,7 @@ var providerRegistry = []ProviderFunc{ deepSeekProvider, huggingFaceProvider, aiHubMixProvider, + mistralProvider, syntheticProvider, copilotProvider, } @@ -184,3 +188,7 @@ func kimiCodingProvider() catwalk.Provider { func copilotProvider() catwalk.Provider { return loadProviderFromConfig(copilotConfig) } + +func mistralProvider() catwalk.Provider { + return loadProviderFromConfig(mistralConfig) +} diff --git a/pkg/catwalk/provider.go b/pkg/catwalk/provider.go index d390f08e..f8bb1384 100644 --- a/pkg/catwalk/provider.go +++ b/pkg/catwalk/provider.go @@ -13,6 +13,7 @@ const ( TypeAzure Type = "azure" TypeBedrock Type = "bedrock" TypeVertexAI Type = "google-vertex" + TypeMistral Type = "mistral" ) // InferenceProvider represents the inference provider identifier. @@ -38,6 +39,7 @@ const ( InferenceAIHubMix InferenceProvider = "aihubmix" InferenceKimiCoding InferenceProvider = "kimi-coding" InferenceProviderCopilot InferenceProvider = "copilot" + InferenceProviderMistral InferenceProvider = "mistral" ) // Provider represents an AI provider configuration. @@ -101,6 +103,7 @@ func KnownProviders() []InferenceProvider { InferenceAIHubMix, InferenceKimiCoding, InferenceProviderCopilot, + InferenceProviderMistral, } } @@ -115,5 +118,6 @@ func KnownProviderTypes() []Type { TypeAzure, TypeBedrock, TypeVertexAI, + TypeMistral, } }