| 17 | |
| 18 | impl MistralProvider { |
| 19 | pub fn new(api_key: impl Into<String>) -> Self { |
| 20 | Self { |
| 21 | client: Client::new(), |
| 22 | api_key: api_key.into(), |
| 23 | models: vec![ |
| 24 | ModelInfo { |
| 25 | id: "mistral-large-latest".to_string(), |
| 26 | name: "Mistral Large".to_string(), |
| 27 | provider: "mistral".to_string(), |
| 28 | context_window: 128000, |
| 29 | max_output_tokens: 8192, |
| 30 | supports_vision: false, |
| 31 | supports_tools: true, |
| 32 | cost_per_million_input: 2.0, |
| 33 | cost_per_million_output: 6.0, |
| 34 | }, |
| 35 | ModelInfo { |
| 36 | id: "mistral-medium-latest".to_string(), |
| 37 | name: "Mistral Medium".to_string(), |
| 38 | provider: "mistral".to_string(), |
| 39 | context_window: 32000, |
| 40 | max_output_tokens: 8192, |
| 41 | supports_vision: false, |
| 42 | supports_tools: true, |
| 43 | cost_per_million_input: 2.7, |
| 44 | cost_per_million_output: 8.1, |
| 45 | }, |
| 46 | ModelInfo { |
| 47 | id: "mistral-small-latest".to_string(), |
| 48 | name: "Mistral Small".to_string(), |
| 49 | provider: "mistral".to_string(), |
| 50 | context_window: 32000, |
| 51 | max_output_tokens: 8192, |
| 52 | supports_vision: false, |
| 53 | supports_tools: true, |
| 54 | cost_per_million_input: 0.2, |
| 55 | cost_per_million_output: 0.6, |
| 56 | }, |
| 57 | ModelInfo { |
| 58 | id: "codestral-latest".to_string(), |
| 59 | name: "Codestral".to_string(), |
| 60 | provider: "mistral".to_string(), |
| 61 | context_window: 32000, |
| 62 | max_output_tokens: 8192, |
| 63 | supports_vision: false, |
| 64 | supports_tools: true, |
| 65 | cost_per_million_input: 0.3, |
| 66 | cost_per_million_output: 0.9, |
| 67 | }, |
| 68 | ModelInfo { |
| 69 | id: "pixtral-12b-2409".to_string(), |
| 70 | name: "Pixtral 12B".to_string(), |
| 71 | provider: "mistral".to_string(), |
| 72 | context_window: 128000, |
| 73 | max_output_tokens: 8192, |
| 74 | supports_vision: true, |
| 75 | supports_tools: false, |
| 76 | cost_per_million_input: 0.15, |