Skip to main content

llm/opt/rustwide/target/x86_64-unknown-linux-gnu/debug/build/aether-llm-82aadb6eb5c79e08/out/
generated.rs

1// Auto-generated from models.dev — do not edit manually
2// Regenerated automatically by build.rs
3
4use std::borrow::Cow;
5use std::sync::LazyLock;
6use crate::ReasoningEffort;
7/// Typed provider identifier — covers both catalog providers
8/// (`Anthropic`, `Codex`, …) and dynamic providers whose model name is
9/// user-supplied (`Ollama`, `LlamaCpp`).
10#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
11pub enum Provider {
12    Anthropic,
13    AzureFoundry,
14    Codex,
15    DeepSeek,
16    Fireworks,
17    Gemini,
18    Moonshot,
19    Openai,
20    OpenRouter,
21    ZAi,
22    Bedrock,
23    Ollama,
24    LlamaCpp,
25}
26impl Provider {
27    /// All providers — catalog and dynamic — in declaration order.
28    pub const ALL: &[Provider] = &[
29        Self::Anthropic,
30        Self::AzureFoundry,
31        Self::Codex,
32        Self::DeepSeek,
33        Self::Fireworks,
34        Self::Gemini,
35        Self::Moonshot,
36        Self::Openai,
37        Self::OpenRouter,
38        Self::ZAi,
39        Self::Bedrock,
40        Self::Ollama,
41        Self::LlamaCpp,
42    ];
43    /// Parser name used in `provider:model` strings (e.g. `"anthropic"`).
44    pub fn parser_name(self) -> &'static str {
45        match self {
46            Self::Anthropic => "anthropic",
47            Self::AzureFoundry => "azure-foundry",
48            Self::Codex => "codex",
49            Self::DeepSeek => "deepseek",
50            Self::Fireworks => "fireworks",
51            Self::Gemini => "gemini",
52            Self::Moonshot => "moonshot",
53            Self::Openai => "openai",
54            Self::OpenRouter => "openrouter",
55            Self::ZAi => "zai",
56            Self::Bedrock => "bedrock",
57            Self::Ollama => "ollama",
58            Self::LlamaCpp => "llamacpp",
59        }
60    }
61    /// OpenTelemetry `GenAI` semantic-convention provider name.
62    #[allow(clippy::match_same_arms)]
63    pub fn genai_provider_name(self) -> &'static str {
64        match self {
65            Self::Anthropic => "anthropic",
66            Self::AzureFoundry => "azure.ai.openai",
67            Self::Codex => "openai",
68            Self::DeepSeek => "deepseek",
69            Self::Fireworks => "fireworks",
70            Self::Gemini => "gcp.gemini",
71            Self::Moonshot => "moonshot_ai",
72            Self::Openai => "openai",
73            Self::OpenRouter => "openrouter",
74            Self::ZAi => "zai",
75            Self::Bedrock => "aws.bedrock",
76            Self::Ollama => "ollama",
77            Self::LlamaCpp => "llama.cpp",
78        }
79    }
80    /// Human-readable provider name (e.g. `"AWS Bedrock"`).
81    pub fn display_name(self) -> &'static str {
82        match self {
83            Self::Anthropic => "Anthropic",
84            Self::AzureFoundry => "Microsoft Foundry",
85            Self::Codex => "Codex",
86            Self::DeepSeek => "DeepSeek",
87            Self::Fireworks => "Fireworks AI",
88            Self::Gemini => "Gemini",
89            Self::Moonshot => "Moonshot",
90            Self::Openai => "OpenAI",
91            Self::OpenRouter => "OpenRouter",
92            Self::ZAi => "ZAI",
93            Self::Bedrock => "AWS Bedrock",
94            Self::Ollama => "Ollama",
95            Self::LlamaCpp => "LlamaCpp",
96        }
97    }
98    /// API-key env var the provider requires, if any.
99    pub fn required_env_var(self) -> Option<&'static str> {
100        match self {
101            Self::Anthropic => Some("ANTHROPIC_API_KEY"),
102            Self::AzureFoundry => Some("AZURE_OPENAI_API_KEY"),
103            Self::DeepSeek => Some("DEEPSEEK_API_KEY"),
104            Self::Fireworks => Some("FIREWORKS_API_KEY"),
105            Self::Gemini => Some("GEMINI_API_KEY"),
106            Self::Moonshot => Some("MOONSHOT_API_KEY"),
107            Self::Openai => Some("OPENAI_API_KEY"),
108            Self::OpenRouter => Some("OPENROUTER_API_KEY"),
109            Self::ZAi => Some("ZAI_API_KEY"),
110            Self::Codex | Self::Bedrock | Self::Ollama | Self::LlamaCpp => None,
111        }
112    }
113    /// OAuth provider ID if this provider authenticates via OAuth.
114    pub fn oauth_provider_id(self) -> Option<&'static str> {
115        match self {
116            Self::Codex => Some("codex"),
117            Self::Anthropic
118            | Self::AzureFoundry
119            | Self::DeepSeek
120            | Self::Fireworks
121            | Self::Gemini
122            | Self::Moonshot
123            | Self::Openai
124            | Self::OpenRouter
125            | Self::ZAi
126            | Self::Bedrock
127            | Self::Ollama
128            | Self::LlamaCpp => None,
129        }
130    }
131    /// Local providers run models on the user's machine — there's no
132    /// remote API to call and no env var to satisfy.
133    pub fn is_local(self) -> bool {
134        match self {
135            Self::Ollama | Self::LlamaCpp => true,
136            Self::Anthropic
137            | Self::AzureFoundry
138            | Self::Codex
139            | Self::DeepSeek
140            | Self::Fireworks
141            | Self::Gemini
142            | Self::Moonshot
143            | Self::Openai
144            | Self::OpenRouter
145            | Self::ZAi
146            | Self::Bedrock => false,
147        }
148    }
149}
150impl std::fmt::Display for Provider {
151    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
152        f.write_str(self.parser_name())
153    }
154}
155impl std::str::FromStr for Provider {
156    type Err = String;
157    fn from_str(s: &str) -> Result<Self, Self::Err> {
158        match s {
159            "anthropic" => Ok(Self::Anthropic),
160            "azure-foundry" => Ok(Self::AzureFoundry),
161            "codex" => Ok(Self::Codex),
162            "deepseek" => Ok(Self::DeepSeek),
163            "fireworks" => Ok(Self::Fireworks),
164            "gemini" => Ok(Self::Gemini),
165            "moonshot" => Ok(Self::Moonshot),
166            "openai" => Ok(Self::Openai),
167            "openrouter" => Ok(Self::OpenRouter),
168            "zai" => Ok(Self::ZAi),
169            "bedrock" => Ok(Self::Bedrock),
170            "ollama" => Ok(Self::Ollama),
171            "llamacpp" => Ok(Self::LlamaCpp),
172            other => Err(format!("Unknown provider: '{other}'")),
173        }
174    }
175}
176#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
177pub enum AnthropicModel {
178    ClaudeFable5,
179    ClaudeHaiku45,
180    ClaudeHaiku4520251001,
181    ClaudeOpus41,
182    ClaudeOpus4120250805,
183    ClaudeOpus45,
184    ClaudeOpus4520251101,
185    ClaudeOpus46,
186    ClaudeOpus47,
187    ClaudeOpus48,
188    ClaudeOpus5,
189    ClaudeSonnet45,
190    ClaudeSonnet4520250929,
191    ClaudeSonnet46,
192    ClaudeSonnet5,
193}
194#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
195pub enum AzureFoundryModel {
196    ClaudeFable5,
197    ClaudeHaiku45,
198    ClaudeOpus41,
199    ClaudeOpus45,
200    ClaudeOpus46,
201    ClaudeOpus48,
202    ClaudeOpus5,
203    ClaudeSonnet45,
204    ClaudeSonnet46,
205    ClaudeSonnet5,
206    Codestral2501,
207    CodexMini,
208    CohereCommandA,
209    DeepseekV32,
210    Gpt4Turbo,
211    Gpt4TurboVision,
212    Gpt41,
213    Gpt41Mini,
214    Gpt41Nano,
215    Gpt4o,
216    Gpt4oMini,
217    Gpt5,
218    Gpt5Codex,
219    Gpt5Mini,
220    Gpt5Nano,
221    Gpt5Pro,
222    Gpt51,
223    Gpt51Codex,
224    Gpt51CodexMax,
225    Gpt51CodexMini,
226    Gpt52,
227    Gpt52Codex,
228    Gpt53Codex,
229    Gpt54,
230    Gpt54Mini,
231    Gpt54Nano,
232    Gpt54Pro,
233    Gpt55,
234    Gpt56Luna,
235    Gpt56Sol,
236    Gpt56Terra,
237    Grok41FastNonReasoning,
238    Grok41FastReasoning,
239    Grok420NonReasoning,
240    Grok420Reasoning,
241    KimiK25,
242    KimiK26,
243    Llama3370bInstruct,
244    Llama4Maverick17b128eInstructFp8,
245    Llama4Scout17b16eInstruct,
246    Ministral3b,
247    MistralMedium2505,
248    MistralSmall2503,
249    ModelRouter,
250    O1,
251    O3,
252    O3Mini,
253    O4Mini,
254    Phi4Mini,
255    Phi4MiniReasoning,
256}
257#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
258pub enum CodexModel {
259    Gpt52,
260    Gpt54,
261    Gpt54Mini,
262    Gpt55,
263    Gpt56Luna,
264    Gpt56Sol,
265    Gpt56Terra,
266}
267#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
268pub enum DeepSeekModel {
269    DeepseekChat,
270    DeepseekReasoner,
271    DeepseekV4Flash,
272    DeepseekV4Pro,
273}
274#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
275pub enum FireworksModel {
276    AccountsFireworksModelsDeepseekV4Flash,
277    AccountsFireworksModelsDeepseekV4Flash0731,
278    AccountsFireworksModelsDeepseekV4Pro,
279    AccountsFireworksModelsGlm5p2,
280    AccountsFireworksModelsGptOss120b,
281    AccountsFireworksModelsGptOss20b,
282    AccountsFireworksModelsKimiK2p6,
283    AccountsFireworksModelsKimiK2p7Code,
284    AccountsFireworksModelsKimiK3,
285    AccountsFireworksModelsMinimaxM2p7,
286    AccountsFireworksModelsMinimaxM3,
287    AccountsFireworksModelsQwen3p7Plus,
288    AccountsFireworksRoutersGlm5p2Fast,
289    AccountsFireworksRoutersKimiK2p6Fast,
290    AccountsFireworksRoutersKimiK2p6Turbo,
291    AccountsFireworksRoutersKimiK2p7CodeFast,
292    AccountsFireworksRoutersKimiK3Fast,
293}
294#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
295pub enum GeminiModel {
296    DeepResearchMaxPreview042026,
297    DeepResearchPreview042026,
298    Gemini20Flash,
299    Gemini20FlashLite,
300    Gemini25ComputerUsePreview102025,
301    Gemini25Flash,
302    Gemini25FlashLite,
303    Gemini25Pro,
304    Gemini3FlashPreview,
305    Gemini3ProPreview,
306    Gemini31FlashLite,
307    Gemini31FlashLiteImage,
308    Gemini31FlashLitePreview,
309    Gemini31FlashLivePreview,
310    Gemini31ProPreview,
311    Gemini31ProPreviewCustomtools,
312    Gemini35Flash,
313    Gemini35FlashLite,
314    Gemini36Flash,
315    GeminiRoboticsEr16Preview,
316    Gemma426bA4bIt,
317    Gemma431bIt,
318}
319#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
320pub enum MoonshotModel {
321    KimiK20711Preview,
322    KimiK20905Preview,
323    KimiK2Thinking,
324    KimiK2ThinkingTurbo,
325    KimiK2TurboPreview,
326    KimiK25,
327    KimiK26,
328    KimiK27Code,
329    KimiK27CodeHighspeed,
330    KimiK3,
331}
332#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
333pub enum OpenaiModel {
334    Gpt4,
335    Gpt4Turbo,
336    Gpt41,
337    Gpt41Mini,
338    Gpt41Nano,
339    Gpt4o,
340    Gpt4o20240513,
341    Gpt4o20240806,
342    Gpt4o20241120,
343    Gpt4oMini,
344    Gpt5,
345    Gpt5Mini,
346    Gpt5Nano,
347    Gpt5Pro,
348    Gpt51,
349    Gpt52,
350    Gpt52Pro,
351    Gpt53Codex,
352    Gpt53CodexSpark,
353    Gpt54,
354    Gpt54Mini,
355    Gpt54Nano,
356    Gpt54Pro,
357    Gpt55,
358    Gpt55Pro,
359    Gpt56,
360    Gpt56Luna,
361    Gpt56Sol,
362    Gpt56Terra,
363    GptRealtime21,
364    O1,
365    O1Pro,
366    O3,
367    O3Mini,
368    O3Pro,
369    O4Mini,
370}
371#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
372pub enum OpenRouterModel {
373    Ai21JambaLarge17,
374    AionLabsAion20,
375    AionLabsAion30,
376    AionLabsAion30Mini,
377    AmazonNova2LiteV1,
378    AmazonNovaLiteV1,
379    AmazonNovaMicroV1,
380    AmazonNovaPremierV1,
381    AmazonNovaProV1,
382    AnthropicClaude3Haiku,
383    AnthropicClaudeFable5,
384    AnthropicClaudeHaiku45,
385    AnthropicClaudeOpus4,
386    AnthropicClaudeOpus41,
387    AnthropicClaudeOpus45,
388    AnthropicClaudeOpus46,
389    AnthropicClaudeOpus47,
390    AnthropicClaudeOpus47Fast,
391    AnthropicClaudeOpus48,
392    AnthropicClaudeOpus48Fast,
393    AnthropicClaudeOpus5,
394    AnthropicClaudeOpus5Fast,
395    AnthropicClaudeSonnet4,
396    AnthropicClaudeSonnet45,
397    AnthropicClaudeSonnet46,
398    AnthropicClaudeSonnet5,
399    ArceeAiTrinityLargeThinking,
400    ArceeAiVirtuosoLarge,
401    BytedanceSeedSeed16,
402    BytedanceSeedSeed16Flash,
403    BytedanceSeedSeed20Lite,
404    BytedanceSeedSeed20Mini,
405    CohereCommandR082024,
406    CohereCommandRPlus082024,
407    CohereNorthMiniCodeFree,
408    DeepseekDeepseekChat,
409    DeepseekDeepseekChatV30324,
410    DeepseekDeepseekChatV31,
411    DeepseekDeepseekR1,
412    DeepseekDeepseekR10528,
413    DeepseekDeepseekV31Terminus,
414    DeepseekDeepseekV32,
415    DeepseekDeepseekV32Exp,
416    DeepseekDeepseekV4Flash,
417    DeepseekDeepseekV4Flash0731,
418    DeepseekDeepseekV4Pro,
419    GoogleGemini25Flash,
420    GoogleGemini25FlashLite,
421    GoogleGemini25Pro,
422    GoogleGemini25ProPreview,
423    GoogleGemini25ProPreview0506,
424    GoogleGemini3FlashPreview,
425    GoogleGemini3ProImage,
426    GoogleGemini31FlashLite,
427    GoogleGemini31FlashLitePreview,
428    GoogleGemini31ProPreview,
429    GoogleGemini31ProPreviewCustomtools,
430    GoogleGemini35Flash,
431    GoogleGemini35FlashLite,
432    GoogleGemini36Flash,
433    GoogleGemma312bIt,
434    GoogleGemma327bIt,
435    GoogleGemma426bA4bIt,
436    GoogleGemma426bA4bItFree,
437    GoogleGemma431bIt,
438    GoogleGemma431bItFree,
439    IbmGraniteGranite418b,
440    InceptionMercury2,
441    InclusionaiLing261t,
442    InclusionaiLing26Flash,
443    InclusionaiLing30FlashFree,
444    InclusionaiRing261t,
445    KwaipilotKatCoderAirV25,
446    KwaipilotKatCoderProV2,
447    KwaipilotKatCoderProV25,
448    MeituanLongcat20,
449    MetaLlamaLlama3170bInstruct,
450    MetaLlamaLlama318bInstruct,
451    MetaLlamaLlama3370bInstruct,
452    MetaLlamaLlama4Maverick,
453    MetaLlamaLlama4Scout,
454    MetaMuseSpark11,
455    MinimaxMinimaxM1,
456    MinimaxMinimaxM2,
457    MinimaxMinimaxM21,
458    MinimaxMinimaxM25,
459    MinimaxMinimaxM27,
460    MinimaxMinimaxM3,
461    MistralaiCodestral2508,
462    MistralaiMinistral14b2512,
463    MistralaiMinistral3b2512,
464    MistralaiMinistral8b2512,
465    MistralaiMistralLarge,
466    MistralaiMistralLarge2407,
467    MistralaiMistralLarge2512,
468    MistralaiMistralMedium3,
469    MistralaiMistralMedium35,
470    MistralaiMistralMedium31,
471    MistralaiMistralNemo,
472    MistralaiMistralSaba,
473    MistralaiMistralSmall2603,
474    MistralaiMistralSmall3224bInstruct,
475    MistralaiMixtral8x22bInstruct,
476    MistralaiVoxtralSmall24b2507,
477    MoonshotaiKimiK2,
478    MoonshotaiKimiK20905,
479    MoonshotaiKimiK2Thinking,
480    MoonshotaiKimiK25,
481    MoonshotaiKimiK26,
482    MoonshotaiKimiK27Code,
483    MoonshotaiKimiK3,
484    NexAgiNexN2Mini,
485    NexAgiNexN2Pro,
486    NvidiaNemotron3Nano30bA3b,
487    NvidiaNemotron3Nano30bA3bFree,
488    NvidiaNemotron3NanoOmni30bA3bReasoningFree,
489    NvidiaNemotron3Super120bA12b,
490    NvidiaNemotron3Super120bA12bFree,
491    NvidiaNemotron3Ultra550bA55b,
492    NvidiaNemotron3Ultra550bA55bFree,
493    NvidiaNemotronNano12bV2VlFree,
494    NvidiaNemotronNano9bV2Free,
495    OpenaiGpt35Turbo,
496    OpenaiGpt35Turbo0613,
497    OpenaiGpt35Turbo16k,
498    OpenaiGpt4,
499    OpenaiGpt4Turbo,
500    OpenaiGpt4TurboPreview,
501    OpenaiGpt41,
502    OpenaiGpt41Mini,
503    OpenaiGpt41Nano,
504    OpenaiGpt4o,
505    OpenaiGpt4o20240513,
506    OpenaiGpt4o20240806,
507    OpenaiGpt4o20241120,
508    OpenaiGpt4oMini,
509    OpenaiGpt4oMini20240718,
510    OpenaiGpt5,
511    OpenaiGpt5Mini,
512    OpenaiGpt5Nano,
513    OpenaiGpt5Pro,
514    OpenaiGpt51,
515    OpenaiGpt51Codex,
516    OpenaiGpt51CodexMax,
517    OpenaiGpt51CodexMini,
518    OpenaiGpt52,
519    OpenaiGpt52Chat,
520    OpenaiGpt52Codex,
521    OpenaiGpt52Pro,
522    OpenaiGpt53Chat,
523    OpenaiGpt53Codex,
524    OpenaiGpt54,
525    OpenaiGpt54Mini,
526    OpenaiGpt54Nano,
527    OpenaiGpt54Pro,
528    OpenaiGpt55,
529    OpenaiGpt55Pro,
530    OpenaiGpt56Luna,
531    OpenaiGpt56LunaPro,
532    OpenaiGpt56Sol,
533    OpenaiGpt56SolPro,
534    OpenaiGpt56Terra,
535    OpenaiGpt56TerraPro,
536    OpenaiGptAudio,
537    OpenaiGptAudioMini,
538    OpenaiGptOss120b,
539    OpenaiGptOss20b,
540    OpenaiGptOss20bFree,
541    OpenaiGptOssSafeguard20b,
542    OpenaiO1,
543    OpenaiO3,
544    OpenaiO3Mini,
545    OpenaiO3MiniHigh,
546    OpenaiO3Pro,
547    OpenaiO4Mini,
548    OpenaiO4MiniHigh,
549    OpenrouterAuto,
550    OpenrouterFree,
551    PoolsideLagunaS21,
552    PoolsideLagunaS21Free,
553    PoolsideLagunaXs21,
554    PoolsideLagunaXs21Free,
555    QwenQwen2572bInstruct,
556    QwenQwen257bInstruct,
557    QwenQwenPlus,
558    QwenQwenPlus20250728,
559    QwenQwenPlus20250728Thinking,
560    QwenQwen314b,
561    QwenQwen3235bA22b,
562    QwenQwen3235bA22b2507,
563    QwenQwen3235bA22bThinking2507,
564    QwenQwen330bA3b,
565    QwenQwen330bA3bInstruct2507,
566    QwenQwen330bA3bThinking2507,
567    QwenQwen332b,
568    QwenQwen38b,
569    QwenQwen3Coder,
570    QwenQwen3Coder30bA3bInstruct,
571    QwenQwen3CoderFlash,
572    QwenQwen3CoderNext,
573    QwenQwen3CoderPlus,
574    QwenQwen3Max,
575    QwenQwen3MaxThinking,
576    QwenQwen3Next80bA3bInstruct,
577    QwenQwen3Next80bA3bThinking,
578    QwenQwen3Vl235bA22bInstruct,
579    QwenQwen3Vl235bA22bThinking,
580    QwenQwen3Vl30bA3bInstruct,
581    QwenQwen3Vl30bA3bThinking,
582    QwenQwen3Vl32bInstruct,
583    QwenQwen3Vl8bInstruct,
584    QwenQwen3Vl8bThinking,
585    QwenQwen35122bA10b,
586    QwenQwen3527b,
587    QwenQwen3535bA3b,
588    QwenQwen35397bA17b,
589    QwenQwen359b,
590    QwenQwen35Flash0223,
591    QwenQwen35Plus0215,
592    QwenQwen35Plus20260420,
593    QwenQwen3627b,
594    QwenQwen3635bA3b,
595    QwenQwen36Flash,
596    QwenQwen36MaxPreview,
597    QwenQwen36Plus,
598    QwenQwen37Flash,
599    QwenQwen37Max,
600    QwenQwen37Plus,
601    RekaaiRekaEdge,
602    RelaceRelaceSearch,
603    SakanaFuguUltra,
604    Sao10kL31Euryale70b,
605    StepfunStep35Flash,
606    StepfunStep37Flash,
607    TencentHy3,
608    TencentHy3Preview,
609    ThedrummerUnslopnemo12b,
610    ThinkingmachinesInkling,
611    ThinkingmachinesInklingSmall,
612    UpstageSolarPro3,
613    XAiGrok420,
614    XAiGrok43,
615    XAiGrok45,
616    XAiGrokBuild01,
617    XiaomiMimoV25,
618    XiaomiMimoV25Pro,
619    ZAiGlm45,
620    ZAiGlm45Air,
621    ZAiGlm45v,
622    ZAiGlm46,
623    ZAiGlm46v,
624    ZAiGlm47,
625    ZAiGlm47Flash,
626    ZAiGlm5,
627    ZAiGlm5Turbo,
628    ZAiGlm51,
629    ZAiGlm52,
630    ZAiGlm5vTurbo,
631}
632#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
633pub enum ZAiModel {
634    Glm45,
635    Glm45Air,
636    Glm45Flash,
637    Glm45v,
638    Glm46,
639    Glm46v,
640    Glm47,
641    Glm47Flash,
642    Glm47Flashx,
643    Glm5,
644    Glm5Turbo,
645    Glm51,
646    Glm52,
647    Glm52Highspeed,
648    Glm5vTurbo,
649}
650#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
651pub enum BedrockFoundationModel {
652    AmazonNova2LiteV10,
653    AmazonNovaLiteV10,
654    AmazonNovaMicroV10,
655    AmazonNovaProV10,
656    AnthropicClaudeFable5,
657    AnthropicClaudeHaiku4520251001V10,
658    AnthropicClaudeOpus4120250805V10,
659    AnthropicClaudeOpus4520251101V10,
660    AnthropicClaudeOpus46V1,
661    AnthropicClaudeOpus47,
662    AnthropicClaudeOpus48,
663    AnthropicClaudeOpus5,
664    AnthropicClaudeSonnet4520250929V10,
665    AnthropicClaudeSonnet46,
666    AnthropicClaudeSonnet5,
667    AuAnthropicClaudeHaiku4520251001V10,
668    AuAnthropicClaudeOpus46V1,
669    AuAnthropicClaudeOpus48,
670    AuAnthropicClaudeOpus5,
671    AuAnthropicClaudeSonnet4520250929V10,
672    AuAnthropicClaudeSonnet46,
673    AuAnthropicClaudeSonnet5,
674    DeepseekR1V10,
675    DeepseekV3V10,
676    DeepseekV32,
677    EuAnthropicClaudeFable5,
678    EuAnthropicClaudeHaiku4520251001V10,
679    EuAnthropicClaudeOpus4520251101V10,
680    EuAnthropicClaudeOpus46V1,
681    EuAnthropicClaudeOpus47,
682    EuAnthropicClaudeOpus48,
683    EuAnthropicClaudeOpus5,
684    EuAnthropicClaudeSonnet4520250929V10,
685    EuAnthropicClaudeSonnet46,
686    EuAnthropicClaudeSonnet5,
687    GlobalAnthropicClaudeFable5,
688    GlobalAnthropicClaudeHaiku4520251001V10,
689    GlobalAnthropicClaudeOpus4520251101V10,
690    GlobalAnthropicClaudeOpus46V1,
691    GlobalAnthropicClaudeOpus47,
692    GlobalAnthropicClaudeOpus48,
693    GlobalAnthropicClaudeOpus5,
694    GlobalAnthropicClaudeSonnet4520250929V10,
695    GlobalAnthropicClaudeSonnet46,
696    GlobalAnthropicClaudeSonnet5,
697    GoogleGemma327bIt,
698    GoogleGemma34bIt,
699    JpAnthropicClaudeHaiku4520251001V10,
700    JpAnthropicClaudeOpus47,
701    JpAnthropicClaudeOpus48,
702    JpAnthropicClaudeOpus5,
703    JpAnthropicClaudeSonnet4520250929V10,
704    JpAnthropicClaudeSonnet46,
705    JpAnthropicClaudeSonnet5,
706    MetaLlama3170bInstructV10,
707    MetaLlama318bInstructV10,
708    MetaLlama3370bInstructV10,
709    MetaLlama4Maverick17bInstructV10,
710    MetaLlama4Scout17bInstructV10,
711    MinimaxMinimaxM2,
712    MinimaxMinimaxM21,
713    MinimaxMinimaxM25,
714    MistralDevstral2123b,
715    MistralMagistralSmall2509,
716    MistralMinistral314bInstruct,
717    MistralMinistral33bInstruct,
718    MistralMinistral38bInstruct,
719    MistralMistralLarge3675bInstruct,
720    MistralPixtralLarge2502V10,
721    MistralVoxtralMini3b2507,
722    MistralVoxtralSmall24b2507,
723    MoonshotKimiK2Thinking,
724    MoonshotaiKimiK25,
725    NvidiaNemotronNano12bV2,
726    NvidiaNemotronNano330b,
727    NvidiaNemotronNano9bV2,
728    NvidiaNemotronSuper3120b,
729    OpenaiGpt54,
730    OpenaiGpt55,
731    OpenaiGpt56Luna,
732    OpenaiGpt56Sol,
733    OpenaiGpt56Terra,
734    OpenaiGptOss120b,
735    OpenaiGptOss120b10,
736    OpenaiGptOss20b,
737    OpenaiGptOss20b10,
738    OpenaiGptOssSafeguard120b,
739    OpenaiGptOssSafeguard20b,
740    QwenQwen3235bA22b2507V10,
741    QwenQwen332bV10,
742    QwenQwen3Coder30bA3bV10,
743    QwenQwen3Coder480bA35bV10,
744    QwenQwen3CoderNext,
745    QwenQwen3Next80bA3b,
746    QwenQwen3Vl235bA22b,
747    UsAnthropicClaudeFable5,
748    UsAnthropicClaudeHaiku4520251001V10,
749    UsAnthropicClaudeOpus4120250805V10,
750    UsAnthropicClaudeOpus4520251101V10,
751    UsAnthropicClaudeOpus46V1,
752    UsAnthropicClaudeOpus47,
753    UsAnthropicClaudeOpus48,
754    UsAnthropicClaudeOpus5,
755    UsAnthropicClaudeSonnet4520250929V10,
756    UsAnthropicClaudeSonnet46,
757    UsAnthropicClaudeSonnet5,
758    UsDeepseekR1V10,
759    UsMetaLlama4Maverick17bInstructV10,
760    UsMetaLlama4Scout17bInstructV10,
761    WriterPalmyraX4V10,
762    WriterPalmyraX5V10,
763    XaiGrok43,
764    ZaiGlm47,
765    ZaiGlm47Flash,
766    ZaiGlm5,
767}
768impl AnthropicModel {
769    #[allow(clippy::too_many_lines)]
770    fn model_id(self) -> &'static str {
771        match self {
772            Self::ClaudeFable5 => "claude-fable-5",
773            Self::ClaudeHaiku45 => "claude-haiku-4-5",
774            Self::ClaudeHaiku4520251001 => "claude-haiku-4-5-20251001",
775            Self::ClaudeOpus41 => "claude-opus-4-1",
776            Self::ClaudeOpus4120250805 => "claude-opus-4-1-20250805",
777            Self::ClaudeOpus45 => "claude-opus-4-5",
778            Self::ClaudeOpus4520251101 => "claude-opus-4-5-20251101",
779            Self::ClaudeOpus46 => "claude-opus-4-6",
780            Self::ClaudeOpus47 => "claude-opus-4-7",
781            Self::ClaudeOpus48 => "claude-opus-4-8",
782            Self::ClaudeOpus5 => "claude-opus-5",
783            Self::ClaudeSonnet45 => "claude-sonnet-4-5",
784            Self::ClaudeSonnet4520250929 => "claude-sonnet-4-5-20250929",
785            Self::ClaudeSonnet46 => "claude-sonnet-4-6",
786            Self::ClaudeSonnet5 => "claude-sonnet-5",
787        }
788    }
789    #[allow(clippy::too_many_lines)]
790    fn display_name(self) -> &'static str {
791        match self {
792            Self::ClaudeFable5 => "Claude Fable 5",
793            Self::ClaudeHaiku4520251001 => "Claude Haiku 4.5",
794            Self::ClaudeHaiku45 => "Claude Haiku 4.5 (latest)",
795            Self::ClaudeOpus4120250805 => "Claude Opus 4.1",
796            Self::ClaudeOpus41 => "Claude Opus 4.1 (latest)",
797            Self::ClaudeOpus4520251101 => "Claude Opus 4.5",
798            Self::ClaudeOpus45 => "Claude Opus 4.5 (latest)",
799            Self::ClaudeOpus46 => "Claude Opus 4.6",
800            Self::ClaudeOpus47 => "Claude Opus 4.7",
801            Self::ClaudeOpus48 => "Claude Opus 4.8",
802            Self::ClaudeOpus5 => "Claude Opus 5",
803            Self::ClaudeSonnet4520250929 => "Claude Sonnet 4.5",
804            Self::ClaudeSonnet45 => "Claude Sonnet 4.5 (latest)",
805            Self::ClaudeSonnet46 => "Claude Sonnet 4.6",
806            Self::ClaudeSonnet5 => "Claude Sonnet 5",
807        }
808    }
809    #[allow(clippy::too_many_lines)]
810    fn context_window(self) -> u32 {
811        match self {
812            Self::ClaudeHaiku45
813            | Self::ClaudeHaiku4520251001
814            | Self::ClaudeOpus41
815            | Self::ClaudeOpus4120250805
816            | Self::ClaudeOpus45
817            | Self::ClaudeOpus4520251101 => 200_000,
818            Self::ClaudeFable5
819            | Self::ClaudeOpus46
820            | Self::ClaudeOpus47
821            | Self::ClaudeOpus48
822            | Self::ClaudeOpus5
823            | Self::ClaudeSonnet45
824            | Self::ClaudeSonnet4520250929
825            | Self::ClaudeSonnet46
826            | Self::ClaudeSonnet5 => 1_000_000,
827        }
828    }
829    #[allow(clippy::too_many_lines)]
830    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
831        match self {
832            Self::ClaudeHaiku45
833            | Self::ClaudeHaiku4520251001
834            | Self::ClaudeOpus41
835            | Self::ClaudeOpus4120250805
836            | Self::ClaudeOpus45
837            | Self::ClaudeOpus4520251101
838            | Self::ClaudeSonnet45
839            | Self::ClaudeSonnet4520250929 => {
840                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
841            }
842            Self::ClaudeOpus46 | Self::ClaudeSonnet46 => {
843                &[
844                    ReasoningEffort::Low,
845                    ReasoningEffort::Medium,
846                    ReasoningEffort::High,
847                    ReasoningEffort::Max,
848                ]
849            }
850            Self::ClaudeFable5
851            | Self::ClaudeOpus47
852            | Self::ClaudeOpus48
853            | Self::ClaudeOpus5
854            | Self::ClaudeSonnet5 => {
855                &[
856                    ReasoningEffort::Low,
857                    ReasoningEffort::Medium,
858                    ReasoningEffort::High,
859                    ReasoningEffort::Xhigh,
860                    ReasoningEffort::Max,
861                ]
862            }
863        }
864    }
865    pub fn supports_reasoning(self) -> bool {
866        !self.reasoning_levels().is_empty()
867    }
868    #[allow(clippy::too_many_lines)]
869    pub fn supports_prompt_caching(self) -> bool {
870        match self {
871            Self::ClaudeFable5
872            | Self::ClaudeHaiku45
873            | Self::ClaudeHaiku4520251001
874            | Self::ClaudeOpus41
875            | Self::ClaudeOpus4120250805
876            | Self::ClaudeOpus45
877            | Self::ClaudeOpus4520251101
878            | Self::ClaudeOpus46
879            | Self::ClaudeOpus47
880            | Self::ClaudeOpus48
881            | Self::ClaudeOpus5
882            | Self::ClaudeSonnet45
883            | Self::ClaudeSonnet4520250929
884            | Self::ClaudeSonnet46
885            | Self::ClaudeSonnet5 => true,
886        }
887    }
888    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
889    pub fn pricing(self) -> Option<ModelPricing> {
890        match self {
891            Self::ClaudeFable5 => {
892                Some(ModelPricing {
893                    input_per_million: 10f64,
894                    output_per_million: 50f64,
895                    cache_read_per_million: Some(1f64),
896                    cache_write_per_million: Some(12.5f64),
897                })
898            }
899            Self::ClaudeHaiku45 => {
900                Some(ModelPricing {
901                    input_per_million: 1f64,
902                    output_per_million: 5f64,
903                    cache_read_per_million: Some(0.1f64),
904                    cache_write_per_million: Some(1.25f64),
905                })
906            }
907            Self::ClaudeHaiku4520251001 => {
908                Some(ModelPricing {
909                    input_per_million: 1f64,
910                    output_per_million: 5f64,
911                    cache_read_per_million: Some(0.1f64),
912                    cache_write_per_million: Some(1.25f64),
913                })
914            }
915            Self::ClaudeOpus41 => {
916                Some(ModelPricing {
917                    input_per_million: 15f64,
918                    output_per_million: 75f64,
919                    cache_read_per_million: Some(1.5f64),
920                    cache_write_per_million: Some(18.75f64),
921                })
922            }
923            Self::ClaudeOpus4120250805 => {
924                Some(ModelPricing {
925                    input_per_million: 15f64,
926                    output_per_million: 75f64,
927                    cache_read_per_million: Some(1.5f64),
928                    cache_write_per_million: Some(18.75f64),
929                })
930            }
931            Self::ClaudeOpus45 => {
932                Some(ModelPricing {
933                    input_per_million: 5f64,
934                    output_per_million: 25f64,
935                    cache_read_per_million: Some(0.5f64),
936                    cache_write_per_million: Some(6.25f64),
937                })
938            }
939            Self::ClaudeOpus4520251101 => {
940                Some(ModelPricing {
941                    input_per_million: 5f64,
942                    output_per_million: 25f64,
943                    cache_read_per_million: Some(0.5f64),
944                    cache_write_per_million: Some(6.25f64),
945                })
946            }
947            Self::ClaudeOpus46 => {
948                Some(ModelPricing {
949                    input_per_million: 5f64,
950                    output_per_million: 25f64,
951                    cache_read_per_million: Some(0.5f64),
952                    cache_write_per_million: Some(6.25f64),
953                })
954            }
955            Self::ClaudeOpus47 => {
956                Some(ModelPricing {
957                    input_per_million: 5f64,
958                    output_per_million: 25f64,
959                    cache_read_per_million: Some(0.5f64),
960                    cache_write_per_million: Some(6.25f64),
961                })
962            }
963            Self::ClaudeOpus48 => {
964                Some(ModelPricing {
965                    input_per_million: 5f64,
966                    output_per_million: 25f64,
967                    cache_read_per_million: Some(0.5f64),
968                    cache_write_per_million: Some(6.25f64),
969                })
970            }
971            Self::ClaudeOpus5 => {
972                Some(ModelPricing {
973                    input_per_million: 5f64,
974                    output_per_million: 25f64,
975                    cache_read_per_million: Some(0.5f64),
976                    cache_write_per_million: Some(6.25f64),
977                })
978            }
979            Self::ClaudeSonnet45 => {
980                Some(ModelPricing {
981                    input_per_million: 3f64,
982                    output_per_million: 15f64,
983                    cache_read_per_million: Some(0.3f64),
984                    cache_write_per_million: Some(3.75f64),
985                })
986            }
987            Self::ClaudeSonnet4520250929 => {
988                Some(ModelPricing {
989                    input_per_million: 3f64,
990                    output_per_million: 15f64,
991                    cache_read_per_million: Some(0.3f64),
992                    cache_write_per_million: Some(3.75f64),
993                })
994            }
995            Self::ClaudeSonnet46 => {
996                Some(ModelPricing {
997                    input_per_million: 3f64,
998                    output_per_million: 15f64,
999                    cache_read_per_million: Some(0.3f64),
1000                    cache_write_per_million: Some(3.75f64),
1001                })
1002            }
1003            Self::ClaudeSonnet5 => {
1004                Some(ModelPricing {
1005                    input_per_million: 2f64,
1006                    output_per_million: 10f64,
1007                    cache_read_per_million: Some(0.2f64),
1008                    cache_write_per_million: Some(2.5f64),
1009                })
1010            }
1011        }
1012    }
1013    #[allow(clippy::too_many_lines)]
1014    pub fn supports_image(self) -> bool {
1015        match self {
1016            Self::ClaudeFable5
1017            | Self::ClaudeHaiku45
1018            | Self::ClaudeHaiku4520251001
1019            | Self::ClaudeOpus41
1020            | Self::ClaudeOpus4120250805
1021            | Self::ClaudeOpus45
1022            | Self::ClaudeOpus4520251101
1023            | Self::ClaudeOpus46
1024            | Self::ClaudeOpus47
1025            | Self::ClaudeOpus48
1026            | Self::ClaudeOpus5
1027            | Self::ClaudeSonnet45
1028            | Self::ClaudeSonnet4520250929
1029            | Self::ClaudeSonnet46
1030            | Self::ClaudeSonnet5 => true,
1031        }
1032    }
1033    #[allow(clippy::too_many_lines)]
1034    pub fn supports_audio(self) -> bool {
1035        match self {
1036            Self::ClaudeFable5
1037            | Self::ClaudeHaiku45
1038            | Self::ClaudeHaiku4520251001
1039            | Self::ClaudeOpus41
1040            | Self::ClaudeOpus4120250805
1041            | Self::ClaudeOpus45
1042            | Self::ClaudeOpus4520251101
1043            | Self::ClaudeOpus46
1044            | Self::ClaudeOpus47
1045            | Self::ClaudeOpus48
1046            | Self::ClaudeOpus5
1047            | Self::ClaudeSonnet45
1048            | Self::ClaudeSonnet4520250929
1049            | Self::ClaudeSonnet46
1050            | Self::ClaudeSonnet5 => false,
1051        }
1052    }
1053    #[allow(clippy::too_many_lines)]
1054    pub fn transport(self) -> Option<ModelTransport> {
1055        match self {
1056            Self::ClaudeFable5
1057            | Self::ClaudeHaiku45
1058            | Self::ClaudeHaiku4520251001
1059            | Self::ClaudeOpus41
1060            | Self::ClaudeOpus4120250805
1061            | Self::ClaudeOpus45
1062            | Self::ClaudeOpus4520251101
1063            | Self::ClaudeOpus46
1064            | Self::ClaudeOpus47
1065            | Self::ClaudeOpus48
1066            | Self::ClaudeOpus5
1067            | Self::ClaudeSonnet45
1068            | Self::ClaudeSonnet4520250929
1069            | Self::ClaudeSonnet46
1070            | Self::ClaudeSonnet5 => None,
1071        }
1072    }
1073    const ALL: &[AnthropicModel] = &[
1074        Self::ClaudeFable5,
1075        Self::ClaudeHaiku45,
1076        Self::ClaudeHaiku4520251001,
1077        Self::ClaudeOpus41,
1078        Self::ClaudeOpus4120250805,
1079        Self::ClaudeOpus45,
1080        Self::ClaudeOpus4520251101,
1081        Self::ClaudeOpus46,
1082        Self::ClaudeOpus47,
1083        Self::ClaudeOpus48,
1084        Self::ClaudeOpus5,
1085        Self::ClaudeSonnet45,
1086        Self::ClaudeSonnet4520250929,
1087        Self::ClaudeSonnet46,
1088        Self::ClaudeSonnet5,
1089    ];
1090}
1091impl std::str::FromStr for AnthropicModel {
1092    type Err = String;
1093    #[allow(clippy::too_many_lines)]
1094    fn from_str(s: &str) -> Result<Self, Self::Err> {
1095        match s {
1096            "claude-fable-5" => Ok(Self::ClaudeFable5),
1097            "claude-haiku-4-5" => Ok(Self::ClaudeHaiku45),
1098            "claude-haiku-4-5-20251001" => Ok(Self::ClaudeHaiku4520251001),
1099            "claude-opus-4-1" => Ok(Self::ClaudeOpus41),
1100            "claude-opus-4-1-20250805" => Ok(Self::ClaudeOpus4120250805),
1101            "claude-opus-4-5" => Ok(Self::ClaudeOpus45),
1102            "claude-opus-4-5-20251101" => Ok(Self::ClaudeOpus4520251101),
1103            "claude-opus-4-6" => Ok(Self::ClaudeOpus46),
1104            "claude-opus-4-7" => Ok(Self::ClaudeOpus47),
1105            "claude-opus-4-8" => Ok(Self::ClaudeOpus48),
1106            "claude-opus-5" => Ok(Self::ClaudeOpus5),
1107            "claude-sonnet-4-5" => Ok(Self::ClaudeSonnet45),
1108            "claude-sonnet-4-5-20250929" => Ok(Self::ClaudeSonnet4520250929),
1109            "claude-sonnet-4-6" => Ok(Self::ClaudeSonnet46),
1110            "claude-sonnet-5" => Ok(Self::ClaudeSonnet5),
1111            _ => Err(format!("Unknown anthropic model: '{s}'")),
1112        }
1113    }
1114}
1115impl AzureFoundryModel {
1116    #[allow(clippy::too_many_lines)]
1117    fn model_id(self) -> &'static str {
1118        match self {
1119            Self::ClaudeFable5 => "claude-fable-5",
1120            Self::ClaudeHaiku45 => "claude-haiku-4-5",
1121            Self::ClaudeOpus41 => "claude-opus-4-1",
1122            Self::ClaudeOpus45 => "claude-opus-4-5",
1123            Self::ClaudeOpus46 => "claude-opus-4-6",
1124            Self::ClaudeOpus48 => "claude-opus-4-8",
1125            Self::ClaudeOpus5 => "claude-opus-5",
1126            Self::ClaudeSonnet45 => "claude-sonnet-4-5",
1127            Self::ClaudeSonnet46 => "claude-sonnet-4-6",
1128            Self::ClaudeSonnet5 => "claude-sonnet-5",
1129            Self::Codestral2501 => "codestral-2501",
1130            Self::CodexMini => "codex-mini",
1131            Self::CohereCommandA => "cohere-command-a",
1132            Self::DeepseekV32 => "deepseek-v3.2",
1133            Self::Gpt4Turbo => "gpt-4-turbo",
1134            Self::Gpt4TurboVision => "gpt-4-turbo-vision",
1135            Self::Gpt41 => "gpt-4.1",
1136            Self::Gpt41Mini => "gpt-4.1-mini",
1137            Self::Gpt41Nano => "gpt-4.1-nano",
1138            Self::Gpt4o => "gpt-4o",
1139            Self::Gpt4oMini => "gpt-4o-mini",
1140            Self::Gpt5 => "gpt-5",
1141            Self::Gpt5Codex => "gpt-5-codex",
1142            Self::Gpt5Mini => "gpt-5-mini",
1143            Self::Gpt5Nano => "gpt-5-nano",
1144            Self::Gpt5Pro => "gpt-5-pro",
1145            Self::Gpt51 => "gpt-5.1",
1146            Self::Gpt51Codex => "gpt-5.1-codex",
1147            Self::Gpt51CodexMax => "gpt-5.1-codex-max",
1148            Self::Gpt51CodexMini => "gpt-5.1-codex-mini",
1149            Self::Gpt52 => "gpt-5.2",
1150            Self::Gpt52Codex => "gpt-5.2-codex",
1151            Self::Gpt53Codex => "gpt-5.3-codex",
1152            Self::Gpt54 => "gpt-5.4",
1153            Self::Gpt54Mini => "gpt-5.4-mini",
1154            Self::Gpt54Nano => "gpt-5.4-nano",
1155            Self::Gpt54Pro => "gpt-5.4-pro",
1156            Self::Gpt55 => "gpt-5.5",
1157            Self::Gpt56Luna => "gpt-5.6-luna",
1158            Self::Gpt56Sol => "gpt-5.6-sol",
1159            Self::Gpt56Terra => "gpt-5.6-terra",
1160            Self::Grok41FastNonReasoning => "grok-4-1-fast-non-reasoning",
1161            Self::Grok41FastReasoning => "grok-4-1-fast-reasoning",
1162            Self::Grok420NonReasoning => "grok-4-20-non-reasoning",
1163            Self::Grok420Reasoning => "grok-4-20-reasoning",
1164            Self::KimiK25 => "kimi-k2.5",
1165            Self::KimiK26 => "kimi-k2.6",
1166            Self::Llama3370bInstruct => "llama-3.3-70b-instruct",
1167            Self::Llama4Maverick17b128eInstructFp8 => {
1168                "llama-4-maverick-17b-128e-instruct-fp8"
1169            }
1170            Self::Llama4Scout17b16eInstruct => "llama-4-scout-17b-16e-instruct",
1171            Self::Ministral3b => "ministral-3b",
1172            Self::MistralMedium2505 => "mistral-medium-2505",
1173            Self::MistralSmall2503 => "mistral-small-2503",
1174            Self::ModelRouter => "model-router",
1175            Self::O1 => "o1",
1176            Self::O3 => "o3",
1177            Self::O3Mini => "o3-mini",
1178            Self::O4Mini => "o4-mini",
1179            Self::Phi4Mini => "phi-4-mini",
1180            Self::Phi4MiniReasoning => "phi-4-mini-reasoning",
1181        }
1182    }
1183    #[allow(clippy::too_many_lines)]
1184    fn display_name(self) -> &'static str {
1185        match self {
1186            Self::ClaudeFable5 => "Claude Fable 5",
1187            Self::ClaudeHaiku45 => "Claude Haiku 4.5",
1188            Self::ClaudeOpus41 => "Claude Opus 4.1",
1189            Self::ClaudeOpus45 => "Claude Opus 4.5",
1190            Self::ClaudeOpus46 => "Claude Opus 4.6",
1191            Self::ClaudeOpus48 => "Claude Opus 4.8",
1192            Self::ClaudeOpus5 => "Claude Opus 5",
1193            Self::ClaudeSonnet45 => "Claude Sonnet 4.5",
1194            Self::ClaudeSonnet46 => "Claude Sonnet 4.6",
1195            Self::ClaudeSonnet5 => "Claude Sonnet 5",
1196            Self::Codestral2501 => "Codestral 25.01",
1197            Self::CodexMini => "Codex Mini",
1198            Self::CohereCommandA => "Command A",
1199            Self::DeepseekV32 => "DeepSeek-V3.2",
1200            Self::Gpt4Turbo => "GPT-4 Turbo",
1201            Self::Gpt4TurboVision => "GPT-4 Turbo Vision",
1202            Self::Gpt41 => "GPT-4.1",
1203            Self::Gpt41Mini => "GPT-4.1 mini",
1204            Self::Gpt41Nano => "GPT-4.1 nano",
1205            Self::Gpt4o => "GPT-4o",
1206            Self::Gpt4oMini => "GPT-4o mini",
1207            Self::Gpt5 => "GPT-5",
1208            Self::Gpt5Mini => "GPT-5 Mini",
1209            Self::Gpt5Nano => "GPT-5 Nano",
1210            Self::Gpt5Pro => "GPT-5 Pro",
1211            Self::Gpt5Codex => "GPT-5-Codex",
1212            Self::Gpt51 => "GPT-5.1",
1213            Self::Gpt51Codex => "GPT-5.1 Codex",
1214            Self::Gpt51CodexMax => "GPT-5.1 Codex Max",
1215            Self::Gpt51CodexMini => "GPT-5.1 Codex Mini",
1216            Self::Gpt52 => "GPT-5.2",
1217            Self::Gpt52Codex => "GPT-5.2 Codex",
1218            Self::Gpt53Codex => "GPT-5.3 Codex",
1219            Self::Gpt54 => "GPT-5.4",
1220            Self::Gpt54Mini => "GPT-5.4 Mini",
1221            Self::Gpt54Nano => "GPT-5.4 Nano",
1222            Self::Gpt54Pro => "GPT-5.4 Pro",
1223            Self::Gpt55 => "GPT-5.5",
1224            Self::Gpt56Luna => "GPT-5.6 Luna",
1225            Self::Gpt56Sol => "GPT-5.6 Sol",
1226            Self::Gpt56Terra => "GPT-5.6 Terra",
1227            Self::Grok41FastNonReasoning => "Grok 4.1 Fast (Non-Reasoning)",
1228            Self::Grok41FastReasoning => "Grok 4.1 Fast (Reasoning)",
1229            Self::Grok420NonReasoning => "Grok 4.20 (Non-Reasoning)",
1230            Self::Grok420Reasoning => "Grok 4.20 (Reasoning)",
1231            Self::KimiK25 => "Kimi K2.5",
1232            Self::KimiK26 => "Kimi K2.6",
1233            Self::Llama4Maverick17b128eInstructFp8 => {
1234                "Llama 4 Maverick 17B 128E Instruct FP8"
1235            }
1236            Self::Llama4Scout17b16eInstruct => "Llama 4 Scout 17B 16E Instruct",
1237            Self::Llama3370bInstruct => "Llama-3.3-70B-Instruct",
1238            Self::Ministral3b => "Ministral 3B",
1239            Self::MistralMedium2505 => "Mistral Medium 3",
1240            Self::MistralSmall2503 => "Mistral Small 3.1",
1241            Self::ModelRouter => "Model Router",
1242            Self::Phi4Mini => "Phi-4-mini",
1243            Self::Phi4MiniReasoning => "Phi-4-mini-reasoning",
1244            Self::O1 => "o1",
1245            Self::O3 => "o3",
1246            Self::O3Mini => "o3-mini",
1247            Self::O4Mini => "o4-mini",
1248        }
1249    }
1250    #[allow(clippy::too_many_lines)]
1251    fn context_window(self) -> u32 {
1252        match self {
1253            Self::DeepseekV32
1254            | Self::Gpt4Turbo
1255            | Self::Gpt4TurboVision
1256            | Self::Gpt4o
1257            | Self::Gpt4oMini
1258            | Self::Grok41FastNonReasoning
1259            | Self::Grok41FastReasoning
1260            | Self::Llama3370bInstruct
1261            | Self::Llama4Scout17b16eInstruct
1262            | Self::Ministral3b
1263            | Self::MistralMedium2505
1264            | Self::MistralSmall2503
1265            | Self::Phi4Mini
1266            | Self::Phi4MiniReasoning => 128_000,
1267            Self::CohereCommandA => 131_072,
1268            Self::ClaudeHaiku45
1269            | Self::ClaudeOpus41
1270            | Self::ClaudeOpus45
1271            | Self::ClaudeSonnet45
1272            | Self::CodexMini
1273            | Self::ModelRouter
1274            | Self::O1
1275            | Self::O3
1276            | Self::O3Mini
1277            | Self::O4Mini => 200_000,
1278            Self::Codestral2501 => 256_000,
1279            Self::Grok420NonReasoning | Self::Grok420Reasoning => 262_000,
1280            Self::KimiK25 | Self::KimiK26 => 262_144,
1281            Self::Gpt5
1282            | Self::Gpt5Codex
1283            | Self::Gpt5Mini
1284            | Self::Gpt5Nano
1285            | Self::Gpt5Pro
1286            | Self::Gpt51
1287            | Self::Gpt51Codex
1288            | Self::Gpt51CodexMax
1289            | Self::Gpt51CodexMini
1290            | Self::Gpt52
1291            | Self::Gpt52Codex
1292            | Self::Gpt53Codex
1293            | Self::Gpt54Mini
1294            | Self::Gpt54Nano => 400_000,
1295            Self::ClaudeFable5
1296            | Self::ClaudeOpus46
1297            | Self::ClaudeOpus48
1298            | Self::ClaudeOpus5
1299            | Self::ClaudeSonnet46
1300            | Self::ClaudeSonnet5
1301            | Self::Llama4Maverick17b128eInstructFp8 => 1_000_000,
1302            Self::Gpt41 | Self::Gpt41Mini | Self::Gpt41Nano => 1_047_576,
1303            Self::Gpt54
1304            | Self::Gpt54Pro
1305            | Self::Gpt55
1306            | Self::Gpt56Luna
1307            | Self::Gpt56Sol
1308            | Self::Gpt56Terra => 1_050_000,
1309        }
1310    }
1311    #[allow(clippy::too_many_lines)]
1312    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
1313        match self {
1314            Self::Codestral2501
1315            | Self::Gpt4Turbo
1316            | Self::Gpt4TurboVision
1317            | Self::Gpt41
1318            | Self::Gpt41Mini
1319            | Self::Gpt41Nano
1320            | Self::Gpt4o
1321            | Self::Gpt4oMini
1322            | Self::Grok41FastNonReasoning
1323            | Self::Grok420NonReasoning
1324            | Self::Llama3370bInstruct
1325            | Self::Llama4Maverick17b128eInstructFp8
1326            | Self::Llama4Scout17b16eInstruct
1327            | Self::Ministral3b
1328            | Self::MistralMedium2505
1329            | Self::MistralSmall2503
1330            | Self::ModelRouter
1331            | Self::Phi4Mini => &[],
1332            Self::Gpt5Pro => &[ReasoningEffort::High],
1333            Self::ClaudeHaiku45
1334            | Self::ClaudeOpus41
1335            | Self::ClaudeOpus45
1336            | Self::ClaudeSonnet45
1337            | Self::CodexMini
1338            | Self::CohereCommandA
1339            | Self::DeepseekV32
1340            | Self::Gpt5Codex
1341            | Self::Gpt51
1342            | Self::Gpt51Codex
1343            | Self::Gpt51CodexMini
1344            | Self::Grok41FastReasoning
1345            | Self::Grok420Reasoning
1346            | Self::KimiK25
1347            | Self::KimiK26
1348            | Self::O1
1349            | Self::O3
1350            | Self::O3Mini
1351            | Self::O4Mini
1352            | Self::Phi4MiniReasoning => {
1353                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
1354            }
1355            Self::ClaudeOpus46 | Self::ClaudeSonnet46 => {
1356                &[
1357                    ReasoningEffort::Low,
1358                    ReasoningEffort::Medium,
1359                    ReasoningEffort::High,
1360                    ReasoningEffort::Max,
1361                ]
1362            }
1363            Self::Gpt51CodexMax
1364            | Self::Gpt52
1365            | Self::Gpt52Codex
1366            | Self::Gpt53Codex
1367            | Self::Gpt54
1368            | Self::Gpt54Mini
1369            | Self::Gpt54Nano
1370            | Self::Gpt55 => {
1371                &[
1372                    ReasoningEffort::Low,
1373                    ReasoningEffort::Medium,
1374                    ReasoningEffort::High,
1375                    ReasoningEffort::Xhigh,
1376                ]
1377            }
1378            Self::ClaudeFable5
1379            | Self::ClaudeOpus48
1380            | Self::ClaudeOpus5
1381            | Self::ClaudeSonnet5
1382            | Self::Gpt56Luna
1383            | Self::Gpt56Sol
1384            | Self::Gpt56Terra => {
1385                &[
1386                    ReasoningEffort::Low,
1387                    ReasoningEffort::Medium,
1388                    ReasoningEffort::High,
1389                    ReasoningEffort::Xhigh,
1390                    ReasoningEffort::Max,
1391                ]
1392            }
1393            Self::Gpt54Pro => {
1394                &[ReasoningEffort::Medium, ReasoningEffort::High, ReasoningEffort::Xhigh]
1395            }
1396            Self::Gpt5 | Self::Gpt5Mini | Self::Gpt5Nano => {
1397                &[
1398                    ReasoningEffort::Minimal,
1399                    ReasoningEffort::Low,
1400                    ReasoningEffort::Medium,
1401                    ReasoningEffort::High,
1402                ]
1403            }
1404        }
1405    }
1406    pub fn supports_reasoning(self) -> bool {
1407        !self.reasoning_levels().is_empty()
1408    }
1409    #[allow(clippy::too_many_lines)]
1410    pub fn supports_prompt_caching(self) -> bool {
1411        match self {
1412            Self::Codestral2501
1413            | Self::CohereCommandA
1414            | Self::DeepseekV32
1415            | Self::Gpt4Turbo
1416            | Self::Gpt4TurboVision
1417            | Self::Gpt5Pro
1418            | Self::Gpt54Pro
1419            | Self::Grok420NonReasoning
1420            | Self::Grok420Reasoning
1421            | Self::KimiK25
1422            | Self::KimiK26
1423            | Self::Llama3370bInstruct
1424            | Self::Llama4Maverick17b128eInstructFp8
1425            | Self::Llama4Scout17b16eInstruct
1426            | Self::Ministral3b
1427            | Self::MistralMedium2505
1428            | Self::MistralSmall2503
1429            | Self::ModelRouter
1430            | Self::Phi4Mini
1431            | Self::Phi4MiniReasoning => false,
1432            Self::ClaudeFable5
1433            | Self::ClaudeHaiku45
1434            | Self::ClaudeOpus41
1435            | Self::ClaudeOpus45
1436            | Self::ClaudeOpus46
1437            | Self::ClaudeOpus48
1438            | Self::ClaudeOpus5
1439            | Self::ClaudeSonnet45
1440            | Self::ClaudeSonnet46
1441            | Self::ClaudeSonnet5
1442            | Self::CodexMini
1443            | Self::Gpt41
1444            | Self::Gpt41Mini
1445            | Self::Gpt41Nano
1446            | Self::Gpt4o
1447            | Self::Gpt4oMini
1448            | Self::Gpt5
1449            | Self::Gpt5Codex
1450            | Self::Gpt5Mini
1451            | Self::Gpt5Nano
1452            | Self::Gpt51
1453            | Self::Gpt51Codex
1454            | Self::Gpt51CodexMax
1455            | Self::Gpt51CodexMini
1456            | Self::Gpt52
1457            | Self::Gpt52Codex
1458            | Self::Gpt53Codex
1459            | Self::Gpt54
1460            | Self::Gpt54Mini
1461            | Self::Gpt54Nano
1462            | Self::Gpt55
1463            | Self::Gpt56Luna
1464            | Self::Gpt56Sol
1465            | Self::Gpt56Terra
1466            | Self::Grok41FastNonReasoning
1467            | Self::Grok41FastReasoning
1468            | Self::O1
1469            | Self::O3
1470            | Self::O3Mini
1471            | Self::O4Mini => true,
1472        }
1473    }
1474    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
1475    pub fn pricing(self) -> Option<ModelPricing> {
1476        match self {
1477            Self::ClaudeFable5 => {
1478                Some(ModelPricing {
1479                    input_per_million: 10f64,
1480                    output_per_million: 50f64,
1481                    cache_read_per_million: Some(1f64),
1482                    cache_write_per_million: Some(12.5f64),
1483                })
1484            }
1485            Self::ClaudeHaiku45 => {
1486                Some(ModelPricing {
1487                    input_per_million: 1f64,
1488                    output_per_million: 5f64,
1489                    cache_read_per_million: Some(0.1f64),
1490                    cache_write_per_million: Some(1.25f64),
1491                })
1492            }
1493            Self::ClaudeOpus41 => {
1494                Some(ModelPricing {
1495                    input_per_million: 15f64,
1496                    output_per_million: 75f64,
1497                    cache_read_per_million: Some(1.5f64),
1498                    cache_write_per_million: Some(18.75f64),
1499                })
1500            }
1501            Self::ClaudeOpus45 => {
1502                Some(ModelPricing {
1503                    input_per_million: 5f64,
1504                    output_per_million: 25f64,
1505                    cache_read_per_million: Some(0.5f64),
1506                    cache_write_per_million: Some(6.25f64),
1507                })
1508            }
1509            Self::ClaudeOpus46 => {
1510                Some(ModelPricing {
1511                    input_per_million: 5f64,
1512                    output_per_million: 25f64,
1513                    cache_read_per_million: Some(0.5f64),
1514                    cache_write_per_million: Some(6.25f64),
1515                })
1516            }
1517            Self::ClaudeOpus48 => {
1518                Some(ModelPricing {
1519                    input_per_million: 5f64,
1520                    output_per_million: 25f64,
1521                    cache_read_per_million: Some(0.5f64),
1522                    cache_write_per_million: Some(6.25f64),
1523                })
1524            }
1525            Self::ClaudeOpus5 => {
1526                Some(ModelPricing {
1527                    input_per_million: 5f64,
1528                    output_per_million: 25f64,
1529                    cache_read_per_million: Some(0.5f64),
1530                    cache_write_per_million: Some(6.25f64),
1531                })
1532            }
1533            Self::ClaudeSonnet45 => {
1534                Some(ModelPricing {
1535                    input_per_million: 3f64,
1536                    output_per_million: 15f64,
1537                    cache_read_per_million: Some(0.3f64),
1538                    cache_write_per_million: Some(3.75f64),
1539                })
1540            }
1541            Self::ClaudeSonnet46 => {
1542                Some(ModelPricing {
1543                    input_per_million: 3f64,
1544                    output_per_million: 15f64,
1545                    cache_read_per_million: Some(0.3f64),
1546                    cache_write_per_million: Some(3.75f64),
1547                })
1548            }
1549            Self::ClaudeSonnet5 => {
1550                Some(ModelPricing {
1551                    input_per_million: 2f64,
1552                    output_per_million: 10f64,
1553                    cache_read_per_million: Some(0.2f64),
1554                    cache_write_per_million: Some(2.5f64),
1555                })
1556            }
1557            Self::Codestral2501 => {
1558                Some(ModelPricing {
1559                    input_per_million: 0.3f64,
1560                    output_per_million: 0.9f64,
1561                    cache_read_per_million: None,
1562                    cache_write_per_million: None,
1563                })
1564            }
1565            Self::CodexMini => {
1566                Some(ModelPricing {
1567                    input_per_million: 1.5f64,
1568                    output_per_million: 6f64,
1569                    cache_read_per_million: Some(0.375f64),
1570                    cache_write_per_million: None,
1571                })
1572            }
1573            Self::CohereCommandA => {
1574                Some(ModelPricing {
1575                    input_per_million: 2.5f64,
1576                    output_per_million: 10f64,
1577                    cache_read_per_million: None,
1578                    cache_write_per_million: None,
1579                })
1580            }
1581            Self::DeepseekV32 => {
1582                Some(ModelPricing {
1583                    input_per_million: 0.58f64,
1584                    output_per_million: 1.68f64,
1585                    cache_read_per_million: None,
1586                    cache_write_per_million: None,
1587                })
1588            }
1589            Self::Gpt4Turbo => {
1590                Some(ModelPricing {
1591                    input_per_million: 10f64,
1592                    output_per_million: 30f64,
1593                    cache_read_per_million: None,
1594                    cache_write_per_million: None,
1595                })
1596            }
1597            Self::Gpt4TurboVision => {
1598                Some(ModelPricing {
1599                    input_per_million: 10f64,
1600                    output_per_million: 30f64,
1601                    cache_read_per_million: None,
1602                    cache_write_per_million: None,
1603                })
1604            }
1605            Self::Gpt41 => {
1606                Some(ModelPricing {
1607                    input_per_million: 2f64,
1608                    output_per_million: 8f64,
1609                    cache_read_per_million: Some(0.5f64),
1610                    cache_write_per_million: None,
1611                })
1612            }
1613            Self::Gpt41Mini => {
1614                Some(ModelPricing {
1615                    input_per_million: 0.4f64,
1616                    output_per_million: 1.6f64,
1617                    cache_read_per_million: Some(0.1f64),
1618                    cache_write_per_million: None,
1619                })
1620            }
1621            Self::Gpt41Nano => {
1622                Some(ModelPricing {
1623                    input_per_million: 0.1f64,
1624                    output_per_million: 0.4f64,
1625                    cache_read_per_million: Some(0.025f64),
1626                    cache_write_per_million: None,
1627                })
1628            }
1629            Self::Gpt4o => {
1630                Some(ModelPricing {
1631                    input_per_million: 2.5f64,
1632                    output_per_million: 10f64,
1633                    cache_read_per_million: Some(1.25f64),
1634                    cache_write_per_million: None,
1635                })
1636            }
1637            Self::Gpt4oMini => {
1638                Some(ModelPricing {
1639                    input_per_million: 0.15f64,
1640                    output_per_million: 0.6f64,
1641                    cache_read_per_million: Some(0.075f64),
1642                    cache_write_per_million: None,
1643                })
1644            }
1645            Self::Gpt5 => {
1646                Some(ModelPricing {
1647                    input_per_million: 1.25f64,
1648                    output_per_million: 10f64,
1649                    cache_read_per_million: Some(0.13f64),
1650                    cache_write_per_million: None,
1651                })
1652            }
1653            Self::Gpt5Codex => {
1654                Some(ModelPricing {
1655                    input_per_million: 1.25f64,
1656                    output_per_million: 10f64,
1657                    cache_read_per_million: Some(0.13f64),
1658                    cache_write_per_million: None,
1659                })
1660            }
1661            Self::Gpt5Mini => {
1662                Some(ModelPricing {
1663                    input_per_million: 0.25f64,
1664                    output_per_million: 2f64,
1665                    cache_read_per_million: Some(0.03f64),
1666                    cache_write_per_million: None,
1667                })
1668            }
1669            Self::Gpt5Nano => {
1670                Some(ModelPricing {
1671                    input_per_million: 0.05f64,
1672                    output_per_million: 0.4f64,
1673                    cache_read_per_million: Some(0.01f64),
1674                    cache_write_per_million: None,
1675                })
1676            }
1677            Self::Gpt5Pro => {
1678                Some(ModelPricing {
1679                    input_per_million: 15f64,
1680                    output_per_million: 120f64,
1681                    cache_read_per_million: None,
1682                    cache_write_per_million: None,
1683                })
1684            }
1685            Self::Gpt51 => {
1686                Some(ModelPricing {
1687                    input_per_million: 1.25f64,
1688                    output_per_million: 10f64,
1689                    cache_read_per_million: Some(0.125f64),
1690                    cache_write_per_million: None,
1691                })
1692            }
1693            Self::Gpt51Codex => {
1694                Some(ModelPricing {
1695                    input_per_million: 1.25f64,
1696                    output_per_million: 10f64,
1697                    cache_read_per_million: Some(0.125f64),
1698                    cache_write_per_million: None,
1699                })
1700            }
1701            Self::Gpt51CodexMax => {
1702                Some(ModelPricing {
1703                    input_per_million: 1.25f64,
1704                    output_per_million: 10f64,
1705                    cache_read_per_million: Some(0.125f64),
1706                    cache_write_per_million: None,
1707                })
1708            }
1709            Self::Gpt51CodexMini => {
1710                Some(ModelPricing {
1711                    input_per_million: 0.25f64,
1712                    output_per_million: 2f64,
1713                    cache_read_per_million: Some(0.025f64),
1714                    cache_write_per_million: None,
1715                })
1716            }
1717            Self::Gpt52 => {
1718                Some(ModelPricing {
1719                    input_per_million: 1.75f64,
1720                    output_per_million: 14f64,
1721                    cache_read_per_million: Some(0.125f64),
1722                    cache_write_per_million: None,
1723                })
1724            }
1725            Self::Gpt52Codex => {
1726                Some(ModelPricing {
1727                    input_per_million: 1.75f64,
1728                    output_per_million: 14f64,
1729                    cache_read_per_million: Some(0.175f64),
1730                    cache_write_per_million: None,
1731                })
1732            }
1733            Self::Gpt53Codex => {
1734                Some(ModelPricing {
1735                    input_per_million: 1.75f64,
1736                    output_per_million: 14f64,
1737                    cache_read_per_million: Some(0.175f64),
1738                    cache_write_per_million: None,
1739                })
1740            }
1741            Self::Gpt54 => {
1742                Some(ModelPricing {
1743                    input_per_million: 2.5f64,
1744                    output_per_million: 15f64,
1745                    cache_read_per_million: Some(0.25f64),
1746                    cache_write_per_million: None,
1747                })
1748            }
1749            Self::Gpt54Mini => {
1750                Some(ModelPricing {
1751                    input_per_million: 0.75f64,
1752                    output_per_million: 4.5f64,
1753                    cache_read_per_million: Some(0.075f64),
1754                    cache_write_per_million: None,
1755                })
1756            }
1757            Self::Gpt54Nano => {
1758                Some(ModelPricing {
1759                    input_per_million: 0.2f64,
1760                    output_per_million: 1.25f64,
1761                    cache_read_per_million: Some(0.02f64),
1762                    cache_write_per_million: None,
1763                })
1764            }
1765            Self::Gpt54Pro => {
1766                Some(ModelPricing {
1767                    input_per_million: 30f64,
1768                    output_per_million: 180f64,
1769                    cache_read_per_million: None,
1770                    cache_write_per_million: None,
1771                })
1772            }
1773            Self::Gpt55 => {
1774                Some(ModelPricing {
1775                    input_per_million: 5f64,
1776                    output_per_million: 30f64,
1777                    cache_read_per_million: Some(0.5f64),
1778                    cache_write_per_million: None,
1779                })
1780            }
1781            Self::Gpt56Luna => {
1782                Some(ModelPricing {
1783                    input_per_million: 1f64,
1784                    output_per_million: 6f64,
1785                    cache_read_per_million: Some(0.1f64),
1786                    cache_write_per_million: Some(1.25f64),
1787                })
1788            }
1789            Self::Gpt56Sol => {
1790                Some(ModelPricing {
1791                    input_per_million: 5f64,
1792                    output_per_million: 30f64,
1793                    cache_read_per_million: Some(0.5f64),
1794                    cache_write_per_million: None,
1795                })
1796            }
1797            Self::Gpt56Terra => {
1798                Some(ModelPricing {
1799                    input_per_million: 2.5f64,
1800                    output_per_million: 15f64,
1801                    cache_read_per_million: Some(0.25f64),
1802                    cache_write_per_million: Some(3.125f64),
1803                })
1804            }
1805            Self::Grok41FastNonReasoning => {
1806                Some(ModelPricing {
1807                    input_per_million: 0.2f64,
1808                    output_per_million: 0.5f64,
1809                    cache_read_per_million: Some(0.05f64),
1810                    cache_write_per_million: None,
1811                })
1812            }
1813            Self::Grok41FastReasoning => {
1814                Some(ModelPricing {
1815                    input_per_million: 0.2f64,
1816                    output_per_million: 0.5f64,
1817                    cache_read_per_million: Some(0.05f64),
1818                    cache_write_per_million: None,
1819                })
1820            }
1821            Self::Grok420NonReasoning => {
1822                Some(ModelPricing {
1823                    input_per_million: 2f64,
1824                    output_per_million: 6f64,
1825                    cache_read_per_million: None,
1826                    cache_write_per_million: None,
1827                })
1828            }
1829            Self::Grok420Reasoning => {
1830                Some(ModelPricing {
1831                    input_per_million: 2f64,
1832                    output_per_million: 6f64,
1833                    cache_read_per_million: None,
1834                    cache_write_per_million: None,
1835                })
1836            }
1837            Self::KimiK25 => {
1838                Some(ModelPricing {
1839                    input_per_million: 0.6f64,
1840                    output_per_million: 3f64,
1841                    cache_read_per_million: None,
1842                    cache_write_per_million: None,
1843                })
1844            }
1845            Self::KimiK26 => {
1846                Some(ModelPricing {
1847                    input_per_million: 0.95f64,
1848                    output_per_million: 4f64,
1849                    cache_read_per_million: None,
1850                    cache_write_per_million: None,
1851                })
1852            }
1853            Self::Llama3370bInstruct => {
1854                Some(ModelPricing {
1855                    input_per_million: 0.71f64,
1856                    output_per_million: 0.71f64,
1857                    cache_read_per_million: None,
1858                    cache_write_per_million: None,
1859                })
1860            }
1861            Self::Llama4Maverick17b128eInstructFp8 => {
1862                Some(ModelPricing {
1863                    input_per_million: 0.25f64,
1864                    output_per_million: 1f64,
1865                    cache_read_per_million: None,
1866                    cache_write_per_million: None,
1867                })
1868            }
1869            Self::Llama4Scout17b16eInstruct => {
1870                Some(ModelPricing {
1871                    input_per_million: 0.2f64,
1872                    output_per_million: 0.78f64,
1873                    cache_read_per_million: None,
1874                    cache_write_per_million: None,
1875                })
1876            }
1877            Self::Ministral3b => {
1878                Some(ModelPricing {
1879                    input_per_million: 0.04f64,
1880                    output_per_million: 0.04f64,
1881                    cache_read_per_million: None,
1882                    cache_write_per_million: None,
1883                })
1884            }
1885            Self::MistralMedium2505 => {
1886                Some(ModelPricing {
1887                    input_per_million: 0.4f64,
1888                    output_per_million: 2f64,
1889                    cache_read_per_million: None,
1890                    cache_write_per_million: None,
1891                })
1892            }
1893            Self::MistralSmall2503 => {
1894                Some(ModelPricing {
1895                    input_per_million: 0.1f64,
1896                    output_per_million: 0.3f64,
1897                    cache_read_per_million: None,
1898                    cache_write_per_million: None,
1899                })
1900            }
1901            Self::ModelRouter => {
1902                Some(ModelPricing {
1903                    input_per_million: 0.14f64,
1904                    output_per_million: 0f64,
1905                    cache_read_per_million: None,
1906                    cache_write_per_million: None,
1907                })
1908            }
1909            Self::O1 => {
1910                Some(ModelPricing {
1911                    input_per_million: 15f64,
1912                    output_per_million: 60f64,
1913                    cache_read_per_million: Some(7.5f64),
1914                    cache_write_per_million: None,
1915                })
1916            }
1917            Self::O3 => {
1918                Some(ModelPricing {
1919                    input_per_million: 2f64,
1920                    output_per_million: 8f64,
1921                    cache_read_per_million: Some(0.5f64),
1922                    cache_write_per_million: None,
1923                })
1924            }
1925            Self::O3Mini => {
1926                Some(ModelPricing {
1927                    input_per_million: 1.1f64,
1928                    output_per_million: 4.4f64,
1929                    cache_read_per_million: Some(0.55f64),
1930                    cache_write_per_million: None,
1931                })
1932            }
1933            Self::O4Mini => {
1934                Some(ModelPricing {
1935                    input_per_million: 1.1f64,
1936                    output_per_million: 4.4f64,
1937                    cache_read_per_million: Some(0.275f64),
1938                    cache_write_per_million: None,
1939                })
1940            }
1941            Self::Phi4Mini => {
1942                Some(ModelPricing {
1943                    input_per_million: 0.075f64,
1944                    output_per_million: 0.3f64,
1945                    cache_read_per_million: None,
1946                    cache_write_per_million: None,
1947                })
1948            }
1949            Self::Phi4MiniReasoning => {
1950                Some(ModelPricing {
1951                    input_per_million: 0.075f64,
1952                    output_per_million: 0.3f64,
1953                    cache_read_per_million: None,
1954                    cache_write_per_million: None,
1955                })
1956            }
1957        }
1958    }
1959    #[allow(clippy::too_many_lines)]
1960    pub fn supports_image(self) -> bool {
1961        match self {
1962            Self::Codestral2501
1963            | Self::CodexMini
1964            | Self::CohereCommandA
1965            | Self::DeepseekV32
1966            | Self::Grok420NonReasoning
1967            | Self::Grok420Reasoning
1968            | Self::Llama3370bInstruct
1969            | Self::Ministral3b
1970            | Self::O3Mini
1971            | Self::Phi4Mini
1972            | Self::Phi4MiniReasoning => false,
1973            Self::ClaudeFable5
1974            | Self::ClaudeHaiku45
1975            | Self::ClaudeOpus41
1976            | Self::ClaudeOpus45
1977            | Self::ClaudeOpus46
1978            | Self::ClaudeOpus48
1979            | Self::ClaudeOpus5
1980            | Self::ClaudeSonnet45
1981            | Self::ClaudeSonnet46
1982            | Self::ClaudeSonnet5
1983            | Self::Gpt4Turbo
1984            | Self::Gpt4TurboVision
1985            | Self::Gpt41
1986            | Self::Gpt41Mini
1987            | Self::Gpt41Nano
1988            | Self::Gpt4o
1989            | Self::Gpt4oMini
1990            | Self::Gpt5
1991            | Self::Gpt5Codex
1992            | Self::Gpt5Mini
1993            | Self::Gpt5Nano
1994            | Self::Gpt5Pro
1995            | Self::Gpt51
1996            | Self::Gpt51Codex
1997            | Self::Gpt51CodexMax
1998            | Self::Gpt51CodexMini
1999            | Self::Gpt52
2000            | Self::Gpt52Codex
2001            | Self::Gpt53Codex
2002            | Self::Gpt54
2003            | Self::Gpt54Mini
2004            | Self::Gpt54Nano
2005            | Self::Gpt54Pro
2006            | Self::Gpt55
2007            | Self::Gpt56Luna
2008            | Self::Gpt56Sol
2009            | Self::Gpt56Terra
2010            | Self::Grok41FastNonReasoning
2011            | Self::Grok41FastReasoning
2012            | Self::KimiK25
2013            | Self::KimiK26
2014            | Self::Llama4Maverick17b128eInstructFp8
2015            | Self::Llama4Scout17b16eInstruct
2016            | Self::MistralMedium2505
2017            | Self::MistralSmall2503
2018            | Self::ModelRouter
2019            | Self::O1
2020            | Self::O3
2021            | Self::O4Mini => true,
2022        }
2023    }
2024    #[allow(clippy::too_many_lines)]
2025    pub fn supports_audio(self) -> bool {
2026        match self {
2027            Self::ClaudeFable5
2028            | Self::ClaudeHaiku45
2029            | Self::ClaudeOpus41
2030            | Self::ClaudeOpus45
2031            | Self::ClaudeOpus46
2032            | Self::ClaudeOpus48
2033            | Self::ClaudeOpus5
2034            | Self::ClaudeSonnet45
2035            | Self::ClaudeSonnet46
2036            | Self::ClaudeSonnet5
2037            | Self::Codestral2501
2038            | Self::CodexMini
2039            | Self::CohereCommandA
2040            | Self::DeepseekV32
2041            | Self::Gpt4Turbo
2042            | Self::Gpt4TurboVision
2043            | Self::Gpt41
2044            | Self::Gpt41Mini
2045            | Self::Gpt41Nano
2046            | Self::Gpt4o
2047            | Self::Gpt4oMini
2048            | Self::Gpt5
2049            | Self::Gpt5Codex
2050            | Self::Gpt5Mini
2051            | Self::Gpt5Nano
2052            | Self::Gpt5Pro
2053            | Self::Gpt51CodexMax
2054            | Self::Gpt51CodexMini
2055            | Self::Gpt52
2056            | Self::Gpt52Codex
2057            | Self::Gpt53Codex
2058            | Self::Gpt54
2059            | Self::Gpt54Mini
2060            | Self::Gpt54Nano
2061            | Self::Gpt54Pro
2062            | Self::Gpt55
2063            | Self::Gpt56Luna
2064            | Self::Gpt56Sol
2065            | Self::Gpt56Terra
2066            | Self::Grok41FastNonReasoning
2067            | Self::Grok41FastReasoning
2068            | Self::Grok420NonReasoning
2069            | Self::Grok420Reasoning
2070            | Self::KimiK25
2071            | Self::KimiK26
2072            | Self::Llama3370bInstruct
2073            | Self::Llama4Maverick17b128eInstructFp8
2074            | Self::Llama4Scout17b16eInstruct
2075            | Self::Ministral3b
2076            | Self::MistralMedium2505
2077            | Self::MistralSmall2503
2078            | Self::ModelRouter
2079            | Self::O1
2080            | Self::O3
2081            | Self::O3Mini
2082            | Self::O4Mini
2083            | Self::Phi4Mini
2084            | Self::Phi4MiniReasoning => false,
2085            Self::Gpt51 | Self::Gpt51Codex => true,
2086        }
2087    }
2088    #[allow(clippy::too_many_lines)]
2089    pub fn transport(self) -> Option<ModelTransport> {
2090        match self {
2091            Self::ClaudeFable5
2092            | Self::ClaudeHaiku45
2093            | Self::ClaudeOpus41
2094            | Self::ClaudeOpus45
2095            | Self::ClaudeOpus46
2096            | Self::ClaudeOpus48
2097            | Self::ClaudeOpus5
2098            | Self::ClaudeSonnet45
2099            | Self::ClaudeSonnet46
2100            | Self::ClaudeSonnet5
2101            | Self::Codestral2501
2102            | Self::CodexMini
2103            | Self::CohereCommandA
2104            | Self::DeepseekV32
2105            | Self::Gpt4Turbo
2106            | Self::Gpt4TurboVision
2107            | Self::Gpt41
2108            | Self::Gpt41Mini
2109            | Self::Gpt41Nano
2110            | Self::Gpt4o
2111            | Self::Gpt4oMini
2112            | Self::Gpt5
2113            | Self::Gpt5Codex
2114            | Self::Gpt5Mini
2115            | Self::Gpt5Nano
2116            | Self::Gpt5Pro
2117            | Self::Gpt51
2118            | Self::Gpt51Codex
2119            | Self::Gpt51CodexMax
2120            | Self::Gpt51CodexMini
2121            | Self::Gpt52
2122            | Self::Gpt52Codex
2123            | Self::Gpt53Codex
2124            | Self::Gpt54
2125            | Self::Gpt54Mini
2126            | Self::Gpt54Nano
2127            | Self::Gpt54Pro
2128            | Self::Gpt55
2129            | Self::Gpt56Luna
2130            | Self::Gpt56Sol
2131            | Self::Gpt56Terra
2132            | Self::Grok41FastNonReasoning
2133            | Self::Grok41FastReasoning
2134            | Self::Grok420NonReasoning
2135            | Self::Grok420Reasoning
2136            | Self::KimiK25
2137            | Self::KimiK26
2138            | Self::Llama3370bInstruct
2139            | Self::Llama4Maverick17b128eInstructFp8
2140            | Self::Llama4Scout17b16eInstruct
2141            | Self::Ministral3b
2142            | Self::MistralMedium2505
2143            | Self::MistralSmall2503
2144            | Self::ModelRouter
2145            | Self::O1
2146            | Self::O3
2147            | Self::O3Mini
2148            | Self::O4Mini
2149            | Self::Phi4Mini
2150            | Self::Phi4MiniReasoning => None,
2151        }
2152    }
2153    const ALL: &[AzureFoundryModel] = &[
2154        Self::ClaudeFable5,
2155        Self::ClaudeHaiku45,
2156        Self::ClaudeOpus41,
2157        Self::ClaudeOpus45,
2158        Self::ClaudeOpus46,
2159        Self::ClaudeOpus48,
2160        Self::ClaudeOpus5,
2161        Self::ClaudeSonnet45,
2162        Self::ClaudeSonnet46,
2163        Self::ClaudeSonnet5,
2164        Self::Codestral2501,
2165        Self::CodexMini,
2166        Self::CohereCommandA,
2167        Self::DeepseekV32,
2168        Self::Gpt4Turbo,
2169        Self::Gpt4TurboVision,
2170        Self::Gpt41,
2171        Self::Gpt41Mini,
2172        Self::Gpt41Nano,
2173        Self::Gpt4o,
2174        Self::Gpt4oMini,
2175        Self::Gpt5,
2176        Self::Gpt5Codex,
2177        Self::Gpt5Mini,
2178        Self::Gpt5Nano,
2179        Self::Gpt5Pro,
2180        Self::Gpt51,
2181        Self::Gpt51Codex,
2182        Self::Gpt51CodexMax,
2183        Self::Gpt51CodexMini,
2184        Self::Gpt52,
2185        Self::Gpt52Codex,
2186        Self::Gpt53Codex,
2187        Self::Gpt54,
2188        Self::Gpt54Mini,
2189        Self::Gpt54Nano,
2190        Self::Gpt54Pro,
2191        Self::Gpt55,
2192        Self::Gpt56Luna,
2193        Self::Gpt56Sol,
2194        Self::Gpt56Terra,
2195        Self::Grok41FastNonReasoning,
2196        Self::Grok41FastReasoning,
2197        Self::Grok420NonReasoning,
2198        Self::Grok420Reasoning,
2199        Self::KimiK25,
2200        Self::KimiK26,
2201        Self::Llama3370bInstruct,
2202        Self::Llama4Maverick17b128eInstructFp8,
2203        Self::Llama4Scout17b16eInstruct,
2204        Self::Ministral3b,
2205        Self::MistralMedium2505,
2206        Self::MistralSmall2503,
2207        Self::ModelRouter,
2208        Self::O1,
2209        Self::O3,
2210        Self::O3Mini,
2211        Self::O4Mini,
2212        Self::Phi4Mini,
2213        Self::Phi4MiniReasoning,
2214    ];
2215}
2216impl std::str::FromStr for AzureFoundryModel {
2217    type Err = String;
2218    #[allow(clippy::too_many_lines)]
2219    fn from_str(s: &str) -> Result<Self, Self::Err> {
2220        match s {
2221            "claude-fable-5" => Ok(Self::ClaudeFable5),
2222            "claude-haiku-4-5" => Ok(Self::ClaudeHaiku45),
2223            "claude-opus-4-1" => Ok(Self::ClaudeOpus41),
2224            "claude-opus-4-5" => Ok(Self::ClaudeOpus45),
2225            "claude-opus-4-6" => Ok(Self::ClaudeOpus46),
2226            "claude-opus-4-8" => Ok(Self::ClaudeOpus48),
2227            "claude-opus-5" => Ok(Self::ClaudeOpus5),
2228            "claude-sonnet-4-5" => Ok(Self::ClaudeSonnet45),
2229            "claude-sonnet-4-6" => Ok(Self::ClaudeSonnet46),
2230            "claude-sonnet-5" => Ok(Self::ClaudeSonnet5),
2231            "codestral-2501" => Ok(Self::Codestral2501),
2232            "codex-mini" => Ok(Self::CodexMini),
2233            "cohere-command-a" => Ok(Self::CohereCommandA),
2234            "deepseek-v3.2" => Ok(Self::DeepseekV32),
2235            "gpt-4-turbo" => Ok(Self::Gpt4Turbo),
2236            "gpt-4-turbo-vision" => Ok(Self::Gpt4TurboVision),
2237            "gpt-4.1" => Ok(Self::Gpt41),
2238            "gpt-4.1-mini" => Ok(Self::Gpt41Mini),
2239            "gpt-4.1-nano" => Ok(Self::Gpt41Nano),
2240            "gpt-4o" => Ok(Self::Gpt4o),
2241            "gpt-4o-mini" => Ok(Self::Gpt4oMini),
2242            "gpt-5" => Ok(Self::Gpt5),
2243            "gpt-5-codex" => Ok(Self::Gpt5Codex),
2244            "gpt-5-mini" => Ok(Self::Gpt5Mini),
2245            "gpt-5-nano" => Ok(Self::Gpt5Nano),
2246            "gpt-5-pro" => Ok(Self::Gpt5Pro),
2247            "gpt-5.1" => Ok(Self::Gpt51),
2248            "gpt-5.1-codex" => Ok(Self::Gpt51Codex),
2249            "gpt-5.1-codex-max" => Ok(Self::Gpt51CodexMax),
2250            "gpt-5.1-codex-mini" => Ok(Self::Gpt51CodexMini),
2251            "gpt-5.2" => Ok(Self::Gpt52),
2252            "gpt-5.2-codex" => Ok(Self::Gpt52Codex),
2253            "gpt-5.3-codex" => Ok(Self::Gpt53Codex),
2254            "gpt-5.4" => Ok(Self::Gpt54),
2255            "gpt-5.4-mini" => Ok(Self::Gpt54Mini),
2256            "gpt-5.4-nano" => Ok(Self::Gpt54Nano),
2257            "gpt-5.4-pro" => Ok(Self::Gpt54Pro),
2258            "gpt-5.5" => Ok(Self::Gpt55),
2259            "gpt-5.6-luna" => Ok(Self::Gpt56Luna),
2260            "gpt-5.6-sol" => Ok(Self::Gpt56Sol),
2261            "gpt-5.6-terra" => Ok(Self::Gpt56Terra),
2262            "grok-4-1-fast-non-reasoning" => Ok(Self::Grok41FastNonReasoning),
2263            "grok-4-1-fast-reasoning" => Ok(Self::Grok41FastReasoning),
2264            "grok-4-20-non-reasoning" => Ok(Self::Grok420NonReasoning),
2265            "grok-4-20-reasoning" => Ok(Self::Grok420Reasoning),
2266            "kimi-k2.5" => Ok(Self::KimiK25),
2267            "kimi-k2.6" => Ok(Self::KimiK26),
2268            "llama-3.3-70b-instruct" => Ok(Self::Llama3370bInstruct),
2269            "llama-4-maverick-17b-128e-instruct-fp8" => {
2270                Ok(Self::Llama4Maverick17b128eInstructFp8)
2271            }
2272            "llama-4-scout-17b-16e-instruct" => Ok(Self::Llama4Scout17b16eInstruct),
2273            "ministral-3b" => Ok(Self::Ministral3b),
2274            "mistral-medium-2505" => Ok(Self::MistralMedium2505),
2275            "mistral-small-2503" => Ok(Self::MistralSmall2503),
2276            "model-router" => Ok(Self::ModelRouter),
2277            "o1" => Ok(Self::O1),
2278            "o3" => Ok(Self::O3),
2279            "o3-mini" => Ok(Self::O3Mini),
2280            "o4-mini" => Ok(Self::O4Mini),
2281            "phi-4-mini" => Ok(Self::Phi4Mini),
2282            "phi-4-mini-reasoning" => Ok(Self::Phi4MiniReasoning),
2283            _ => Err(format!("Unknown azure-foundry model: '{s}'")),
2284        }
2285    }
2286}
2287impl CodexModel {
2288    #[allow(clippy::too_many_lines)]
2289    fn model_id(self) -> &'static str {
2290        match self {
2291            Self::Gpt52 => "gpt-5.2",
2292            Self::Gpt54 => "gpt-5.4",
2293            Self::Gpt54Mini => "gpt-5.4-mini",
2294            Self::Gpt55 => "gpt-5.5",
2295            Self::Gpt56Luna => "gpt-5.6-luna",
2296            Self::Gpt56Sol => "gpt-5.6-sol",
2297            Self::Gpt56Terra => "gpt-5.6-terra",
2298        }
2299    }
2300    #[allow(clippy::too_many_lines)]
2301    fn display_name(self) -> &'static str {
2302        match self {
2303            Self::Gpt52 => "GPT-5.2",
2304            Self::Gpt54 => "GPT-5.4",
2305            Self::Gpt54Mini => "GPT-5.4 mini",
2306            Self::Gpt55 => "GPT-5.5",
2307            Self::Gpt56Luna => "GPT-5.6 Luna",
2308            Self::Gpt56Sol => "GPT-5.6 Sol",
2309            Self::Gpt56Terra => "GPT-5.6 Terra",
2310        }
2311    }
2312    #[allow(clippy::too_many_lines)]
2313    fn context_window(self) -> u32 {
2314        match self {
2315            Self::Gpt52 | Self::Gpt54 | Self::Gpt54Mini | Self::Gpt55 => 272_000,
2316            Self::Gpt56Luna | Self::Gpt56Sol | Self::Gpt56Terra => 372_000,
2317        }
2318    }
2319    #[allow(clippy::too_many_lines)]
2320    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
2321        match self {
2322            Self::Gpt52 | Self::Gpt54 | Self::Gpt54Mini | Self::Gpt55 => {
2323                &[
2324                    ReasoningEffort::Low,
2325                    ReasoningEffort::Medium,
2326                    ReasoningEffort::High,
2327                    ReasoningEffort::Xhigh,
2328                ]
2329            }
2330            Self::Gpt56Luna | Self::Gpt56Sol | Self::Gpt56Terra => {
2331                &[
2332                    ReasoningEffort::Low,
2333                    ReasoningEffort::Medium,
2334                    ReasoningEffort::High,
2335                    ReasoningEffort::Xhigh,
2336                    ReasoningEffort::Max,
2337                ]
2338            }
2339        }
2340    }
2341    pub fn supports_reasoning(self) -> bool {
2342        !self.reasoning_levels().is_empty()
2343    }
2344    #[allow(clippy::too_many_lines)]
2345    pub fn supports_prompt_caching(self) -> bool {
2346        match self {
2347            Self::Gpt52
2348            | Self::Gpt54
2349            | Self::Gpt54Mini
2350            | Self::Gpt55
2351            | Self::Gpt56Luna
2352            | Self::Gpt56Sol
2353            | Self::Gpt56Terra => true,
2354        }
2355    }
2356    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
2357    pub fn pricing(self) -> Option<ModelPricing> {
2358        match self {
2359            Self::Gpt52 => None,
2360            Self::Gpt54 => None,
2361            Self::Gpt54Mini => None,
2362            Self::Gpt55 => None,
2363            Self::Gpt56Luna => None,
2364            Self::Gpt56Sol => None,
2365            Self::Gpt56Terra => None,
2366        }
2367    }
2368    #[allow(clippy::too_many_lines)]
2369    pub fn supports_image(self) -> bool {
2370        match self {
2371            Self::Gpt52
2372            | Self::Gpt54
2373            | Self::Gpt54Mini
2374            | Self::Gpt55
2375            | Self::Gpt56Luna
2376            | Self::Gpt56Sol
2377            | Self::Gpt56Terra => true,
2378        }
2379    }
2380    #[allow(clippy::too_many_lines)]
2381    pub fn supports_audio(self) -> bool {
2382        match self {
2383            Self::Gpt52
2384            | Self::Gpt54
2385            | Self::Gpt54Mini
2386            | Self::Gpt55
2387            | Self::Gpt56Luna
2388            | Self::Gpt56Sol
2389            | Self::Gpt56Terra => false,
2390        }
2391    }
2392    #[allow(clippy::too_many_lines)]
2393    pub fn transport(self) -> Option<ModelTransport> {
2394        match self {
2395            Self::Gpt52
2396            | Self::Gpt54
2397            | Self::Gpt54Mini
2398            | Self::Gpt55
2399            | Self::Gpt56Luna
2400            | Self::Gpt56Sol
2401            | Self::Gpt56Terra => None,
2402        }
2403    }
2404    const ALL: &[CodexModel] = &[
2405        Self::Gpt52,
2406        Self::Gpt54,
2407        Self::Gpt54Mini,
2408        Self::Gpt55,
2409        Self::Gpt56Luna,
2410        Self::Gpt56Sol,
2411        Self::Gpt56Terra,
2412    ];
2413}
2414impl std::str::FromStr for CodexModel {
2415    type Err = String;
2416    #[allow(clippy::too_many_lines)]
2417    fn from_str(s: &str) -> Result<Self, Self::Err> {
2418        match s {
2419            "gpt-5.2" => Ok(Self::Gpt52),
2420            "gpt-5.4" => Ok(Self::Gpt54),
2421            "gpt-5.4-mini" => Ok(Self::Gpt54Mini),
2422            "gpt-5.5" => Ok(Self::Gpt55),
2423            "gpt-5.6-luna" => Ok(Self::Gpt56Luna),
2424            "gpt-5.6-sol" => Ok(Self::Gpt56Sol),
2425            "gpt-5.6-terra" => Ok(Self::Gpt56Terra),
2426            _ => Err(format!("Unknown codex model: '{s}'")),
2427        }
2428    }
2429}
2430impl DeepSeekModel {
2431    #[allow(clippy::too_many_lines)]
2432    fn model_id(self) -> &'static str {
2433        match self {
2434            Self::DeepseekChat => "deepseek-chat",
2435            Self::DeepseekReasoner => "deepseek-reasoner",
2436            Self::DeepseekV4Flash => "deepseek-v4-flash",
2437            Self::DeepseekV4Pro => "deepseek-v4-pro",
2438        }
2439    }
2440    #[allow(clippy::too_many_lines)]
2441    fn display_name(self) -> &'static str {
2442        match self {
2443            Self::DeepseekChat => "DeepSeek Chat",
2444            Self::DeepseekReasoner => "DeepSeek Reasoner",
2445            Self::DeepseekV4Flash => "DeepSeek V4 Flash",
2446            Self::DeepseekV4Pro => "DeepSeek V4 Pro",
2447        }
2448    }
2449    #[allow(clippy::too_many_lines)]
2450    fn context_window(self) -> u32 {
2451        match self {
2452            Self::DeepseekChat
2453            | Self::DeepseekReasoner
2454            | Self::DeepseekV4Flash
2455            | Self::DeepseekV4Pro => 1_000_000,
2456        }
2457    }
2458    #[allow(clippy::too_many_lines)]
2459    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
2460        match self {
2461            Self::DeepseekChat => &[],
2462            Self::DeepseekV4Flash | Self::DeepseekV4Pro => {
2463                &[ReasoningEffort::High, ReasoningEffort::Max]
2464            }
2465            Self::DeepseekReasoner => {
2466                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
2467            }
2468        }
2469    }
2470    pub fn supports_reasoning(self) -> bool {
2471        !self.reasoning_levels().is_empty()
2472    }
2473    #[allow(clippy::too_many_lines)]
2474    pub fn supports_prompt_caching(self) -> bool {
2475        match self {
2476            Self::DeepseekChat
2477            | Self::DeepseekReasoner
2478            | Self::DeepseekV4Flash
2479            | Self::DeepseekV4Pro => true,
2480        }
2481    }
2482    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
2483    pub fn pricing(self) -> Option<ModelPricing> {
2484        match self {
2485            Self::DeepseekChat => {
2486                Some(ModelPricing {
2487                    input_per_million: 0.14f64,
2488                    output_per_million: 0.28f64,
2489                    cache_read_per_million: Some(0.0028f64),
2490                    cache_write_per_million: None,
2491                })
2492            }
2493            Self::DeepseekReasoner => {
2494                Some(ModelPricing {
2495                    input_per_million: 0.14f64,
2496                    output_per_million: 0.28f64,
2497                    cache_read_per_million: Some(0.0028f64),
2498                    cache_write_per_million: None,
2499                })
2500            }
2501            Self::DeepseekV4Flash => {
2502                Some(ModelPricing {
2503                    input_per_million: 0.14f64,
2504                    output_per_million: 0.28f64,
2505                    cache_read_per_million: Some(0.0028f64),
2506                    cache_write_per_million: None,
2507                })
2508            }
2509            Self::DeepseekV4Pro => {
2510                Some(ModelPricing {
2511                    input_per_million: 0.435f64,
2512                    output_per_million: 0.87f64,
2513                    cache_read_per_million: Some(0.003625f64),
2514                    cache_write_per_million: None,
2515                })
2516            }
2517        }
2518    }
2519    #[allow(clippy::too_many_lines)]
2520    pub fn supports_image(self) -> bool {
2521        match self {
2522            Self::DeepseekChat
2523            | Self::DeepseekReasoner
2524            | Self::DeepseekV4Flash
2525            | Self::DeepseekV4Pro => false,
2526        }
2527    }
2528    #[allow(clippy::too_many_lines)]
2529    pub fn supports_audio(self) -> bool {
2530        match self {
2531            Self::DeepseekChat
2532            | Self::DeepseekReasoner
2533            | Self::DeepseekV4Flash
2534            | Self::DeepseekV4Pro => false,
2535        }
2536    }
2537    #[allow(clippy::too_many_lines)]
2538    pub fn transport(self) -> Option<ModelTransport> {
2539        match self {
2540            Self::DeepseekChat
2541            | Self::DeepseekReasoner
2542            | Self::DeepseekV4Flash
2543            | Self::DeepseekV4Pro => None,
2544        }
2545    }
2546    const ALL: &[DeepSeekModel] = &[
2547        Self::DeepseekChat,
2548        Self::DeepseekReasoner,
2549        Self::DeepseekV4Flash,
2550        Self::DeepseekV4Pro,
2551    ];
2552}
2553impl std::str::FromStr for DeepSeekModel {
2554    type Err = String;
2555    #[allow(clippy::too_many_lines)]
2556    fn from_str(s: &str) -> Result<Self, Self::Err> {
2557        match s {
2558            "deepseek-chat" => Ok(Self::DeepseekChat),
2559            "deepseek-reasoner" => Ok(Self::DeepseekReasoner),
2560            "deepseek-v4-flash" => Ok(Self::DeepseekV4Flash),
2561            "deepseek-v4-pro" => Ok(Self::DeepseekV4Pro),
2562            _ => Err(format!("Unknown deepseek model: '{s}'")),
2563        }
2564    }
2565}
2566impl FireworksModel {
2567    #[allow(clippy::too_many_lines)]
2568    fn model_id(self) -> &'static str {
2569        match self {
2570            Self::AccountsFireworksModelsDeepseekV4Flash => {
2571                "accounts/fireworks/models/deepseek-v4-flash"
2572            }
2573            Self::AccountsFireworksModelsDeepseekV4Flash0731 => {
2574                "accounts/fireworks/models/deepseek-v4-flash-0731"
2575            }
2576            Self::AccountsFireworksModelsDeepseekV4Pro => {
2577                "accounts/fireworks/models/deepseek-v4-pro"
2578            }
2579            Self::AccountsFireworksModelsGlm5p2 => "accounts/fireworks/models/glm-5p2",
2580            Self::AccountsFireworksModelsGptOss120b => {
2581                "accounts/fireworks/models/gpt-oss-120b"
2582            }
2583            Self::AccountsFireworksModelsGptOss20b => {
2584                "accounts/fireworks/models/gpt-oss-20b"
2585            }
2586            Self::AccountsFireworksModelsKimiK2p6 => {
2587                "accounts/fireworks/models/kimi-k2p6"
2588            }
2589            Self::AccountsFireworksModelsKimiK2p7Code => {
2590                "accounts/fireworks/models/kimi-k2p7-code"
2591            }
2592            Self::AccountsFireworksModelsKimiK3 => "accounts/fireworks/models/kimi-k3",
2593            Self::AccountsFireworksModelsMinimaxM2p7 => {
2594                "accounts/fireworks/models/minimax-m2p7"
2595            }
2596            Self::AccountsFireworksModelsMinimaxM3 => {
2597                "accounts/fireworks/models/minimax-m3"
2598            }
2599            Self::AccountsFireworksModelsQwen3p7Plus => {
2600                "accounts/fireworks/models/qwen3p7-plus"
2601            }
2602            Self::AccountsFireworksRoutersGlm5p2Fast => {
2603                "accounts/fireworks/routers/glm-5p2-fast"
2604            }
2605            Self::AccountsFireworksRoutersKimiK2p6Fast => {
2606                "accounts/fireworks/routers/kimi-k2p6-fast"
2607            }
2608            Self::AccountsFireworksRoutersKimiK2p6Turbo => {
2609                "accounts/fireworks/routers/kimi-k2p6-turbo"
2610            }
2611            Self::AccountsFireworksRoutersKimiK2p7CodeFast => {
2612                "accounts/fireworks/routers/kimi-k2p7-code-fast"
2613            }
2614            Self::AccountsFireworksRoutersKimiK3Fast => {
2615                "accounts/fireworks/routers/kimi-k3-fast"
2616            }
2617        }
2618    }
2619    #[allow(clippy::too_many_lines)]
2620    fn display_name(self) -> &'static str {
2621        match self {
2622            Self::AccountsFireworksModelsDeepseekV4Flash => "DeepSeek V4 Flash",
2623            Self::AccountsFireworksModelsDeepseekV4Flash0731 => "DeepSeek V4 Flash 0731",
2624            Self::AccountsFireworksModelsDeepseekV4Pro => "DeepSeek V4 Pro",
2625            Self::AccountsFireworksModelsGlm5p2 => "GLM 5.2",
2626            Self::AccountsFireworksRoutersGlm5p2Fast => "GLM 5.2 Fast",
2627            Self::AccountsFireworksModelsGptOss120b => "GPT OSS 120B",
2628            Self::AccountsFireworksModelsGptOss20b => "GPT OSS 20B",
2629            Self::AccountsFireworksModelsKimiK2p6 => "Kimi K2.6",
2630            Self::AccountsFireworksRoutersKimiK2p6Fast => "Kimi K2.6 Fast",
2631            Self::AccountsFireworksRoutersKimiK2p6Turbo => "Kimi K2.6 Turbo",
2632            Self::AccountsFireworksModelsKimiK2p7Code => "Kimi K2.7 Code",
2633            Self::AccountsFireworksRoutersKimiK2p7CodeFast => "Kimi K2.7 Code Fast",
2634            Self::AccountsFireworksModelsKimiK3 => "Kimi K3",
2635            Self::AccountsFireworksRoutersKimiK3Fast => "Kimi K3 Fast",
2636            Self::AccountsFireworksModelsMinimaxM2p7 => "MiniMax-M2.7",
2637            Self::AccountsFireworksModelsMinimaxM3 => "MiniMax-M3",
2638            Self::AccountsFireworksModelsQwen3p7Plus => "Qwen 3.7 Plus",
2639        }
2640    }
2641    #[allow(clippy::too_many_lines)]
2642    fn context_window(self) -> u32 {
2643        match self {
2644            Self::AccountsFireworksModelsGptOss120b
2645            | Self::AccountsFireworksModelsGptOss20b => 131_072,
2646            Self::AccountsFireworksModelsMinimaxM2p7 => 196_608,
2647            Self::AccountsFireworksModelsKimiK2p6
2648            | Self::AccountsFireworksModelsKimiK2p7Code
2649            | Self::AccountsFireworksRoutersKimiK2p6Fast
2650            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2651            | Self::AccountsFireworksRoutersKimiK2p7CodeFast => 262_000,
2652            Self::AccountsFireworksModelsQwen3p7Plus => 262_144,
2653            Self::AccountsFireworksModelsMinimaxM3 => 512_000,
2654            Self::AccountsFireworksModelsDeepseekV4Flash
2655            | Self::AccountsFireworksModelsDeepseekV4Flash0731
2656            | Self::AccountsFireworksModelsDeepseekV4Pro => 1_000_000,
2657            Self::AccountsFireworksModelsGlm5p2
2658            | Self::AccountsFireworksRoutersGlm5p2Fast => 1_048_575,
2659            Self::AccountsFireworksModelsKimiK3
2660            | Self::AccountsFireworksRoutersKimiK3Fast => 1_048_576,
2661        }
2662    }
2663    #[allow(clippy::too_many_lines)]
2664    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
2665        match self {
2666            Self::AccountsFireworksModelsDeepseekV4Flash
2667            | Self::AccountsFireworksModelsDeepseekV4Flash0731
2668            | Self::AccountsFireworksModelsDeepseekV4Pro
2669            | Self::AccountsFireworksModelsGlm5p2
2670            | Self::AccountsFireworksRoutersGlm5p2Fast => {
2671                &[ReasoningEffort::High, ReasoningEffort::Max]
2672            }
2673            Self::AccountsFireworksModelsGptOss120b
2674            | Self::AccountsFireworksModelsGptOss20b
2675            | Self::AccountsFireworksModelsKimiK2p6
2676            | Self::AccountsFireworksModelsKimiK2p7Code
2677            | Self::AccountsFireworksModelsMinimaxM2p7
2678            | Self::AccountsFireworksModelsMinimaxM3
2679            | Self::AccountsFireworksModelsQwen3p7Plus
2680            | Self::AccountsFireworksRoutersKimiK2p6Fast
2681            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2682            | Self::AccountsFireworksRoutersKimiK2p7CodeFast => {
2683                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
2684            }
2685            Self::AccountsFireworksModelsKimiK3
2686            | Self::AccountsFireworksRoutersKimiK3Fast => {
2687                &[
2688                    ReasoningEffort::Low,
2689                    ReasoningEffort::Medium,
2690                    ReasoningEffort::High,
2691                    ReasoningEffort::Max,
2692                ]
2693            }
2694        }
2695    }
2696    pub fn supports_reasoning(self) -> bool {
2697        !self.reasoning_levels().is_empty()
2698    }
2699    #[allow(clippy::too_many_lines)]
2700    pub fn supports_prompt_caching(self) -> bool {
2701        match self {
2702            Self::AccountsFireworksModelsDeepseekV4Flash
2703            | Self::AccountsFireworksModelsDeepseekV4Flash0731
2704            | Self::AccountsFireworksModelsDeepseekV4Pro
2705            | Self::AccountsFireworksModelsGlm5p2
2706            | Self::AccountsFireworksModelsGptOss120b
2707            | Self::AccountsFireworksModelsGptOss20b
2708            | Self::AccountsFireworksModelsKimiK2p6
2709            | Self::AccountsFireworksModelsKimiK2p7Code
2710            | Self::AccountsFireworksModelsKimiK3
2711            | Self::AccountsFireworksModelsMinimaxM2p7
2712            | Self::AccountsFireworksModelsMinimaxM3
2713            | Self::AccountsFireworksModelsQwen3p7Plus
2714            | Self::AccountsFireworksRoutersGlm5p2Fast
2715            | Self::AccountsFireworksRoutersKimiK2p6Fast
2716            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2717            | Self::AccountsFireworksRoutersKimiK2p7CodeFast
2718            | Self::AccountsFireworksRoutersKimiK3Fast => true,
2719        }
2720    }
2721    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
2722    pub fn pricing(self) -> Option<ModelPricing> {
2723        match self {
2724            Self::AccountsFireworksModelsDeepseekV4Flash => {
2725                Some(ModelPricing {
2726                    input_per_million: 0.14f64,
2727                    output_per_million: 0.28f64,
2728                    cache_read_per_million: Some(0.028f64),
2729                    cache_write_per_million: None,
2730                })
2731            }
2732            Self::AccountsFireworksModelsDeepseekV4Flash0731 => {
2733                Some(ModelPricing {
2734                    input_per_million: 0.14f64,
2735                    output_per_million: 0.28f64,
2736                    cache_read_per_million: Some(0.028f64),
2737                    cache_write_per_million: None,
2738                })
2739            }
2740            Self::AccountsFireworksModelsDeepseekV4Pro => {
2741                Some(ModelPricing {
2742                    input_per_million: 1.74f64,
2743                    output_per_million: 3.48f64,
2744                    cache_read_per_million: Some(0.145f64),
2745                    cache_write_per_million: None,
2746                })
2747            }
2748            Self::AccountsFireworksModelsGlm5p2 => {
2749                Some(ModelPricing {
2750                    input_per_million: 1.4f64,
2751                    output_per_million: 4.4f64,
2752                    cache_read_per_million: Some(0.14f64),
2753                    cache_write_per_million: None,
2754                })
2755            }
2756            Self::AccountsFireworksModelsGptOss120b => {
2757                Some(ModelPricing {
2758                    input_per_million: 0.15f64,
2759                    output_per_million: 0.6f64,
2760                    cache_read_per_million: Some(0.015f64),
2761                    cache_write_per_million: None,
2762                })
2763            }
2764            Self::AccountsFireworksModelsGptOss20b => {
2765                Some(ModelPricing {
2766                    input_per_million: 0.07f64,
2767                    output_per_million: 0.3f64,
2768                    cache_read_per_million: Some(0.035f64),
2769                    cache_write_per_million: None,
2770                })
2771            }
2772            Self::AccountsFireworksModelsKimiK2p6 => {
2773                Some(ModelPricing {
2774                    input_per_million: 0.95f64,
2775                    output_per_million: 4f64,
2776                    cache_read_per_million: Some(0.16f64),
2777                    cache_write_per_million: None,
2778                })
2779            }
2780            Self::AccountsFireworksModelsKimiK2p7Code => {
2781                Some(ModelPricing {
2782                    input_per_million: 0.95f64,
2783                    output_per_million: 4f64,
2784                    cache_read_per_million: Some(0.19f64),
2785                    cache_write_per_million: None,
2786                })
2787            }
2788            Self::AccountsFireworksModelsKimiK3 => {
2789                Some(ModelPricing {
2790                    input_per_million: 3f64,
2791                    output_per_million: 15f64,
2792                    cache_read_per_million: Some(0.3f64),
2793                    cache_write_per_million: None,
2794                })
2795            }
2796            Self::AccountsFireworksModelsMinimaxM2p7 => {
2797                Some(ModelPricing {
2798                    input_per_million: 0.3f64,
2799                    output_per_million: 1.2f64,
2800                    cache_read_per_million: Some(0.06f64),
2801                    cache_write_per_million: None,
2802                })
2803            }
2804            Self::AccountsFireworksModelsMinimaxM3 => {
2805                Some(ModelPricing {
2806                    input_per_million: 0.3f64,
2807                    output_per_million: 1.2f64,
2808                    cache_read_per_million: Some(0.06f64),
2809                    cache_write_per_million: None,
2810                })
2811            }
2812            Self::AccountsFireworksModelsQwen3p7Plus => {
2813                Some(ModelPricing {
2814                    input_per_million: 0.4f64,
2815                    output_per_million: 1.6f64,
2816                    cache_read_per_million: Some(0.08f64),
2817                    cache_write_per_million: None,
2818                })
2819            }
2820            Self::AccountsFireworksRoutersGlm5p2Fast => {
2821                Some(ModelPricing {
2822                    input_per_million: 2.1f64,
2823                    output_per_million: 6.6f64,
2824                    cache_read_per_million: Some(0.21f64),
2825                    cache_write_per_million: None,
2826                })
2827            }
2828            Self::AccountsFireworksRoutersKimiK2p6Fast => {
2829                Some(ModelPricing {
2830                    input_per_million: 2f64,
2831                    output_per_million: 8f64,
2832                    cache_read_per_million: Some(0.3f64),
2833                    cache_write_per_million: None,
2834                })
2835            }
2836            Self::AccountsFireworksRoutersKimiK2p6Turbo => {
2837                Some(ModelPricing {
2838                    input_per_million: 2f64,
2839                    output_per_million: 8f64,
2840                    cache_read_per_million: Some(0.3f64),
2841                    cache_write_per_million: None,
2842                })
2843            }
2844            Self::AccountsFireworksRoutersKimiK2p7CodeFast => {
2845                Some(ModelPricing {
2846                    input_per_million: 1.9f64,
2847                    output_per_million: 8f64,
2848                    cache_read_per_million: Some(0.38f64),
2849                    cache_write_per_million: None,
2850                })
2851            }
2852            Self::AccountsFireworksRoutersKimiK3Fast => {
2853                Some(ModelPricing {
2854                    input_per_million: 4.5f64,
2855                    output_per_million: 22.5f64,
2856                    cache_read_per_million: Some(0.45f64),
2857                    cache_write_per_million: None,
2858                })
2859            }
2860        }
2861    }
2862    #[allow(clippy::too_many_lines)]
2863    pub fn supports_image(self) -> bool {
2864        match self {
2865            Self::AccountsFireworksModelsDeepseekV4Flash
2866            | Self::AccountsFireworksModelsDeepseekV4Flash0731
2867            | Self::AccountsFireworksModelsDeepseekV4Pro
2868            | Self::AccountsFireworksModelsGlm5p2
2869            | Self::AccountsFireworksModelsGptOss120b
2870            | Self::AccountsFireworksModelsGptOss20b
2871            | Self::AccountsFireworksModelsMinimaxM2p7
2872            | Self::AccountsFireworksRoutersGlm5p2Fast => false,
2873            Self::AccountsFireworksModelsKimiK2p6
2874            | Self::AccountsFireworksModelsKimiK2p7Code
2875            | Self::AccountsFireworksModelsKimiK3
2876            | Self::AccountsFireworksModelsMinimaxM3
2877            | Self::AccountsFireworksModelsQwen3p7Plus
2878            | Self::AccountsFireworksRoutersKimiK2p6Fast
2879            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2880            | Self::AccountsFireworksRoutersKimiK2p7CodeFast
2881            | Self::AccountsFireworksRoutersKimiK3Fast => true,
2882        }
2883    }
2884    #[allow(clippy::too_many_lines)]
2885    pub fn supports_audio(self) -> bool {
2886        match self {
2887            Self::AccountsFireworksModelsDeepseekV4Flash
2888            | Self::AccountsFireworksModelsDeepseekV4Flash0731
2889            | Self::AccountsFireworksModelsDeepseekV4Pro
2890            | Self::AccountsFireworksModelsGlm5p2
2891            | Self::AccountsFireworksModelsGptOss120b
2892            | Self::AccountsFireworksModelsGptOss20b
2893            | Self::AccountsFireworksModelsKimiK2p6
2894            | Self::AccountsFireworksModelsKimiK2p7Code
2895            | Self::AccountsFireworksModelsKimiK3
2896            | Self::AccountsFireworksModelsMinimaxM2p7
2897            | Self::AccountsFireworksModelsMinimaxM3
2898            | Self::AccountsFireworksModelsQwen3p7Plus
2899            | Self::AccountsFireworksRoutersGlm5p2Fast
2900            | Self::AccountsFireworksRoutersKimiK2p6Fast
2901            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2902            | Self::AccountsFireworksRoutersKimiK2p7CodeFast
2903            | Self::AccountsFireworksRoutersKimiK3Fast => false,
2904        }
2905    }
2906    #[allow(clippy::too_many_lines)]
2907    pub fn transport(self) -> Option<ModelTransport> {
2908        match self {
2909            Self::AccountsFireworksModelsDeepseekV4Flash
2910            | Self::AccountsFireworksModelsDeepseekV4Flash0731
2911            | Self::AccountsFireworksModelsDeepseekV4Pro
2912            | Self::AccountsFireworksModelsGlm5p2
2913            | Self::AccountsFireworksModelsGptOss120b
2914            | Self::AccountsFireworksModelsGptOss20b
2915            | Self::AccountsFireworksModelsKimiK2p6
2916            | Self::AccountsFireworksModelsKimiK2p7Code
2917            | Self::AccountsFireworksModelsKimiK3
2918            | Self::AccountsFireworksModelsMinimaxM2p7
2919            | Self::AccountsFireworksModelsMinimaxM3
2920            | Self::AccountsFireworksModelsQwen3p7Plus
2921            | Self::AccountsFireworksRoutersGlm5p2Fast
2922            | Self::AccountsFireworksRoutersKimiK2p6Fast
2923            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2924            | Self::AccountsFireworksRoutersKimiK2p7CodeFast
2925            | Self::AccountsFireworksRoutersKimiK3Fast => None,
2926        }
2927    }
2928    const ALL: &[FireworksModel] = &[
2929        Self::AccountsFireworksModelsDeepseekV4Flash,
2930        Self::AccountsFireworksModelsDeepseekV4Flash0731,
2931        Self::AccountsFireworksModelsDeepseekV4Pro,
2932        Self::AccountsFireworksModelsGlm5p2,
2933        Self::AccountsFireworksModelsGptOss120b,
2934        Self::AccountsFireworksModelsGptOss20b,
2935        Self::AccountsFireworksModelsKimiK2p6,
2936        Self::AccountsFireworksModelsKimiK2p7Code,
2937        Self::AccountsFireworksModelsKimiK3,
2938        Self::AccountsFireworksModelsMinimaxM2p7,
2939        Self::AccountsFireworksModelsMinimaxM3,
2940        Self::AccountsFireworksModelsQwen3p7Plus,
2941        Self::AccountsFireworksRoutersGlm5p2Fast,
2942        Self::AccountsFireworksRoutersKimiK2p6Fast,
2943        Self::AccountsFireworksRoutersKimiK2p6Turbo,
2944        Self::AccountsFireworksRoutersKimiK2p7CodeFast,
2945        Self::AccountsFireworksRoutersKimiK3Fast,
2946    ];
2947}
2948impl std::str::FromStr for FireworksModel {
2949    type Err = String;
2950    #[allow(clippy::too_many_lines)]
2951    fn from_str(s: &str) -> Result<Self, Self::Err> {
2952        match s {
2953            "accounts/fireworks/models/deepseek-v4-flash" => {
2954                Ok(Self::AccountsFireworksModelsDeepseekV4Flash)
2955            }
2956            "accounts/fireworks/models/deepseek-v4-flash-0731" => {
2957                Ok(Self::AccountsFireworksModelsDeepseekV4Flash0731)
2958            }
2959            "accounts/fireworks/models/deepseek-v4-pro" => {
2960                Ok(Self::AccountsFireworksModelsDeepseekV4Pro)
2961            }
2962            "accounts/fireworks/models/glm-5p2" => {
2963                Ok(Self::AccountsFireworksModelsGlm5p2)
2964            }
2965            "accounts/fireworks/models/gpt-oss-120b" => {
2966                Ok(Self::AccountsFireworksModelsGptOss120b)
2967            }
2968            "accounts/fireworks/models/gpt-oss-20b" => {
2969                Ok(Self::AccountsFireworksModelsGptOss20b)
2970            }
2971            "accounts/fireworks/models/kimi-k2p6" => {
2972                Ok(Self::AccountsFireworksModelsKimiK2p6)
2973            }
2974            "accounts/fireworks/models/kimi-k2p7-code" => {
2975                Ok(Self::AccountsFireworksModelsKimiK2p7Code)
2976            }
2977            "accounts/fireworks/models/kimi-k3" => {
2978                Ok(Self::AccountsFireworksModelsKimiK3)
2979            }
2980            "accounts/fireworks/models/minimax-m2p7" => {
2981                Ok(Self::AccountsFireworksModelsMinimaxM2p7)
2982            }
2983            "accounts/fireworks/models/minimax-m3" => {
2984                Ok(Self::AccountsFireworksModelsMinimaxM3)
2985            }
2986            "accounts/fireworks/models/qwen3p7-plus" => {
2987                Ok(Self::AccountsFireworksModelsQwen3p7Plus)
2988            }
2989            "accounts/fireworks/routers/glm-5p2-fast" => {
2990                Ok(Self::AccountsFireworksRoutersGlm5p2Fast)
2991            }
2992            "accounts/fireworks/routers/kimi-k2p6-fast" => {
2993                Ok(Self::AccountsFireworksRoutersKimiK2p6Fast)
2994            }
2995            "accounts/fireworks/routers/kimi-k2p6-turbo" => {
2996                Ok(Self::AccountsFireworksRoutersKimiK2p6Turbo)
2997            }
2998            "accounts/fireworks/routers/kimi-k2p7-code-fast" => {
2999                Ok(Self::AccountsFireworksRoutersKimiK2p7CodeFast)
3000            }
3001            "accounts/fireworks/routers/kimi-k3-fast" => {
3002                Ok(Self::AccountsFireworksRoutersKimiK3Fast)
3003            }
3004            _ => Err(format!("Unknown fireworks model: '{s}'")),
3005        }
3006    }
3007}
3008impl GeminiModel {
3009    #[allow(clippy::too_many_lines)]
3010    fn model_id(self) -> &'static str {
3011        match self {
3012            Self::DeepResearchMaxPreview042026 => "deep-research-max-preview-04-2026",
3013            Self::DeepResearchPreview042026 => "deep-research-preview-04-2026",
3014            Self::Gemini20Flash => "gemini-2.0-flash",
3015            Self::Gemini20FlashLite => "gemini-2.0-flash-lite",
3016            Self::Gemini25ComputerUsePreview102025 => {
3017                "gemini-2.5-computer-use-preview-10-2025"
3018            }
3019            Self::Gemini25Flash => "gemini-2.5-flash",
3020            Self::Gemini25FlashLite => "gemini-2.5-flash-lite",
3021            Self::Gemini25Pro => "gemini-2.5-pro",
3022            Self::Gemini3FlashPreview => "gemini-3-flash-preview",
3023            Self::Gemini3ProPreview => "gemini-3-pro-preview",
3024            Self::Gemini31FlashLite => "gemini-3.1-flash-lite",
3025            Self::Gemini31FlashLiteImage => "gemini-3.1-flash-lite-image",
3026            Self::Gemini31FlashLitePreview => "gemini-3.1-flash-lite-preview",
3027            Self::Gemini31FlashLivePreview => "gemini-3.1-flash-live-preview",
3028            Self::Gemini31ProPreview => "gemini-3.1-pro-preview",
3029            Self::Gemini31ProPreviewCustomtools => "gemini-3.1-pro-preview-customtools",
3030            Self::Gemini35Flash => "gemini-3.5-flash",
3031            Self::Gemini35FlashLite => "gemini-3.5-flash-lite",
3032            Self::Gemini36Flash => "gemini-3.6-flash",
3033            Self::GeminiRoboticsEr16Preview => "gemini-robotics-er-1.6-preview",
3034            Self::Gemma426bA4bIt => "gemma-4-26b-a4b-it",
3035            Self::Gemma431bIt => "gemma-4-31b-it",
3036        }
3037    }
3038    #[allow(clippy::too_many_lines)]
3039    fn display_name(self) -> &'static str {
3040        match self {
3041            Self::DeepResearchMaxPreview042026 => {
3042                "Deep Research Max Preview (Apr-21-2026)"
3043            }
3044            Self::DeepResearchPreview042026 => "Deep Research Preview (Apr-21-2026)",
3045            Self::Gemini20Flash => "Gemini 2.0 Flash",
3046            Self::Gemini20FlashLite => "Gemini 2.0 Flash-Lite",
3047            Self::Gemini25ComputerUsePreview102025 => {
3048                "Gemini 2.5 Computer Use Preview 10-2025"
3049            }
3050            Self::Gemini25Flash => "Gemini 2.5 Flash",
3051            Self::Gemini25FlashLite => "Gemini 2.5 Flash-Lite",
3052            Self::Gemini25Pro => "Gemini 2.5 Pro",
3053            Self::Gemini3FlashPreview => "Gemini 3 Flash Preview",
3054            Self::Gemini3ProPreview => "Gemini 3 Pro Preview",
3055            Self::Gemini31FlashLite => "Gemini 3.1 Flash Lite",
3056            Self::Gemini31FlashLitePreview => "Gemini 3.1 Flash Lite Preview",
3057            Self::Gemini31FlashLivePreview => "Gemini 3.1 Flash Live Preview",
3058            Self::Gemini31ProPreview => "Gemini 3.1 Pro Preview",
3059            Self::Gemini31ProPreviewCustomtools => "Gemini 3.1 Pro Preview Custom Tools",
3060            Self::Gemini35Flash => "Gemini 3.5 Flash",
3061            Self::Gemini35FlashLite => "Gemini 3.5 Flash Lite",
3062            Self::Gemini36Flash => "Gemini 3.6 Flash",
3063            Self::GeminiRoboticsEr16Preview => "Gemini Robotics-ER 1.6 Preview",
3064            Self::Gemma426bA4bIt => "Gemma 4 26B A4B IT",
3065            Self::Gemma431bIt => "Gemma 4 31B IT",
3066            Self::Gemini31FlashLiteImage => "Nano Banana 2 Lite",
3067        }
3068    }
3069    #[allow(clippy::too_many_lines)]
3070    fn context_window(self) -> u32 {
3071        match self {
3072            Self::Gemini31FlashLiteImage => 65_536,
3073            Self::DeepResearchMaxPreview042026
3074            | Self::DeepResearchPreview042026
3075            | Self::Gemini25ComputerUsePreview102025
3076            | Self::Gemini31FlashLivePreview
3077            | Self::GeminiRoboticsEr16Preview => 131_072,
3078            Self::Gemma426bA4bIt | Self::Gemma431bIt => 262_144,
3079            Self::Gemini20Flash
3080            | Self::Gemini20FlashLite
3081            | Self::Gemini25Flash
3082            | Self::Gemini25FlashLite
3083            | Self::Gemini25Pro
3084            | Self::Gemini3FlashPreview
3085            | Self::Gemini3ProPreview
3086            | Self::Gemini31FlashLite
3087            | Self::Gemini31FlashLitePreview
3088            | Self::Gemini31ProPreview
3089            | Self::Gemini31ProPreviewCustomtools
3090            | Self::Gemini35Flash
3091            | Self::Gemini35FlashLite
3092            | Self::Gemini36Flash => 1_048_576,
3093        }
3094    }
3095    #[allow(clippy::too_many_lines)]
3096    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
3097        match self {
3098            Self::Gemini20Flash | Self::Gemini20FlashLite => &[],
3099            Self::Gemini3ProPreview => &[ReasoningEffort::Low, ReasoningEffort::High],
3100            Self::DeepResearchMaxPreview042026
3101            | Self::DeepResearchPreview042026
3102            | Self::Gemini25ComputerUsePreview102025
3103            | Self::Gemini25Flash
3104            | Self::Gemini25FlashLite
3105            | Self::Gemini25Pro
3106            | Self::Gemini31ProPreview
3107            | Self::Gemini31ProPreviewCustomtools
3108            | Self::GeminiRoboticsEr16Preview
3109            | Self::Gemma426bA4bIt
3110            | Self::Gemma431bIt => {
3111                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
3112            }
3113            Self::Gemini31FlashLiteImage => {
3114                &[ReasoningEffort::Minimal, ReasoningEffort::High]
3115            }
3116            Self::Gemini3FlashPreview
3117            | Self::Gemini31FlashLite
3118            | Self::Gemini31FlashLitePreview
3119            | Self::Gemini31FlashLivePreview
3120            | Self::Gemini35Flash
3121            | Self::Gemini35FlashLite
3122            | Self::Gemini36Flash => {
3123                &[
3124                    ReasoningEffort::Minimal,
3125                    ReasoningEffort::Low,
3126                    ReasoningEffort::Medium,
3127                    ReasoningEffort::High,
3128                ]
3129            }
3130        }
3131    }
3132    pub fn supports_reasoning(self) -> bool {
3133        !self.reasoning_levels().is_empty()
3134    }
3135    #[allow(clippy::too_many_lines)]
3136    pub fn supports_prompt_caching(self) -> bool {
3137        match self {
3138            Self::Gemini20FlashLite
3139            | Self::Gemini25ComputerUsePreview102025
3140            | Self::Gemini31FlashLiteImage
3141            | Self::Gemini31FlashLivePreview
3142            | Self::GeminiRoboticsEr16Preview
3143            | Self::Gemma426bA4bIt
3144            | Self::Gemma431bIt => false,
3145            Self::DeepResearchMaxPreview042026
3146            | Self::DeepResearchPreview042026
3147            | Self::Gemini20Flash
3148            | Self::Gemini25Flash
3149            | Self::Gemini25FlashLite
3150            | Self::Gemini25Pro
3151            | Self::Gemini3FlashPreview
3152            | Self::Gemini3ProPreview
3153            | Self::Gemini31FlashLite
3154            | Self::Gemini31FlashLitePreview
3155            | Self::Gemini31ProPreview
3156            | Self::Gemini31ProPreviewCustomtools
3157            | Self::Gemini35Flash
3158            | Self::Gemini35FlashLite
3159            | Self::Gemini36Flash => true,
3160        }
3161    }
3162    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
3163    pub fn pricing(self) -> Option<ModelPricing> {
3164        match self {
3165            Self::DeepResearchMaxPreview042026 => {
3166                Some(ModelPricing {
3167                    input_per_million: 2f64,
3168                    output_per_million: 12f64,
3169                    cache_read_per_million: Some(0.2f64),
3170                    cache_write_per_million: None,
3171                })
3172            }
3173            Self::DeepResearchPreview042026 => {
3174                Some(ModelPricing {
3175                    input_per_million: 2f64,
3176                    output_per_million: 12f64,
3177                    cache_read_per_million: Some(0.2f64),
3178                    cache_write_per_million: None,
3179                })
3180            }
3181            Self::Gemini20Flash => {
3182                Some(ModelPricing {
3183                    input_per_million: 0.1f64,
3184                    output_per_million: 0.4f64,
3185                    cache_read_per_million: Some(0.025f64),
3186                    cache_write_per_million: None,
3187                })
3188            }
3189            Self::Gemini20FlashLite => {
3190                Some(ModelPricing {
3191                    input_per_million: 0.075f64,
3192                    output_per_million: 0.3f64,
3193                    cache_read_per_million: None,
3194                    cache_write_per_million: None,
3195                })
3196            }
3197            Self::Gemini25ComputerUsePreview102025 => {
3198                Some(ModelPricing {
3199                    input_per_million: 1.25f64,
3200                    output_per_million: 10f64,
3201                    cache_read_per_million: None,
3202                    cache_write_per_million: None,
3203                })
3204            }
3205            Self::Gemini25Flash => {
3206                Some(ModelPricing {
3207                    input_per_million: 0.3f64,
3208                    output_per_million: 2.5f64,
3209                    cache_read_per_million: Some(0.03f64),
3210                    cache_write_per_million: None,
3211                })
3212            }
3213            Self::Gemini25FlashLite => {
3214                Some(ModelPricing {
3215                    input_per_million: 0.1f64,
3216                    output_per_million: 0.4f64,
3217                    cache_read_per_million: Some(0.01f64),
3218                    cache_write_per_million: None,
3219                })
3220            }
3221            Self::Gemini25Pro => {
3222                Some(ModelPricing {
3223                    input_per_million: 1.25f64,
3224                    output_per_million: 10f64,
3225                    cache_read_per_million: Some(0.125f64),
3226                    cache_write_per_million: None,
3227                })
3228            }
3229            Self::Gemini3FlashPreview => {
3230                Some(ModelPricing {
3231                    input_per_million: 0.5f64,
3232                    output_per_million: 3f64,
3233                    cache_read_per_million: Some(0.05f64),
3234                    cache_write_per_million: None,
3235                })
3236            }
3237            Self::Gemini3ProPreview => {
3238                Some(ModelPricing {
3239                    input_per_million: 2f64,
3240                    output_per_million: 12f64,
3241                    cache_read_per_million: Some(0.2f64),
3242                    cache_write_per_million: None,
3243                })
3244            }
3245            Self::Gemini31FlashLite => {
3246                Some(ModelPricing {
3247                    input_per_million: 0.25f64,
3248                    output_per_million: 1.5f64,
3249                    cache_read_per_million: Some(0.025f64),
3250                    cache_write_per_million: None,
3251                })
3252            }
3253            Self::Gemini31FlashLiteImage => {
3254                Some(ModelPricing {
3255                    input_per_million: 0.25f64,
3256                    output_per_million: 30f64,
3257                    cache_read_per_million: None,
3258                    cache_write_per_million: None,
3259                })
3260            }
3261            Self::Gemini31FlashLitePreview => {
3262                Some(ModelPricing {
3263                    input_per_million: 0.25f64,
3264                    output_per_million: 1.5f64,
3265                    cache_read_per_million: Some(0.025f64),
3266                    cache_write_per_million: None,
3267                })
3268            }
3269            Self::Gemini31FlashLivePreview => {
3270                Some(ModelPricing {
3271                    input_per_million: 0.75f64,
3272                    output_per_million: 4.5f64,
3273                    cache_read_per_million: None,
3274                    cache_write_per_million: None,
3275                })
3276            }
3277            Self::Gemini31ProPreview => {
3278                Some(ModelPricing {
3279                    input_per_million: 2f64,
3280                    output_per_million: 12f64,
3281                    cache_read_per_million: Some(0.2f64),
3282                    cache_write_per_million: None,
3283                })
3284            }
3285            Self::Gemini31ProPreviewCustomtools => {
3286                Some(ModelPricing {
3287                    input_per_million: 2f64,
3288                    output_per_million: 12f64,
3289                    cache_read_per_million: Some(0.2f64),
3290                    cache_write_per_million: None,
3291                })
3292            }
3293            Self::Gemini35Flash => {
3294                Some(ModelPricing {
3295                    input_per_million: 1.5f64,
3296                    output_per_million: 9f64,
3297                    cache_read_per_million: Some(0.15f64),
3298                    cache_write_per_million: None,
3299                })
3300            }
3301            Self::Gemini35FlashLite => {
3302                Some(ModelPricing {
3303                    input_per_million: 0.3f64,
3304                    output_per_million: 2.5f64,
3305                    cache_read_per_million: Some(0.03f64),
3306                    cache_write_per_million: None,
3307                })
3308            }
3309            Self::Gemini36Flash => {
3310                Some(ModelPricing {
3311                    input_per_million: 1.5f64,
3312                    output_per_million: 7.5f64,
3313                    cache_read_per_million: Some(0.15f64),
3314                    cache_write_per_million: None,
3315                })
3316            }
3317            Self::GeminiRoboticsEr16Preview => {
3318                Some(ModelPricing {
3319                    input_per_million: 1f64,
3320                    output_per_million: 5f64,
3321                    cache_read_per_million: None,
3322                    cache_write_per_million: None,
3323                })
3324            }
3325            Self::Gemma426bA4bIt => None,
3326            Self::Gemma431bIt => None,
3327        }
3328    }
3329    #[allow(clippy::too_many_lines)]
3330    pub fn supports_image(self) -> bool {
3331        match self {
3332            Self::DeepResearchMaxPreview042026
3333            | Self::DeepResearchPreview042026
3334            | Self::Gemini20Flash
3335            | Self::Gemini20FlashLite
3336            | Self::Gemini25ComputerUsePreview102025
3337            | Self::Gemini25Flash
3338            | Self::Gemini25FlashLite
3339            | Self::Gemini25Pro
3340            | Self::Gemini3FlashPreview
3341            | Self::Gemini3ProPreview
3342            | Self::Gemini31FlashLite
3343            | Self::Gemini31FlashLiteImage
3344            | Self::Gemini31FlashLitePreview
3345            | Self::Gemini31FlashLivePreview
3346            | Self::Gemini31ProPreview
3347            | Self::Gemini31ProPreviewCustomtools
3348            | Self::Gemini35Flash
3349            | Self::Gemini35FlashLite
3350            | Self::Gemini36Flash
3351            | Self::GeminiRoboticsEr16Preview
3352            | Self::Gemma426bA4bIt
3353            | Self::Gemma431bIt => true,
3354        }
3355    }
3356    #[allow(clippy::too_many_lines)]
3357    pub fn supports_audio(self) -> bool {
3358        match self {
3359            Self::Gemini25ComputerUsePreview102025
3360            | Self::Gemini31FlashLiteImage
3361            | Self::Gemma426bA4bIt
3362            | Self::Gemma431bIt => false,
3363            Self::DeepResearchMaxPreview042026
3364            | Self::DeepResearchPreview042026
3365            | Self::Gemini20Flash
3366            | Self::Gemini20FlashLite
3367            | Self::Gemini25Flash
3368            | Self::Gemini25FlashLite
3369            | Self::Gemini25Pro
3370            | Self::Gemini3FlashPreview
3371            | Self::Gemini3ProPreview
3372            | Self::Gemini31FlashLite
3373            | Self::Gemini31FlashLitePreview
3374            | Self::Gemini31FlashLivePreview
3375            | Self::Gemini31ProPreview
3376            | Self::Gemini31ProPreviewCustomtools
3377            | Self::Gemini35Flash
3378            | Self::Gemini35FlashLite
3379            | Self::Gemini36Flash
3380            | Self::GeminiRoboticsEr16Preview => true,
3381        }
3382    }
3383    #[allow(clippy::too_many_lines)]
3384    pub fn transport(self) -> Option<ModelTransport> {
3385        match self {
3386            Self::DeepResearchMaxPreview042026
3387            | Self::DeepResearchPreview042026
3388            | Self::Gemini20Flash
3389            | Self::Gemini20FlashLite
3390            | Self::Gemini25ComputerUsePreview102025
3391            | Self::Gemini25Flash
3392            | Self::Gemini25FlashLite
3393            | Self::Gemini25Pro
3394            | Self::Gemini3FlashPreview
3395            | Self::Gemini3ProPreview
3396            | Self::Gemini31FlashLite
3397            | Self::Gemini31FlashLiteImage
3398            | Self::Gemini31FlashLitePreview
3399            | Self::Gemini31FlashLivePreview
3400            | Self::Gemini31ProPreview
3401            | Self::Gemini31ProPreviewCustomtools
3402            | Self::Gemini35Flash
3403            | Self::Gemini35FlashLite
3404            | Self::Gemini36Flash
3405            | Self::GeminiRoboticsEr16Preview
3406            | Self::Gemma426bA4bIt
3407            | Self::Gemma431bIt => None,
3408        }
3409    }
3410    const ALL: &[GeminiModel] = &[
3411        Self::DeepResearchMaxPreview042026,
3412        Self::DeepResearchPreview042026,
3413        Self::Gemini20Flash,
3414        Self::Gemini20FlashLite,
3415        Self::Gemini25ComputerUsePreview102025,
3416        Self::Gemini25Flash,
3417        Self::Gemini25FlashLite,
3418        Self::Gemini25Pro,
3419        Self::Gemini3FlashPreview,
3420        Self::Gemini3ProPreview,
3421        Self::Gemini31FlashLite,
3422        Self::Gemini31FlashLiteImage,
3423        Self::Gemini31FlashLitePreview,
3424        Self::Gemini31FlashLivePreview,
3425        Self::Gemini31ProPreview,
3426        Self::Gemini31ProPreviewCustomtools,
3427        Self::Gemini35Flash,
3428        Self::Gemini35FlashLite,
3429        Self::Gemini36Flash,
3430        Self::GeminiRoboticsEr16Preview,
3431        Self::Gemma426bA4bIt,
3432        Self::Gemma431bIt,
3433    ];
3434}
3435impl std::str::FromStr for GeminiModel {
3436    type Err = String;
3437    #[allow(clippy::too_many_lines)]
3438    fn from_str(s: &str) -> Result<Self, Self::Err> {
3439        match s {
3440            "deep-research-max-preview-04-2026" => Ok(Self::DeepResearchMaxPreview042026),
3441            "deep-research-preview-04-2026" => Ok(Self::DeepResearchPreview042026),
3442            "gemini-2.0-flash" => Ok(Self::Gemini20Flash),
3443            "gemini-2.0-flash-lite" => Ok(Self::Gemini20FlashLite),
3444            "gemini-2.5-computer-use-preview-10-2025" => {
3445                Ok(Self::Gemini25ComputerUsePreview102025)
3446            }
3447            "gemini-2.5-flash" => Ok(Self::Gemini25Flash),
3448            "gemini-2.5-flash-lite" => Ok(Self::Gemini25FlashLite),
3449            "gemini-2.5-pro" => Ok(Self::Gemini25Pro),
3450            "gemini-3-flash-preview" => Ok(Self::Gemini3FlashPreview),
3451            "gemini-3-pro-preview" => Ok(Self::Gemini3ProPreview),
3452            "gemini-3.1-flash-lite" => Ok(Self::Gemini31FlashLite),
3453            "gemini-3.1-flash-lite-image" => Ok(Self::Gemini31FlashLiteImage),
3454            "gemini-3.1-flash-lite-preview" => Ok(Self::Gemini31FlashLitePreview),
3455            "gemini-3.1-flash-live-preview" => Ok(Self::Gemini31FlashLivePreview),
3456            "gemini-3.1-pro-preview" => Ok(Self::Gemini31ProPreview),
3457            "gemini-3.1-pro-preview-customtools" => {
3458                Ok(Self::Gemini31ProPreviewCustomtools)
3459            }
3460            "gemini-3.5-flash" => Ok(Self::Gemini35Flash),
3461            "gemini-3.5-flash-lite" => Ok(Self::Gemini35FlashLite),
3462            "gemini-3.6-flash" => Ok(Self::Gemini36Flash),
3463            "gemini-robotics-er-1.6-preview" => Ok(Self::GeminiRoboticsEr16Preview),
3464            "gemma-4-26b-a4b-it" => Ok(Self::Gemma426bA4bIt),
3465            "gemma-4-31b-it" => Ok(Self::Gemma431bIt),
3466            _ => Err(format!("Unknown gemini model: '{s}'")),
3467        }
3468    }
3469}
3470impl MoonshotModel {
3471    #[allow(clippy::too_many_lines)]
3472    fn model_id(self) -> &'static str {
3473        match self {
3474            Self::KimiK20711Preview => "kimi-k2-0711-preview",
3475            Self::KimiK20905Preview => "kimi-k2-0905-preview",
3476            Self::KimiK2Thinking => "kimi-k2-thinking",
3477            Self::KimiK2ThinkingTurbo => "kimi-k2-thinking-turbo",
3478            Self::KimiK2TurboPreview => "kimi-k2-turbo-preview",
3479            Self::KimiK25 => "kimi-k2.5",
3480            Self::KimiK26 => "kimi-k2.6",
3481            Self::KimiK27Code => "kimi-k2.7-code",
3482            Self::KimiK27CodeHighspeed => "kimi-k2.7-code-highspeed",
3483            Self::KimiK3 => "kimi-k3",
3484        }
3485    }
3486    #[allow(clippy::too_many_lines)]
3487    fn display_name(self) -> &'static str {
3488        match self {
3489            Self::KimiK20711Preview => "Kimi K2 0711",
3490            Self::KimiK20905Preview => "Kimi K2 0905",
3491            Self::KimiK2Thinking => "Kimi K2 Thinking",
3492            Self::KimiK2ThinkingTurbo => "Kimi K2 Thinking Turbo",
3493            Self::KimiK2TurboPreview => "Kimi K2 Turbo",
3494            Self::KimiK25 => "Kimi K2.5",
3495            Self::KimiK26 => "Kimi K2.6",
3496            Self::KimiK27Code => "Kimi K2.7 Code",
3497            Self::KimiK27CodeHighspeed => "Kimi K2.7 Code HighSpeed",
3498            Self::KimiK3 => "Kimi K3",
3499        }
3500    }
3501    #[allow(clippy::too_many_lines)]
3502    fn context_window(self) -> u32 {
3503        match self {
3504            Self::KimiK20711Preview => 131_072,
3505            Self::KimiK20905Preview
3506            | Self::KimiK2Thinking
3507            | Self::KimiK2ThinkingTurbo
3508            | Self::KimiK2TurboPreview
3509            | Self::KimiK25
3510            | Self::KimiK26
3511            | Self::KimiK27Code
3512            | Self::KimiK27CodeHighspeed => 262_144,
3513            Self::KimiK3 => 1_048_576,
3514        }
3515    }
3516    #[allow(clippy::too_many_lines)]
3517    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
3518        match self {
3519            Self::KimiK20711Preview
3520            | Self::KimiK20905Preview
3521            | Self::KimiK2TurboPreview => &[],
3522            Self::KimiK3 => {
3523                &[ReasoningEffort::Low, ReasoningEffort::High, ReasoningEffort::Max]
3524            }
3525            Self::KimiK2Thinking
3526            | Self::KimiK2ThinkingTurbo
3527            | Self::KimiK25
3528            | Self::KimiK26
3529            | Self::KimiK27Code
3530            | Self::KimiK27CodeHighspeed => {
3531                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
3532            }
3533        }
3534    }
3535    pub fn supports_reasoning(self) -> bool {
3536        !self.reasoning_levels().is_empty()
3537    }
3538    #[allow(clippy::too_many_lines)]
3539    pub fn supports_prompt_caching(self) -> bool {
3540        match self {
3541            Self::KimiK20711Preview
3542            | Self::KimiK20905Preview
3543            | Self::KimiK2Thinking
3544            | Self::KimiK2ThinkingTurbo
3545            | Self::KimiK2TurboPreview
3546            | Self::KimiK25
3547            | Self::KimiK26
3548            | Self::KimiK27Code
3549            | Self::KimiK27CodeHighspeed
3550            | Self::KimiK3 => true,
3551        }
3552    }
3553    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
3554    pub fn pricing(self) -> Option<ModelPricing> {
3555        match self {
3556            Self::KimiK20711Preview => {
3557                Some(ModelPricing {
3558                    input_per_million: 0.6f64,
3559                    output_per_million: 2.5f64,
3560                    cache_read_per_million: Some(0.15f64),
3561                    cache_write_per_million: None,
3562                })
3563            }
3564            Self::KimiK20905Preview => {
3565                Some(ModelPricing {
3566                    input_per_million: 0.6f64,
3567                    output_per_million: 2.5f64,
3568                    cache_read_per_million: Some(0.15f64),
3569                    cache_write_per_million: None,
3570                })
3571            }
3572            Self::KimiK2Thinking => {
3573                Some(ModelPricing {
3574                    input_per_million: 0.6f64,
3575                    output_per_million: 2.5f64,
3576                    cache_read_per_million: Some(0.15f64),
3577                    cache_write_per_million: None,
3578                })
3579            }
3580            Self::KimiK2ThinkingTurbo => {
3581                Some(ModelPricing {
3582                    input_per_million: 1.15f64,
3583                    output_per_million: 8f64,
3584                    cache_read_per_million: Some(0.15f64),
3585                    cache_write_per_million: None,
3586                })
3587            }
3588            Self::KimiK2TurboPreview => {
3589                Some(ModelPricing {
3590                    input_per_million: 2.4f64,
3591                    output_per_million: 10f64,
3592                    cache_read_per_million: Some(0.6f64),
3593                    cache_write_per_million: None,
3594                })
3595            }
3596            Self::KimiK25 => {
3597                Some(ModelPricing {
3598                    input_per_million: 0.6f64,
3599                    output_per_million: 3f64,
3600                    cache_read_per_million: Some(0.1f64),
3601                    cache_write_per_million: None,
3602                })
3603            }
3604            Self::KimiK26 => {
3605                Some(ModelPricing {
3606                    input_per_million: 0.95f64,
3607                    output_per_million: 4f64,
3608                    cache_read_per_million: Some(0.16f64),
3609                    cache_write_per_million: None,
3610                })
3611            }
3612            Self::KimiK27Code => {
3613                Some(ModelPricing {
3614                    input_per_million: 0.95f64,
3615                    output_per_million: 4f64,
3616                    cache_read_per_million: Some(0.19f64),
3617                    cache_write_per_million: None,
3618                })
3619            }
3620            Self::KimiK27CodeHighspeed => {
3621                Some(ModelPricing {
3622                    input_per_million: 1.9f64,
3623                    output_per_million: 8f64,
3624                    cache_read_per_million: Some(0.38f64),
3625                    cache_write_per_million: None,
3626                })
3627            }
3628            Self::KimiK3 => {
3629                Some(ModelPricing {
3630                    input_per_million: 3f64,
3631                    output_per_million: 15f64,
3632                    cache_read_per_million: Some(0.3f64),
3633                    cache_write_per_million: None,
3634                })
3635            }
3636        }
3637    }
3638    #[allow(clippy::too_many_lines)]
3639    pub fn supports_image(self) -> bool {
3640        match self {
3641            Self::KimiK20711Preview
3642            | Self::KimiK20905Preview
3643            | Self::KimiK2Thinking
3644            | Self::KimiK2ThinkingTurbo
3645            | Self::KimiK2TurboPreview => false,
3646            Self::KimiK25
3647            | Self::KimiK26
3648            | Self::KimiK27Code
3649            | Self::KimiK27CodeHighspeed
3650            | Self::KimiK3 => true,
3651        }
3652    }
3653    #[allow(clippy::too_many_lines)]
3654    pub fn supports_audio(self) -> bool {
3655        match self {
3656            Self::KimiK20711Preview
3657            | Self::KimiK20905Preview
3658            | Self::KimiK2Thinking
3659            | Self::KimiK2ThinkingTurbo
3660            | Self::KimiK2TurboPreview
3661            | Self::KimiK25
3662            | Self::KimiK26
3663            | Self::KimiK27Code
3664            | Self::KimiK27CodeHighspeed
3665            | Self::KimiK3 => false,
3666        }
3667    }
3668    #[allow(clippy::too_many_lines)]
3669    pub fn transport(self) -> Option<ModelTransport> {
3670        match self {
3671            Self::KimiK20711Preview
3672            | Self::KimiK20905Preview
3673            | Self::KimiK2Thinking
3674            | Self::KimiK2ThinkingTurbo
3675            | Self::KimiK2TurboPreview
3676            | Self::KimiK25
3677            | Self::KimiK26
3678            | Self::KimiK27Code
3679            | Self::KimiK27CodeHighspeed
3680            | Self::KimiK3 => None,
3681        }
3682    }
3683    const ALL: &[MoonshotModel] = &[
3684        Self::KimiK20711Preview,
3685        Self::KimiK20905Preview,
3686        Self::KimiK2Thinking,
3687        Self::KimiK2ThinkingTurbo,
3688        Self::KimiK2TurboPreview,
3689        Self::KimiK25,
3690        Self::KimiK26,
3691        Self::KimiK27Code,
3692        Self::KimiK27CodeHighspeed,
3693        Self::KimiK3,
3694    ];
3695}
3696impl std::str::FromStr for MoonshotModel {
3697    type Err = String;
3698    #[allow(clippy::too_many_lines)]
3699    fn from_str(s: &str) -> Result<Self, Self::Err> {
3700        match s {
3701            "kimi-k2-0711-preview" => Ok(Self::KimiK20711Preview),
3702            "kimi-k2-0905-preview" => Ok(Self::KimiK20905Preview),
3703            "kimi-k2-thinking" => Ok(Self::KimiK2Thinking),
3704            "kimi-k2-thinking-turbo" => Ok(Self::KimiK2ThinkingTurbo),
3705            "kimi-k2-turbo-preview" => Ok(Self::KimiK2TurboPreview),
3706            "kimi-k2.5" => Ok(Self::KimiK25),
3707            "kimi-k2.6" => Ok(Self::KimiK26),
3708            "kimi-k2.7-code" => Ok(Self::KimiK27Code),
3709            "kimi-k2.7-code-highspeed" => Ok(Self::KimiK27CodeHighspeed),
3710            "kimi-k3" => Ok(Self::KimiK3),
3711            _ => Err(format!("Unknown moonshot model: '{s}'")),
3712        }
3713    }
3714}
3715impl OpenaiModel {
3716    #[allow(clippy::too_many_lines)]
3717    fn model_id(self) -> &'static str {
3718        match self {
3719            Self::Gpt4 => "gpt-4",
3720            Self::Gpt4Turbo => "gpt-4-turbo",
3721            Self::Gpt41 => "gpt-4.1",
3722            Self::Gpt41Mini => "gpt-4.1-mini",
3723            Self::Gpt41Nano => "gpt-4.1-nano",
3724            Self::Gpt4o => "gpt-4o",
3725            Self::Gpt4o20240513 => "gpt-4o-2024-05-13",
3726            Self::Gpt4o20240806 => "gpt-4o-2024-08-06",
3727            Self::Gpt4o20241120 => "gpt-4o-2024-11-20",
3728            Self::Gpt4oMini => "gpt-4o-mini",
3729            Self::Gpt5 => "gpt-5",
3730            Self::Gpt5Mini => "gpt-5-mini",
3731            Self::Gpt5Nano => "gpt-5-nano",
3732            Self::Gpt5Pro => "gpt-5-pro",
3733            Self::Gpt51 => "gpt-5.1",
3734            Self::Gpt52 => "gpt-5.2",
3735            Self::Gpt52Pro => "gpt-5.2-pro",
3736            Self::Gpt53Codex => "gpt-5.3-codex",
3737            Self::Gpt53CodexSpark => "gpt-5.3-codex-spark",
3738            Self::Gpt54 => "gpt-5.4",
3739            Self::Gpt54Mini => "gpt-5.4-mini",
3740            Self::Gpt54Nano => "gpt-5.4-nano",
3741            Self::Gpt54Pro => "gpt-5.4-pro",
3742            Self::Gpt55 => "gpt-5.5",
3743            Self::Gpt55Pro => "gpt-5.5-pro",
3744            Self::Gpt56 => "gpt-5.6",
3745            Self::Gpt56Luna => "gpt-5.6-luna",
3746            Self::Gpt56Sol => "gpt-5.6-sol",
3747            Self::Gpt56Terra => "gpt-5.6-terra",
3748            Self::GptRealtime21 => "gpt-realtime-2.1",
3749            Self::O1 => "o1",
3750            Self::O1Pro => "o1-pro",
3751            Self::O3 => "o3",
3752            Self::O3Mini => "o3-mini",
3753            Self::O3Pro => "o3-pro",
3754            Self::O4Mini => "o4-mini",
3755        }
3756    }
3757    #[allow(clippy::too_many_lines)]
3758    fn display_name(self) -> &'static str {
3759        match self {
3760            Self::Gpt4 => "GPT-4",
3761            Self::Gpt4Turbo => "GPT-4 Turbo",
3762            Self::Gpt41 => "GPT-4.1",
3763            Self::Gpt41Mini => "GPT-4.1 mini",
3764            Self::Gpt41Nano => "GPT-4.1 nano",
3765            Self::Gpt4o => "GPT-4o",
3766            Self::Gpt4o20240513 => "GPT-4o (2024-05-13)",
3767            Self::Gpt4o20240806 => "GPT-4o (2024-08-06)",
3768            Self::Gpt4o20241120 => "GPT-4o (2024-11-20)",
3769            Self::Gpt4oMini => "GPT-4o mini",
3770            Self::Gpt5 => "GPT-5",
3771            Self::Gpt5Mini => "GPT-5 Mini",
3772            Self::Gpt5Nano => "GPT-5 Nano",
3773            Self::Gpt5Pro => "GPT-5 Pro",
3774            Self::Gpt51 => "GPT-5.1",
3775            Self::Gpt52 => "GPT-5.2",
3776            Self::Gpt52Pro => "GPT-5.2 Pro",
3777            Self::Gpt53Codex => "GPT-5.3 Codex",
3778            Self::Gpt53CodexSpark => "GPT-5.3 Codex Spark",
3779            Self::Gpt54 => "GPT-5.4",
3780            Self::Gpt54Pro => "GPT-5.4 Pro",
3781            Self::Gpt54Mini => "GPT-5.4 mini",
3782            Self::Gpt54Nano => "GPT-5.4 nano",
3783            Self::Gpt55 => "GPT-5.5",
3784            Self::Gpt55Pro => "GPT-5.5 Pro",
3785            Self::Gpt56 => "GPT-5.6",
3786            Self::Gpt56Luna => "GPT-5.6 Luna",
3787            Self::Gpt56Sol => "GPT-5.6 Sol",
3788            Self::Gpt56Terra => "GPT-5.6 Terra",
3789            Self::GptRealtime21 => "GPT-Realtime-2.1",
3790            Self::O1 => "o1",
3791            Self::O1Pro => "o1-pro",
3792            Self::O3 => "o3",
3793            Self::O3Mini => "o3-mini",
3794            Self::O3Pro => "o3-pro",
3795            Self::O4Mini => "o4-mini",
3796        }
3797    }
3798    #[allow(clippy::too_many_lines)]
3799    fn context_window(self) -> u32 {
3800        match self {
3801            Self::Gpt4 => 8192,
3802            Self::Gpt4Turbo
3803            | Self::Gpt4o
3804            | Self::Gpt4o20240513
3805            | Self::Gpt4o20240806
3806            | Self::Gpt4o20241120
3807            | Self::Gpt4oMini
3808            | Self::Gpt53CodexSpark
3809            | Self::GptRealtime21 => 128_000,
3810            Self::O1
3811            | Self::O1Pro
3812            | Self::O3
3813            | Self::O3Mini
3814            | Self::O3Pro
3815            | Self::O4Mini => 200_000,
3816            Self::Gpt5
3817            | Self::Gpt5Mini
3818            | Self::Gpt5Nano
3819            | Self::Gpt5Pro
3820            | Self::Gpt51
3821            | Self::Gpt52
3822            | Self::Gpt52Pro
3823            | Self::Gpt53Codex
3824            | Self::Gpt54Mini
3825            | Self::Gpt54Nano => 400_000,
3826            Self::Gpt41 | Self::Gpt41Mini | Self::Gpt41Nano => 1_047_576,
3827            Self::Gpt54
3828            | Self::Gpt54Pro
3829            | Self::Gpt55
3830            | Self::Gpt55Pro
3831            | Self::Gpt56
3832            | Self::Gpt56Luna
3833            | Self::Gpt56Sol
3834            | Self::Gpt56Terra => 1_050_000,
3835        }
3836    }
3837    #[allow(clippy::too_many_lines)]
3838    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
3839        match self {
3840            Self::Gpt4
3841            | Self::Gpt4Turbo
3842            | Self::Gpt41
3843            | Self::Gpt41Mini
3844            | Self::Gpt41Nano
3845            | Self::Gpt4o
3846            | Self::Gpt4o20240513
3847            | Self::Gpt4o20240806
3848            | Self::Gpt4o20241120
3849            | Self::Gpt4oMini => &[],
3850            Self::Gpt5Pro => &[ReasoningEffort::High],
3851            Self::Gpt51
3852            | Self::O1
3853            | Self::O1Pro
3854            | Self::O3
3855            | Self::O3Mini
3856            | Self::O3Pro
3857            | Self::O4Mini => {
3858                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
3859            }
3860            Self::Gpt52
3861            | Self::Gpt53Codex
3862            | Self::Gpt53CodexSpark
3863            | Self::Gpt54
3864            | Self::Gpt54Mini
3865            | Self::Gpt54Nano
3866            | Self::Gpt55 => {
3867                &[
3868                    ReasoningEffort::Low,
3869                    ReasoningEffort::Medium,
3870                    ReasoningEffort::High,
3871                    ReasoningEffort::Xhigh,
3872                ]
3873            }
3874            Self::Gpt56 | Self::Gpt56Luna | Self::Gpt56Sol | Self::Gpt56Terra => {
3875                &[
3876                    ReasoningEffort::Low,
3877                    ReasoningEffort::Medium,
3878                    ReasoningEffort::High,
3879                    ReasoningEffort::Xhigh,
3880                    ReasoningEffort::Max,
3881                ]
3882            }
3883            Self::Gpt52Pro | Self::Gpt54Pro | Self::Gpt55Pro => {
3884                &[ReasoningEffort::Medium, ReasoningEffort::High, ReasoningEffort::Xhigh]
3885            }
3886            Self::Gpt5 | Self::Gpt5Mini | Self::Gpt5Nano => {
3887                &[
3888                    ReasoningEffort::Minimal,
3889                    ReasoningEffort::Low,
3890                    ReasoningEffort::Medium,
3891                    ReasoningEffort::High,
3892                ]
3893            }
3894            Self::GptRealtime21 => {
3895                &[
3896                    ReasoningEffort::Minimal,
3897                    ReasoningEffort::Low,
3898                    ReasoningEffort::Medium,
3899                    ReasoningEffort::High,
3900                    ReasoningEffort::Xhigh,
3901                ]
3902            }
3903        }
3904    }
3905    pub fn supports_reasoning(self) -> bool {
3906        !self.reasoning_levels().is_empty()
3907    }
3908    #[allow(clippy::too_many_lines)]
3909    pub fn supports_prompt_caching(self) -> bool {
3910        match self {
3911            Self::Gpt4
3912            | Self::Gpt4Turbo
3913            | Self::Gpt4o20240513
3914            | Self::Gpt5Pro
3915            | Self::Gpt52Pro
3916            | Self::Gpt54Pro
3917            | Self::Gpt55Pro
3918            | Self::O1Pro
3919            | Self::O3Pro => false,
3920            Self::Gpt41
3921            | Self::Gpt41Mini
3922            | Self::Gpt41Nano
3923            | Self::Gpt4o
3924            | Self::Gpt4o20240806
3925            | Self::Gpt4o20241120
3926            | Self::Gpt4oMini
3927            | Self::Gpt5
3928            | Self::Gpt5Mini
3929            | Self::Gpt5Nano
3930            | Self::Gpt51
3931            | Self::Gpt52
3932            | Self::Gpt53Codex
3933            | Self::Gpt53CodexSpark
3934            | Self::Gpt54
3935            | Self::Gpt54Mini
3936            | Self::Gpt54Nano
3937            | Self::Gpt55
3938            | Self::Gpt56
3939            | Self::Gpt56Luna
3940            | Self::Gpt56Sol
3941            | Self::Gpt56Terra
3942            | Self::GptRealtime21
3943            | Self::O1
3944            | Self::O3
3945            | Self::O3Mini
3946            | Self::O4Mini => true,
3947        }
3948    }
3949    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
3950    pub fn pricing(self) -> Option<ModelPricing> {
3951        match self {
3952            Self::Gpt4 => {
3953                Some(ModelPricing {
3954                    input_per_million: 30f64,
3955                    output_per_million: 60f64,
3956                    cache_read_per_million: None,
3957                    cache_write_per_million: None,
3958                })
3959            }
3960            Self::Gpt4Turbo => {
3961                Some(ModelPricing {
3962                    input_per_million: 10f64,
3963                    output_per_million: 30f64,
3964                    cache_read_per_million: None,
3965                    cache_write_per_million: None,
3966                })
3967            }
3968            Self::Gpt41 => {
3969                Some(ModelPricing {
3970                    input_per_million: 2f64,
3971                    output_per_million: 8f64,
3972                    cache_read_per_million: Some(0.5f64),
3973                    cache_write_per_million: None,
3974                })
3975            }
3976            Self::Gpt41Mini => {
3977                Some(ModelPricing {
3978                    input_per_million: 0.4f64,
3979                    output_per_million: 1.6f64,
3980                    cache_read_per_million: Some(0.1f64),
3981                    cache_write_per_million: None,
3982                })
3983            }
3984            Self::Gpt41Nano => {
3985                Some(ModelPricing {
3986                    input_per_million: 0.1f64,
3987                    output_per_million: 0.4f64,
3988                    cache_read_per_million: Some(0.025f64),
3989                    cache_write_per_million: None,
3990                })
3991            }
3992            Self::Gpt4o => {
3993                Some(ModelPricing {
3994                    input_per_million: 2.5f64,
3995                    output_per_million: 10f64,
3996                    cache_read_per_million: Some(1.25f64),
3997                    cache_write_per_million: None,
3998                })
3999            }
4000            Self::Gpt4o20240513 => {
4001                Some(ModelPricing {
4002                    input_per_million: 5f64,
4003                    output_per_million: 15f64,
4004                    cache_read_per_million: None,
4005                    cache_write_per_million: None,
4006                })
4007            }
4008            Self::Gpt4o20240806 => {
4009                Some(ModelPricing {
4010                    input_per_million: 2.5f64,
4011                    output_per_million: 10f64,
4012                    cache_read_per_million: Some(1.25f64),
4013                    cache_write_per_million: None,
4014                })
4015            }
4016            Self::Gpt4o20241120 => {
4017                Some(ModelPricing {
4018                    input_per_million: 2.5f64,
4019                    output_per_million: 10f64,
4020                    cache_read_per_million: Some(1.25f64),
4021                    cache_write_per_million: None,
4022                })
4023            }
4024            Self::Gpt4oMini => {
4025                Some(ModelPricing {
4026                    input_per_million: 0.15f64,
4027                    output_per_million: 0.6f64,
4028                    cache_read_per_million: Some(0.075f64),
4029                    cache_write_per_million: None,
4030                })
4031            }
4032            Self::Gpt5 => {
4033                Some(ModelPricing {
4034                    input_per_million: 1.25f64,
4035                    output_per_million: 10f64,
4036                    cache_read_per_million: Some(0.125f64),
4037                    cache_write_per_million: None,
4038                })
4039            }
4040            Self::Gpt5Mini => {
4041                Some(ModelPricing {
4042                    input_per_million: 0.25f64,
4043                    output_per_million: 2f64,
4044                    cache_read_per_million: Some(0.025f64),
4045                    cache_write_per_million: None,
4046                })
4047            }
4048            Self::Gpt5Nano => {
4049                Some(ModelPricing {
4050                    input_per_million: 0.05f64,
4051                    output_per_million: 0.4f64,
4052                    cache_read_per_million: Some(0.005f64),
4053                    cache_write_per_million: None,
4054                })
4055            }
4056            Self::Gpt5Pro => {
4057                Some(ModelPricing {
4058                    input_per_million: 15f64,
4059                    output_per_million: 120f64,
4060                    cache_read_per_million: None,
4061                    cache_write_per_million: None,
4062                })
4063            }
4064            Self::Gpt51 => {
4065                Some(ModelPricing {
4066                    input_per_million: 1.25f64,
4067                    output_per_million: 10f64,
4068                    cache_read_per_million: Some(0.125f64),
4069                    cache_write_per_million: None,
4070                })
4071            }
4072            Self::Gpt52 => {
4073                Some(ModelPricing {
4074                    input_per_million: 1.75f64,
4075                    output_per_million: 14f64,
4076                    cache_read_per_million: Some(0.175f64),
4077                    cache_write_per_million: None,
4078                })
4079            }
4080            Self::Gpt52Pro => {
4081                Some(ModelPricing {
4082                    input_per_million: 21f64,
4083                    output_per_million: 168f64,
4084                    cache_read_per_million: None,
4085                    cache_write_per_million: None,
4086                })
4087            }
4088            Self::Gpt53Codex => {
4089                Some(ModelPricing {
4090                    input_per_million: 1.75f64,
4091                    output_per_million: 14f64,
4092                    cache_read_per_million: Some(0.175f64),
4093                    cache_write_per_million: None,
4094                })
4095            }
4096            Self::Gpt53CodexSpark => {
4097                Some(ModelPricing {
4098                    input_per_million: 1.75f64,
4099                    output_per_million: 14f64,
4100                    cache_read_per_million: Some(0.175f64),
4101                    cache_write_per_million: None,
4102                })
4103            }
4104            Self::Gpt54 => {
4105                Some(ModelPricing {
4106                    input_per_million: 2.5f64,
4107                    output_per_million: 15f64,
4108                    cache_read_per_million: Some(0.25f64),
4109                    cache_write_per_million: None,
4110                })
4111            }
4112            Self::Gpt54Mini => {
4113                Some(ModelPricing {
4114                    input_per_million: 0.75f64,
4115                    output_per_million: 4.5f64,
4116                    cache_read_per_million: Some(0.075f64),
4117                    cache_write_per_million: None,
4118                })
4119            }
4120            Self::Gpt54Nano => {
4121                Some(ModelPricing {
4122                    input_per_million: 0.2f64,
4123                    output_per_million: 1.25f64,
4124                    cache_read_per_million: Some(0.02f64),
4125                    cache_write_per_million: None,
4126                })
4127            }
4128            Self::Gpt54Pro => {
4129                Some(ModelPricing {
4130                    input_per_million: 30f64,
4131                    output_per_million: 180f64,
4132                    cache_read_per_million: None,
4133                    cache_write_per_million: None,
4134                })
4135            }
4136            Self::Gpt55 => {
4137                Some(ModelPricing {
4138                    input_per_million: 5f64,
4139                    output_per_million: 30f64,
4140                    cache_read_per_million: Some(0.5f64),
4141                    cache_write_per_million: None,
4142                })
4143            }
4144            Self::Gpt55Pro => {
4145                Some(ModelPricing {
4146                    input_per_million: 30f64,
4147                    output_per_million: 180f64,
4148                    cache_read_per_million: None,
4149                    cache_write_per_million: None,
4150                })
4151            }
4152            Self::Gpt56 => {
4153                Some(ModelPricing {
4154                    input_per_million: 5f64,
4155                    output_per_million: 30f64,
4156                    cache_read_per_million: Some(0.5f64),
4157                    cache_write_per_million: Some(6.25f64),
4158                })
4159            }
4160            Self::Gpt56Luna => {
4161                Some(ModelPricing {
4162                    input_per_million: 0.2f64,
4163                    output_per_million: 1.2f64,
4164                    cache_read_per_million: Some(0.02f64),
4165                    cache_write_per_million: Some(0.25f64),
4166                })
4167            }
4168            Self::Gpt56Sol => {
4169                Some(ModelPricing {
4170                    input_per_million: 5f64,
4171                    output_per_million: 30f64,
4172                    cache_read_per_million: Some(0.5f64),
4173                    cache_write_per_million: Some(6.25f64),
4174                })
4175            }
4176            Self::Gpt56Terra => {
4177                Some(ModelPricing {
4178                    input_per_million: 2f64,
4179                    output_per_million: 12f64,
4180                    cache_read_per_million: Some(0.2f64),
4181                    cache_write_per_million: Some(2.5f64),
4182                })
4183            }
4184            Self::GptRealtime21 => {
4185                Some(ModelPricing {
4186                    input_per_million: 4f64,
4187                    output_per_million: 24f64,
4188                    cache_read_per_million: Some(0.4f64),
4189                    cache_write_per_million: None,
4190                })
4191            }
4192            Self::O1 => {
4193                Some(ModelPricing {
4194                    input_per_million: 15f64,
4195                    output_per_million: 60f64,
4196                    cache_read_per_million: Some(7.5f64),
4197                    cache_write_per_million: None,
4198                })
4199            }
4200            Self::O1Pro => {
4201                Some(ModelPricing {
4202                    input_per_million: 150f64,
4203                    output_per_million: 600f64,
4204                    cache_read_per_million: None,
4205                    cache_write_per_million: None,
4206                })
4207            }
4208            Self::O3 => {
4209                Some(ModelPricing {
4210                    input_per_million: 2f64,
4211                    output_per_million: 8f64,
4212                    cache_read_per_million: Some(0.5f64),
4213                    cache_write_per_million: None,
4214                })
4215            }
4216            Self::O3Mini => {
4217                Some(ModelPricing {
4218                    input_per_million: 1.1f64,
4219                    output_per_million: 4.4f64,
4220                    cache_read_per_million: Some(0.55f64),
4221                    cache_write_per_million: None,
4222                })
4223            }
4224            Self::O3Pro => {
4225                Some(ModelPricing {
4226                    input_per_million: 20f64,
4227                    output_per_million: 80f64,
4228                    cache_read_per_million: None,
4229                    cache_write_per_million: None,
4230                })
4231            }
4232            Self::O4Mini => {
4233                Some(ModelPricing {
4234                    input_per_million: 1.1f64,
4235                    output_per_million: 4.4f64,
4236                    cache_read_per_million: Some(0.275f64),
4237                    cache_write_per_million: None,
4238                })
4239            }
4240        }
4241    }
4242    #[allow(clippy::too_many_lines)]
4243    pub fn supports_image(self) -> bool {
4244        match self {
4245            Self::Gpt4 | Self::O3Mini => false,
4246            Self::Gpt4Turbo
4247            | Self::Gpt41
4248            | Self::Gpt41Mini
4249            | Self::Gpt41Nano
4250            | Self::Gpt4o
4251            | Self::Gpt4o20240513
4252            | Self::Gpt4o20240806
4253            | Self::Gpt4o20241120
4254            | Self::Gpt4oMini
4255            | Self::Gpt5
4256            | Self::Gpt5Mini
4257            | Self::Gpt5Nano
4258            | Self::Gpt5Pro
4259            | Self::Gpt51
4260            | Self::Gpt52
4261            | Self::Gpt52Pro
4262            | Self::Gpt53Codex
4263            | Self::Gpt53CodexSpark
4264            | Self::Gpt54
4265            | Self::Gpt54Mini
4266            | Self::Gpt54Nano
4267            | Self::Gpt54Pro
4268            | Self::Gpt55
4269            | Self::Gpt55Pro
4270            | Self::Gpt56
4271            | Self::Gpt56Luna
4272            | Self::Gpt56Sol
4273            | Self::Gpt56Terra
4274            | Self::GptRealtime21
4275            | Self::O1
4276            | Self::O1Pro
4277            | Self::O3
4278            | Self::O3Pro
4279            | Self::O4Mini => true,
4280        }
4281    }
4282    #[allow(clippy::too_many_lines)]
4283    pub fn supports_audio(self) -> bool {
4284        match self {
4285            Self::Gpt4
4286            | Self::Gpt4Turbo
4287            | Self::Gpt41
4288            | Self::Gpt41Mini
4289            | Self::Gpt41Nano
4290            | Self::Gpt4o
4291            | Self::Gpt4o20240513
4292            | Self::Gpt4o20240806
4293            | Self::Gpt4o20241120
4294            | Self::Gpt4oMini
4295            | Self::Gpt5
4296            | Self::Gpt5Mini
4297            | Self::Gpt5Nano
4298            | Self::Gpt5Pro
4299            | Self::Gpt51
4300            | Self::Gpt52
4301            | Self::Gpt52Pro
4302            | Self::Gpt53Codex
4303            | Self::Gpt53CodexSpark
4304            | Self::Gpt54
4305            | Self::Gpt54Mini
4306            | Self::Gpt54Nano
4307            | Self::Gpt54Pro
4308            | Self::Gpt55
4309            | Self::Gpt55Pro
4310            | Self::Gpt56
4311            | Self::Gpt56Luna
4312            | Self::Gpt56Sol
4313            | Self::Gpt56Terra
4314            | Self::O1
4315            | Self::O1Pro
4316            | Self::O3
4317            | Self::O3Mini
4318            | Self::O3Pro
4319            | Self::O4Mini => false,
4320            Self::GptRealtime21 => true,
4321        }
4322    }
4323    #[allow(clippy::too_many_lines)]
4324    pub fn transport(self) -> Option<ModelTransport> {
4325        match self {
4326            Self::Gpt4
4327            | Self::Gpt4Turbo
4328            | Self::Gpt41
4329            | Self::Gpt41Mini
4330            | Self::Gpt41Nano
4331            | Self::Gpt4o
4332            | Self::Gpt4o20240513
4333            | Self::Gpt4o20240806
4334            | Self::Gpt4o20241120
4335            | Self::Gpt4oMini
4336            | Self::Gpt5
4337            | Self::Gpt5Mini
4338            | Self::Gpt5Nano
4339            | Self::Gpt5Pro
4340            | Self::Gpt51
4341            | Self::Gpt52
4342            | Self::Gpt52Pro
4343            | Self::Gpt53Codex
4344            | Self::Gpt53CodexSpark
4345            | Self::Gpt54
4346            | Self::Gpt54Mini
4347            | Self::Gpt54Nano
4348            | Self::Gpt54Pro
4349            | Self::Gpt55
4350            | Self::Gpt55Pro
4351            | Self::Gpt56
4352            | Self::Gpt56Luna
4353            | Self::Gpt56Sol
4354            | Self::Gpt56Terra
4355            | Self::GptRealtime21
4356            | Self::O1
4357            | Self::O1Pro
4358            | Self::O3
4359            | Self::O3Mini
4360            | Self::O3Pro
4361            | Self::O4Mini => None,
4362        }
4363    }
4364    const ALL: &[OpenaiModel] = &[
4365        Self::Gpt4,
4366        Self::Gpt4Turbo,
4367        Self::Gpt41,
4368        Self::Gpt41Mini,
4369        Self::Gpt41Nano,
4370        Self::Gpt4o,
4371        Self::Gpt4o20240513,
4372        Self::Gpt4o20240806,
4373        Self::Gpt4o20241120,
4374        Self::Gpt4oMini,
4375        Self::Gpt5,
4376        Self::Gpt5Mini,
4377        Self::Gpt5Nano,
4378        Self::Gpt5Pro,
4379        Self::Gpt51,
4380        Self::Gpt52,
4381        Self::Gpt52Pro,
4382        Self::Gpt53Codex,
4383        Self::Gpt53CodexSpark,
4384        Self::Gpt54,
4385        Self::Gpt54Mini,
4386        Self::Gpt54Nano,
4387        Self::Gpt54Pro,
4388        Self::Gpt55,
4389        Self::Gpt55Pro,
4390        Self::Gpt56,
4391        Self::Gpt56Luna,
4392        Self::Gpt56Sol,
4393        Self::Gpt56Terra,
4394        Self::GptRealtime21,
4395        Self::O1,
4396        Self::O1Pro,
4397        Self::O3,
4398        Self::O3Mini,
4399        Self::O3Pro,
4400        Self::O4Mini,
4401    ];
4402}
4403impl std::str::FromStr for OpenaiModel {
4404    type Err = String;
4405    #[allow(clippy::too_many_lines)]
4406    fn from_str(s: &str) -> Result<Self, Self::Err> {
4407        match s {
4408            "gpt-4" => Ok(Self::Gpt4),
4409            "gpt-4-turbo" => Ok(Self::Gpt4Turbo),
4410            "gpt-4.1" => Ok(Self::Gpt41),
4411            "gpt-4.1-mini" => Ok(Self::Gpt41Mini),
4412            "gpt-4.1-nano" => Ok(Self::Gpt41Nano),
4413            "gpt-4o" => Ok(Self::Gpt4o),
4414            "gpt-4o-2024-05-13" => Ok(Self::Gpt4o20240513),
4415            "gpt-4o-2024-08-06" => Ok(Self::Gpt4o20240806),
4416            "gpt-4o-2024-11-20" => Ok(Self::Gpt4o20241120),
4417            "gpt-4o-mini" => Ok(Self::Gpt4oMini),
4418            "gpt-5" => Ok(Self::Gpt5),
4419            "gpt-5-mini" => Ok(Self::Gpt5Mini),
4420            "gpt-5-nano" => Ok(Self::Gpt5Nano),
4421            "gpt-5-pro" => Ok(Self::Gpt5Pro),
4422            "gpt-5.1" => Ok(Self::Gpt51),
4423            "gpt-5.2" => Ok(Self::Gpt52),
4424            "gpt-5.2-pro" => Ok(Self::Gpt52Pro),
4425            "gpt-5.3-codex" => Ok(Self::Gpt53Codex),
4426            "gpt-5.3-codex-spark" => Ok(Self::Gpt53CodexSpark),
4427            "gpt-5.4" => Ok(Self::Gpt54),
4428            "gpt-5.4-mini" => Ok(Self::Gpt54Mini),
4429            "gpt-5.4-nano" => Ok(Self::Gpt54Nano),
4430            "gpt-5.4-pro" => Ok(Self::Gpt54Pro),
4431            "gpt-5.5" => Ok(Self::Gpt55),
4432            "gpt-5.5-pro" => Ok(Self::Gpt55Pro),
4433            "gpt-5.6" => Ok(Self::Gpt56),
4434            "gpt-5.6-luna" => Ok(Self::Gpt56Luna),
4435            "gpt-5.6-sol" => Ok(Self::Gpt56Sol),
4436            "gpt-5.6-terra" => Ok(Self::Gpt56Terra),
4437            "gpt-realtime-2.1" => Ok(Self::GptRealtime21),
4438            "o1" => Ok(Self::O1),
4439            "o1-pro" => Ok(Self::O1Pro),
4440            "o3" => Ok(Self::O3),
4441            "o3-mini" => Ok(Self::O3Mini),
4442            "o3-pro" => Ok(Self::O3Pro),
4443            "o4-mini" => Ok(Self::O4Mini),
4444            _ => Err(format!("Unknown openai model: '{s}'")),
4445        }
4446    }
4447}
4448impl OpenRouterModel {
4449    #[allow(clippy::too_many_lines)]
4450    fn model_id(self) -> &'static str {
4451        match self {
4452            Self::Ai21JambaLarge17 => "ai21/jamba-large-1.7",
4453            Self::AionLabsAion20 => "aion-labs/aion-2.0",
4454            Self::AionLabsAion30 => "aion-labs/aion-3.0",
4455            Self::AionLabsAion30Mini => "aion-labs/aion-3.0-mini",
4456            Self::AmazonNova2LiteV1 => "amazon/nova-2-lite-v1",
4457            Self::AmazonNovaLiteV1 => "amazon/nova-lite-v1",
4458            Self::AmazonNovaMicroV1 => "amazon/nova-micro-v1",
4459            Self::AmazonNovaPremierV1 => "amazon/nova-premier-v1",
4460            Self::AmazonNovaProV1 => "amazon/nova-pro-v1",
4461            Self::AnthropicClaude3Haiku => "anthropic/claude-3-haiku",
4462            Self::AnthropicClaudeFable5 => "anthropic/claude-fable-5",
4463            Self::AnthropicClaudeHaiku45 => "anthropic/claude-haiku-4.5",
4464            Self::AnthropicClaudeOpus4 => "anthropic/claude-opus-4",
4465            Self::AnthropicClaudeOpus41 => "anthropic/claude-opus-4.1",
4466            Self::AnthropicClaudeOpus45 => "anthropic/claude-opus-4.5",
4467            Self::AnthropicClaudeOpus46 => "anthropic/claude-opus-4.6",
4468            Self::AnthropicClaudeOpus47 => "anthropic/claude-opus-4.7",
4469            Self::AnthropicClaudeOpus47Fast => "anthropic/claude-opus-4.7-fast",
4470            Self::AnthropicClaudeOpus48 => "anthropic/claude-opus-4.8",
4471            Self::AnthropicClaudeOpus48Fast => "anthropic/claude-opus-4.8-fast",
4472            Self::AnthropicClaudeOpus5 => "anthropic/claude-opus-5",
4473            Self::AnthropicClaudeOpus5Fast => "anthropic/claude-opus-5-fast",
4474            Self::AnthropicClaudeSonnet4 => "anthropic/claude-sonnet-4",
4475            Self::AnthropicClaudeSonnet45 => "anthropic/claude-sonnet-4.5",
4476            Self::AnthropicClaudeSonnet46 => "anthropic/claude-sonnet-4.6",
4477            Self::AnthropicClaudeSonnet5 => "anthropic/claude-sonnet-5",
4478            Self::ArceeAiTrinityLargeThinking => "arcee-ai/trinity-large-thinking",
4479            Self::ArceeAiVirtuosoLarge => "arcee-ai/virtuoso-large",
4480            Self::BytedanceSeedSeed16 => "bytedance-seed/seed-1.6",
4481            Self::BytedanceSeedSeed16Flash => "bytedance-seed/seed-1.6-flash",
4482            Self::BytedanceSeedSeed20Lite => "bytedance-seed/seed-2.0-lite",
4483            Self::BytedanceSeedSeed20Mini => "bytedance-seed/seed-2.0-mini",
4484            Self::CohereCommandR082024 => "cohere/command-r-08-2024",
4485            Self::CohereCommandRPlus082024 => "cohere/command-r-plus-08-2024",
4486            Self::CohereNorthMiniCodeFree => "cohere/north-mini-code:free",
4487            Self::DeepseekDeepseekChat => "deepseek/deepseek-chat",
4488            Self::DeepseekDeepseekChatV30324 => "deepseek/deepseek-chat-v3-0324",
4489            Self::DeepseekDeepseekChatV31 => "deepseek/deepseek-chat-v3.1",
4490            Self::DeepseekDeepseekR1 => "deepseek/deepseek-r1",
4491            Self::DeepseekDeepseekR10528 => "deepseek/deepseek-r1-0528",
4492            Self::DeepseekDeepseekV31Terminus => "deepseek/deepseek-v3.1-terminus",
4493            Self::DeepseekDeepseekV32 => "deepseek/deepseek-v3.2",
4494            Self::DeepseekDeepseekV32Exp => "deepseek/deepseek-v3.2-exp",
4495            Self::DeepseekDeepseekV4Flash => "deepseek/deepseek-v4-flash",
4496            Self::DeepseekDeepseekV4Flash0731 => "deepseek/deepseek-v4-flash-0731",
4497            Self::DeepseekDeepseekV4Pro => "deepseek/deepseek-v4-pro",
4498            Self::GoogleGemini25Flash => "google/gemini-2.5-flash",
4499            Self::GoogleGemini25FlashLite => "google/gemini-2.5-flash-lite",
4500            Self::GoogleGemini25Pro => "google/gemini-2.5-pro",
4501            Self::GoogleGemini25ProPreview => "google/gemini-2.5-pro-preview",
4502            Self::GoogleGemini25ProPreview0506 => "google/gemini-2.5-pro-preview-05-06",
4503            Self::GoogleGemini3FlashPreview => "google/gemini-3-flash-preview",
4504            Self::GoogleGemini3ProImage => "google/gemini-3-pro-image",
4505            Self::GoogleGemini31FlashLite => "google/gemini-3.1-flash-lite",
4506            Self::GoogleGemini31FlashLitePreview => {
4507                "google/gemini-3.1-flash-lite-preview"
4508            }
4509            Self::GoogleGemini31ProPreview => "google/gemini-3.1-pro-preview",
4510            Self::GoogleGemini31ProPreviewCustomtools => {
4511                "google/gemini-3.1-pro-preview-customtools"
4512            }
4513            Self::GoogleGemini35Flash => "google/gemini-3.5-flash",
4514            Self::GoogleGemini35FlashLite => "google/gemini-3.5-flash-lite",
4515            Self::GoogleGemini36Flash => "google/gemini-3.6-flash",
4516            Self::GoogleGemma312bIt => "google/gemma-3-12b-it",
4517            Self::GoogleGemma327bIt => "google/gemma-3-27b-it",
4518            Self::GoogleGemma426bA4bIt => "google/gemma-4-26b-a4b-it",
4519            Self::GoogleGemma426bA4bItFree => "google/gemma-4-26b-a4b-it:free",
4520            Self::GoogleGemma431bIt => "google/gemma-4-31b-it",
4521            Self::GoogleGemma431bItFree => "google/gemma-4-31b-it:free",
4522            Self::IbmGraniteGranite418b => "ibm-granite/granite-4.1-8b",
4523            Self::InceptionMercury2 => "inception/mercury-2",
4524            Self::InclusionaiLing261t => "inclusionai/ling-2.6-1t",
4525            Self::InclusionaiLing26Flash => "inclusionai/ling-2.6-flash",
4526            Self::InclusionaiLing30FlashFree => "inclusionai/ling-3.0-flash:free",
4527            Self::InclusionaiRing261t => "inclusionai/ring-2.6-1t",
4528            Self::KwaipilotKatCoderAirV25 => "kwaipilot/kat-coder-air-v2.5",
4529            Self::KwaipilotKatCoderProV2 => "kwaipilot/kat-coder-pro-v2",
4530            Self::KwaipilotKatCoderProV25 => "kwaipilot/kat-coder-pro-v2.5",
4531            Self::MeituanLongcat20 => "meituan/longcat-2.0",
4532            Self::MetaLlamaLlama3170bInstruct => "meta-llama/llama-3.1-70b-instruct",
4533            Self::MetaLlamaLlama318bInstruct => "meta-llama/llama-3.1-8b-instruct",
4534            Self::MetaLlamaLlama3370bInstruct => "meta-llama/llama-3.3-70b-instruct",
4535            Self::MetaLlamaLlama4Maverick => "meta-llama/llama-4-maverick",
4536            Self::MetaLlamaLlama4Scout => "meta-llama/llama-4-scout",
4537            Self::MetaMuseSpark11 => "meta/muse-spark-1.1",
4538            Self::MinimaxMinimaxM1 => "minimax/minimax-m1",
4539            Self::MinimaxMinimaxM2 => "minimax/minimax-m2",
4540            Self::MinimaxMinimaxM21 => "minimax/minimax-m2.1",
4541            Self::MinimaxMinimaxM25 => "minimax/minimax-m2.5",
4542            Self::MinimaxMinimaxM27 => "minimax/minimax-m2.7",
4543            Self::MinimaxMinimaxM3 => "minimax/minimax-m3",
4544            Self::MistralaiCodestral2508 => "mistralai/codestral-2508",
4545            Self::MistralaiMinistral14b2512 => "mistralai/ministral-14b-2512",
4546            Self::MistralaiMinistral3b2512 => "mistralai/ministral-3b-2512",
4547            Self::MistralaiMinistral8b2512 => "mistralai/ministral-8b-2512",
4548            Self::MistralaiMistralLarge => "mistralai/mistral-large",
4549            Self::MistralaiMistralLarge2407 => "mistralai/mistral-large-2407",
4550            Self::MistralaiMistralLarge2512 => "mistralai/mistral-large-2512",
4551            Self::MistralaiMistralMedium3 => "mistralai/mistral-medium-3",
4552            Self::MistralaiMistralMedium35 => "mistralai/mistral-medium-3-5",
4553            Self::MistralaiMistralMedium31 => "mistralai/mistral-medium-3.1",
4554            Self::MistralaiMistralNemo => "mistralai/mistral-nemo",
4555            Self::MistralaiMistralSaba => "mistralai/mistral-saba",
4556            Self::MistralaiMistralSmall2603 => "mistralai/mistral-small-2603",
4557            Self::MistralaiMistralSmall3224bInstruct => {
4558                "mistralai/mistral-small-3.2-24b-instruct"
4559            }
4560            Self::MistralaiMixtral8x22bInstruct => "mistralai/mixtral-8x22b-instruct",
4561            Self::MistralaiVoxtralSmall24b2507 => "mistralai/voxtral-small-24b-2507",
4562            Self::MoonshotaiKimiK2 => "moonshotai/kimi-k2",
4563            Self::MoonshotaiKimiK20905 => "moonshotai/kimi-k2-0905",
4564            Self::MoonshotaiKimiK2Thinking => "moonshotai/kimi-k2-thinking",
4565            Self::MoonshotaiKimiK25 => "moonshotai/kimi-k2.5",
4566            Self::MoonshotaiKimiK26 => "moonshotai/kimi-k2.6",
4567            Self::MoonshotaiKimiK27Code => "moonshotai/kimi-k2.7-code",
4568            Self::MoonshotaiKimiK3 => "moonshotai/kimi-k3",
4569            Self::NexAgiNexN2Mini => "nex-agi/nex-n2-mini",
4570            Self::NexAgiNexN2Pro => "nex-agi/nex-n2-pro",
4571            Self::NvidiaNemotron3Nano30bA3b => "nvidia/nemotron-3-nano-30b-a3b",
4572            Self::NvidiaNemotron3Nano30bA3bFree => "nvidia/nemotron-3-nano-30b-a3b:free",
4573            Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree => {
4574                "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free"
4575            }
4576            Self::NvidiaNemotron3Super120bA12b => "nvidia/nemotron-3-super-120b-a12b",
4577            Self::NvidiaNemotron3Super120bA12bFree => {
4578                "nvidia/nemotron-3-super-120b-a12b:free"
4579            }
4580            Self::NvidiaNemotron3Ultra550bA55b => "nvidia/nemotron-3-ultra-550b-a55b",
4581            Self::NvidiaNemotron3Ultra550bA55bFree => {
4582                "nvidia/nemotron-3-ultra-550b-a55b:free"
4583            }
4584            Self::NvidiaNemotronNano12bV2VlFree => "nvidia/nemotron-nano-12b-v2-vl:free",
4585            Self::NvidiaNemotronNano9bV2Free => "nvidia/nemotron-nano-9b-v2:free",
4586            Self::OpenaiGpt35Turbo => "openai/gpt-3.5-turbo",
4587            Self::OpenaiGpt35Turbo0613 => "openai/gpt-3.5-turbo-0613",
4588            Self::OpenaiGpt35Turbo16k => "openai/gpt-3.5-turbo-16k",
4589            Self::OpenaiGpt4 => "openai/gpt-4",
4590            Self::OpenaiGpt4Turbo => "openai/gpt-4-turbo",
4591            Self::OpenaiGpt4TurboPreview => "openai/gpt-4-turbo-preview",
4592            Self::OpenaiGpt41 => "openai/gpt-4.1",
4593            Self::OpenaiGpt41Mini => "openai/gpt-4.1-mini",
4594            Self::OpenaiGpt41Nano => "openai/gpt-4.1-nano",
4595            Self::OpenaiGpt4o => "openai/gpt-4o",
4596            Self::OpenaiGpt4o20240513 => "openai/gpt-4o-2024-05-13",
4597            Self::OpenaiGpt4o20240806 => "openai/gpt-4o-2024-08-06",
4598            Self::OpenaiGpt4o20241120 => "openai/gpt-4o-2024-11-20",
4599            Self::OpenaiGpt4oMini => "openai/gpt-4o-mini",
4600            Self::OpenaiGpt4oMini20240718 => "openai/gpt-4o-mini-2024-07-18",
4601            Self::OpenaiGpt5 => "openai/gpt-5",
4602            Self::OpenaiGpt5Mini => "openai/gpt-5-mini",
4603            Self::OpenaiGpt5Nano => "openai/gpt-5-nano",
4604            Self::OpenaiGpt5Pro => "openai/gpt-5-pro",
4605            Self::OpenaiGpt51 => "openai/gpt-5.1",
4606            Self::OpenaiGpt51Codex => "openai/gpt-5.1-codex",
4607            Self::OpenaiGpt51CodexMax => "openai/gpt-5.1-codex-max",
4608            Self::OpenaiGpt51CodexMini => "openai/gpt-5.1-codex-mini",
4609            Self::OpenaiGpt52 => "openai/gpt-5.2",
4610            Self::OpenaiGpt52Chat => "openai/gpt-5.2-chat",
4611            Self::OpenaiGpt52Codex => "openai/gpt-5.2-codex",
4612            Self::OpenaiGpt52Pro => "openai/gpt-5.2-pro",
4613            Self::OpenaiGpt53Chat => "openai/gpt-5.3-chat",
4614            Self::OpenaiGpt53Codex => "openai/gpt-5.3-codex",
4615            Self::OpenaiGpt54 => "openai/gpt-5.4",
4616            Self::OpenaiGpt54Mini => "openai/gpt-5.4-mini",
4617            Self::OpenaiGpt54Nano => "openai/gpt-5.4-nano",
4618            Self::OpenaiGpt54Pro => "openai/gpt-5.4-pro",
4619            Self::OpenaiGpt55 => "openai/gpt-5.5",
4620            Self::OpenaiGpt55Pro => "openai/gpt-5.5-pro",
4621            Self::OpenaiGpt56Luna => "openai/gpt-5.6-luna",
4622            Self::OpenaiGpt56LunaPro => "openai/gpt-5.6-luna-pro",
4623            Self::OpenaiGpt56Sol => "openai/gpt-5.6-sol",
4624            Self::OpenaiGpt56SolPro => "openai/gpt-5.6-sol-pro",
4625            Self::OpenaiGpt56Terra => "openai/gpt-5.6-terra",
4626            Self::OpenaiGpt56TerraPro => "openai/gpt-5.6-terra-pro",
4627            Self::OpenaiGptAudio => "openai/gpt-audio",
4628            Self::OpenaiGptAudioMini => "openai/gpt-audio-mini",
4629            Self::OpenaiGptOss120b => "openai/gpt-oss-120b",
4630            Self::OpenaiGptOss20b => "openai/gpt-oss-20b",
4631            Self::OpenaiGptOss20bFree => "openai/gpt-oss-20b:free",
4632            Self::OpenaiGptOssSafeguard20b => "openai/gpt-oss-safeguard-20b",
4633            Self::OpenaiO1 => "openai/o1",
4634            Self::OpenaiO3 => "openai/o3",
4635            Self::OpenaiO3Mini => "openai/o3-mini",
4636            Self::OpenaiO3MiniHigh => "openai/o3-mini-high",
4637            Self::OpenaiO3Pro => "openai/o3-pro",
4638            Self::OpenaiO4Mini => "openai/o4-mini",
4639            Self::OpenaiO4MiniHigh => "openai/o4-mini-high",
4640            Self::OpenrouterAuto => "openrouter/auto",
4641            Self::OpenrouterFree => "openrouter/free",
4642            Self::PoolsideLagunaS21 => "poolside/laguna-s-2.1",
4643            Self::PoolsideLagunaS21Free => "poolside/laguna-s-2.1:free",
4644            Self::PoolsideLagunaXs21 => "poolside/laguna-xs-2.1",
4645            Self::PoolsideLagunaXs21Free => "poolside/laguna-xs-2.1:free",
4646            Self::QwenQwen2572bInstruct => "qwen/qwen-2.5-72b-instruct",
4647            Self::QwenQwen257bInstruct => "qwen/qwen-2.5-7b-instruct",
4648            Self::QwenQwenPlus => "qwen/qwen-plus",
4649            Self::QwenQwenPlus20250728 => "qwen/qwen-plus-2025-07-28",
4650            Self::QwenQwenPlus20250728Thinking => "qwen/qwen-plus-2025-07-28:thinking",
4651            Self::QwenQwen314b => "qwen/qwen3-14b",
4652            Self::QwenQwen3235bA22b => "qwen/qwen3-235b-a22b",
4653            Self::QwenQwen3235bA22b2507 => "qwen/qwen3-235b-a22b-2507",
4654            Self::QwenQwen3235bA22bThinking2507 => "qwen/qwen3-235b-a22b-thinking-2507",
4655            Self::QwenQwen330bA3b => "qwen/qwen3-30b-a3b",
4656            Self::QwenQwen330bA3bInstruct2507 => "qwen/qwen3-30b-a3b-instruct-2507",
4657            Self::QwenQwen330bA3bThinking2507 => "qwen/qwen3-30b-a3b-thinking-2507",
4658            Self::QwenQwen332b => "qwen/qwen3-32b",
4659            Self::QwenQwen38b => "qwen/qwen3-8b",
4660            Self::QwenQwen3Coder => "qwen/qwen3-coder",
4661            Self::QwenQwen3Coder30bA3bInstruct => "qwen/qwen3-coder-30b-a3b-instruct",
4662            Self::QwenQwen3CoderFlash => "qwen/qwen3-coder-flash",
4663            Self::QwenQwen3CoderNext => "qwen/qwen3-coder-next",
4664            Self::QwenQwen3CoderPlus => "qwen/qwen3-coder-plus",
4665            Self::QwenQwen3Max => "qwen/qwen3-max",
4666            Self::QwenQwen3MaxThinking => "qwen/qwen3-max-thinking",
4667            Self::QwenQwen3Next80bA3bInstruct => "qwen/qwen3-next-80b-a3b-instruct",
4668            Self::QwenQwen3Next80bA3bThinking => "qwen/qwen3-next-80b-a3b-thinking",
4669            Self::QwenQwen3Vl235bA22bInstruct => "qwen/qwen3-vl-235b-a22b-instruct",
4670            Self::QwenQwen3Vl235bA22bThinking => "qwen/qwen3-vl-235b-a22b-thinking",
4671            Self::QwenQwen3Vl30bA3bInstruct => "qwen/qwen3-vl-30b-a3b-instruct",
4672            Self::QwenQwen3Vl30bA3bThinking => "qwen/qwen3-vl-30b-a3b-thinking",
4673            Self::QwenQwen3Vl32bInstruct => "qwen/qwen3-vl-32b-instruct",
4674            Self::QwenQwen3Vl8bInstruct => "qwen/qwen3-vl-8b-instruct",
4675            Self::QwenQwen3Vl8bThinking => "qwen/qwen3-vl-8b-thinking",
4676            Self::QwenQwen35122bA10b => "qwen/qwen3.5-122b-a10b",
4677            Self::QwenQwen3527b => "qwen/qwen3.5-27b",
4678            Self::QwenQwen3535bA3b => "qwen/qwen3.5-35b-a3b",
4679            Self::QwenQwen35397bA17b => "qwen/qwen3.5-397b-a17b",
4680            Self::QwenQwen359b => "qwen/qwen3.5-9b",
4681            Self::QwenQwen35Flash0223 => "qwen/qwen3.5-flash-02-23",
4682            Self::QwenQwen35Plus0215 => "qwen/qwen3.5-plus-02-15",
4683            Self::QwenQwen35Plus20260420 => "qwen/qwen3.5-plus-20260420",
4684            Self::QwenQwen3627b => "qwen/qwen3.6-27b",
4685            Self::QwenQwen3635bA3b => "qwen/qwen3.6-35b-a3b",
4686            Self::QwenQwen36Flash => "qwen/qwen3.6-flash",
4687            Self::QwenQwen36MaxPreview => "qwen/qwen3.6-max-preview",
4688            Self::QwenQwen36Plus => "qwen/qwen3.6-plus",
4689            Self::QwenQwen37Flash => "qwen/qwen3.7-flash",
4690            Self::QwenQwen37Max => "qwen/qwen3.7-max",
4691            Self::QwenQwen37Plus => "qwen/qwen3.7-plus",
4692            Self::RekaaiRekaEdge => "rekaai/reka-edge",
4693            Self::RelaceRelaceSearch => "relace/relace-search",
4694            Self::SakanaFuguUltra => "sakana/fugu-ultra",
4695            Self::Sao10kL31Euryale70b => "sao10k/l3.1-euryale-70b",
4696            Self::StepfunStep35Flash => "stepfun/step-3.5-flash",
4697            Self::StepfunStep37Flash => "stepfun/step-3.7-flash",
4698            Self::TencentHy3 => "tencent/hy3",
4699            Self::TencentHy3Preview => "tencent/hy3-preview",
4700            Self::ThedrummerUnslopnemo12b => "thedrummer/unslopnemo-12b",
4701            Self::ThinkingmachinesInkling => "thinkingmachines/inkling",
4702            Self::ThinkingmachinesInklingSmall => "thinkingmachines/inkling-small",
4703            Self::UpstageSolarPro3 => "upstage/solar-pro-3",
4704            Self::XAiGrok420 => "x-ai/grok-4.20",
4705            Self::XAiGrok43 => "x-ai/grok-4.3",
4706            Self::XAiGrok45 => "x-ai/grok-4.5",
4707            Self::XAiGrokBuild01 => "x-ai/grok-build-0.1",
4708            Self::XiaomiMimoV25 => "xiaomi/mimo-v2.5",
4709            Self::XiaomiMimoV25Pro => "xiaomi/mimo-v2.5-pro",
4710            Self::ZAiGlm45 => "z-ai/glm-4.5",
4711            Self::ZAiGlm45Air => "z-ai/glm-4.5-air",
4712            Self::ZAiGlm45v => "z-ai/glm-4.5v",
4713            Self::ZAiGlm46 => "z-ai/glm-4.6",
4714            Self::ZAiGlm46v => "z-ai/glm-4.6v",
4715            Self::ZAiGlm47 => "z-ai/glm-4.7",
4716            Self::ZAiGlm47Flash => "z-ai/glm-4.7-flash",
4717            Self::ZAiGlm5 => "z-ai/glm-5",
4718            Self::ZAiGlm5Turbo => "z-ai/glm-5-turbo",
4719            Self::ZAiGlm51 => "z-ai/glm-5.1",
4720            Self::ZAiGlm52 => "z-ai/glm-5.2",
4721            Self::ZAiGlm5vTurbo => "z-ai/glm-5v-turbo",
4722        }
4723    }
4724    #[allow(clippy::too_many_lines)]
4725    fn display_name(self) -> &'static str {
4726        match self {
4727            Self::AionLabsAion20 => "Aion-2.0",
4728            Self::AionLabsAion30 => "Aion-3.0",
4729            Self::AionLabsAion30Mini => "Aion-3.0-Mini",
4730            Self::OpenrouterAuto => "Auto Router",
4731            Self::AnthropicClaude3Haiku => "Claude 3 Haiku",
4732            Self::AnthropicClaudeFable5 => "Claude Fable 5",
4733            Self::AnthropicClaudeHaiku45 => "Claude Haiku 4.5 (latest)",
4734            Self::AnthropicClaudeOpus4 => "Claude Opus 4",
4735            Self::AnthropicClaudeOpus41 => "Claude Opus 4.1 (latest)",
4736            Self::AnthropicClaudeOpus45 => "Claude Opus 4.5 (latest)",
4737            Self::AnthropicClaudeOpus46 => "Claude Opus 4.6",
4738            Self::AnthropicClaudeOpus47 => "Claude Opus 4.7",
4739            Self::AnthropicClaudeOpus47Fast => "Claude Opus 4.7 (Fast)",
4740            Self::AnthropicClaudeOpus48 => "Claude Opus 4.8",
4741            Self::AnthropicClaudeOpus48Fast => "Claude Opus 4.8 (Fast)",
4742            Self::AnthropicClaudeOpus5 => "Claude Opus 5",
4743            Self::AnthropicClaudeOpus5Fast => "Claude Opus 5 (Fast)",
4744            Self::AnthropicClaudeSonnet4 => "Claude Sonnet 4",
4745            Self::AnthropicClaudeSonnet45 => "Claude Sonnet 4.5 (latest)",
4746            Self::AnthropicClaudeSonnet46 => "Claude Sonnet 4.6",
4747            Self::AnthropicClaudeSonnet5 => "Claude Sonnet 5",
4748            Self::MistralaiCodestral2508 => "Codestral 2508",
4749            Self::CohereCommandR082024 => "Command R",
4750            Self::CohereCommandRPlus082024 => "Command R+",
4751            Self::DeepseekDeepseekChat => "DeepSeek Chat",
4752            Self::DeepseekDeepseekChatV30324 => "DeepSeek V3 0324",
4753            Self::DeepseekDeepseekChatV31 => "DeepSeek V3.1",
4754            Self::DeepseekDeepseekV31Terminus => "DeepSeek V3.1 Terminus",
4755            Self::DeepseekDeepseekV32 => "DeepSeek V3.2",
4756            Self::DeepseekDeepseekV32Exp => "DeepSeek V3.2 Exp",
4757            Self::DeepseekDeepseekV4Flash => "DeepSeek V4 Flash",
4758            Self::DeepseekDeepseekV4Flash0731 => "DeepSeek V4 Flash 0731",
4759            Self::DeepseekDeepseekV4Pro => "DeepSeek V4 Pro",
4760            Self::DeepseekDeepseekR1 => "DeepSeek-R1",
4761            Self::OpenrouterFree => "Free Models Router",
4762            Self::SakanaFuguUltra => "Fugu Ultra",
4763            Self::ZAiGlm45 => "GLM-4.5",
4764            Self::ZAiGlm45Air => "GLM-4.5-Air",
4765            Self::ZAiGlm45v => "GLM-4.5V",
4766            Self::ZAiGlm46 => "GLM-4.6",
4767            Self::ZAiGlm46v => "GLM-4.6V",
4768            Self::ZAiGlm47 => "GLM-4.7",
4769            Self::ZAiGlm47Flash => "GLM-4.7-Flash",
4770            Self::ZAiGlm5 => "GLM-5",
4771            Self::ZAiGlm5Turbo => "GLM-5-Turbo",
4772            Self::ZAiGlm51 => "GLM-5.1",
4773            Self::ZAiGlm52 => "GLM-5.2",
4774            Self::ZAiGlm5vTurbo => "GLM-5V-Turbo",
4775            Self::OpenaiGptAudio => "GPT Audio",
4776            Self::OpenaiGptAudioMini => "GPT Audio Mini",
4777            Self::OpenaiGptOss120b => "GPT OSS 120B",
4778            Self::OpenaiGptOss20b => "GPT OSS 20B",
4779            Self::OpenaiGpt35Turbo0613 => "GPT-3.5 Turbo (older v0613)",
4780            Self::OpenaiGpt35Turbo16k => "GPT-3.5 Turbo 16k",
4781            Self::OpenaiGpt35Turbo => "GPT-3.5-turbo",
4782            Self::OpenaiGpt4 => "GPT-4",
4783            Self::OpenaiGpt4Turbo => "GPT-4 Turbo",
4784            Self::OpenaiGpt4TurboPreview => "GPT-4 Turbo Preview",
4785            Self::OpenaiGpt41 => "GPT-4.1",
4786            Self::OpenaiGpt41Mini => "GPT-4.1 mini",
4787            Self::OpenaiGpt41Nano => "GPT-4.1 nano",
4788            Self::OpenaiGpt4o => "GPT-4o",
4789            Self::OpenaiGpt4o20240513 => "GPT-4o (2024-05-13)",
4790            Self::OpenaiGpt4o20240806 => "GPT-4o (2024-08-06)",
4791            Self::OpenaiGpt4o20241120 => "GPT-4o (2024-11-20)",
4792            Self::OpenaiGpt4oMini => "GPT-4o mini",
4793            Self::OpenaiGpt4oMini20240718 => "GPT-4o-mini (2024-07-18)",
4794            Self::OpenaiGpt5 => "GPT-5",
4795            Self::OpenaiGpt5Mini => "GPT-5 Mini",
4796            Self::OpenaiGpt5Nano => "GPT-5 Nano",
4797            Self::OpenaiGpt5Pro => "GPT-5 Pro",
4798            Self::OpenaiGpt51 => "GPT-5.1",
4799            Self::OpenaiGpt51Codex => "GPT-5.1 Codex",
4800            Self::OpenaiGpt51CodexMax => "GPT-5.1 Codex Max",
4801            Self::OpenaiGpt51CodexMini => "GPT-5.1 Codex mini",
4802            Self::OpenaiGpt52 => "GPT-5.2",
4803            Self::OpenaiGpt52Chat => "GPT-5.2 Chat",
4804            Self::OpenaiGpt52Codex => "GPT-5.2 Codex",
4805            Self::OpenaiGpt52Pro => "GPT-5.2 Pro",
4806            Self::OpenaiGpt53Chat => "GPT-5.3 Chat",
4807            Self::OpenaiGpt53Codex => "GPT-5.3 Codex",
4808            Self::OpenaiGpt54 => "GPT-5.4",
4809            Self::OpenaiGpt54Pro => "GPT-5.4 Pro",
4810            Self::OpenaiGpt54Mini => "GPT-5.4 mini",
4811            Self::OpenaiGpt54Nano => "GPT-5.4 nano",
4812            Self::OpenaiGpt55 => "GPT-5.5",
4813            Self::OpenaiGpt55Pro => "GPT-5.5 Pro",
4814            Self::OpenaiGpt56Luna => "GPT-5.6 Luna",
4815            Self::OpenaiGpt56LunaPro => "GPT-5.6 Luna Pro",
4816            Self::OpenaiGpt56Sol => "GPT-5.6 Sol",
4817            Self::OpenaiGpt56SolPro => "GPT-5.6 Sol Pro",
4818            Self::OpenaiGpt56Terra => "GPT-5.6 Terra",
4819            Self::OpenaiGpt56TerraPro => "GPT-5.6 Terra Pro",
4820            Self::GoogleGemini25Flash => "Gemini 2.5 Flash",
4821            Self::GoogleGemini25FlashLite => "Gemini 2.5 Flash-Lite",
4822            Self::GoogleGemini25Pro => "Gemini 2.5 Pro",
4823            Self::GoogleGemini25ProPreview0506 => "Gemini 2.5 Pro Preview 05-06",
4824            Self::GoogleGemini25ProPreview => "Gemini 2.5 Pro Preview 06-05",
4825            Self::GoogleGemini3FlashPreview => "Gemini 3 Flash Preview",
4826            Self::GoogleGemini31FlashLite => "Gemini 3.1 Flash Lite",
4827            Self::GoogleGemini31FlashLitePreview => "Gemini 3.1 Flash Lite Preview",
4828            Self::GoogleGemini31ProPreview => "Gemini 3.1 Pro Preview",
4829            Self::GoogleGemini31ProPreviewCustomtools => {
4830                "Gemini 3.1 Pro Preview Custom Tools"
4831            }
4832            Self::GoogleGemini35Flash => "Gemini 3.5 Flash",
4833            Self::GoogleGemini35FlashLite => "Gemini 3.5 Flash Lite",
4834            Self::GoogleGemini36Flash => "Gemini 3.6 Flash",
4835            Self::GoogleGemma312bIt => "Gemma 3 12B",
4836            Self::GoogleGemma327bIt => "Gemma 3 27B",
4837            Self::GoogleGemma426bA4bItFree => "Gemma 4 26B A4B  (free)",
4838            Self::GoogleGemma426bA4bIt => "Gemma 4 26B A4B IT",
4839            Self::GoogleGemma431bItFree => "Gemma 4 31B (free)",
4840            Self::GoogleGemma431bIt => "Gemma 4 31B IT",
4841            Self::IbmGraniteGranite418b => "Granite 4.1 8B",
4842            Self::XAiGrok420 => "Grok 4.20",
4843            Self::XAiGrok43 => "Grok 4.3",
4844            Self::XAiGrok45 => "Grok 4.5",
4845            Self::XAiGrokBuild01 => "Grok Build 0.1",
4846            Self::TencentHy3 => "Hy3",
4847            Self::TencentHy3Preview => "Hy3 preview",
4848            Self::ThinkingmachinesInkling => "Inkling",
4849            Self::ThinkingmachinesInklingSmall => "Inkling Small",
4850            Self::Ai21JambaLarge17 => "Jamba Large 1.7",
4851            Self::KwaipilotKatCoderAirV25 => "KAT-Coder-Air V2.5",
4852            Self::KwaipilotKatCoderProV2 => "KAT-Coder-Pro V2",
4853            Self::KwaipilotKatCoderProV25 => "KAT-Coder-Pro V2.5",
4854            Self::MoonshotaiKimiK2 => "Kimi K2 0711",
4855            Self::MoonshotaiKimiK20905 => "Kimi K2 0905",
4856            Self::MoonshotaiKimiK2Thinking => "Kimi K2 Thinking",
4857            Self::MoonshotaiKimiK25 => "Kimi K2.5",
4858            Self::MoonshotaiKimiK26 => "Kimi K2.6",
4859            Self::MoonshotaiKimiK27Code => "Kimi K2.7 Code",
4860            Self::MoonshotaiKimiK3 => "Kimi K3",
4861            Self::PoolsideLagunaS21 => "Laguna S 2.1",
4862            Self::PoolsideLagunaS21Free => "Laguna S 2.1 (free)",
4863            Self::PoolsideLagunaXs21 => "Laguna XS 2.1",
4864            Self::PoolsideLagunaXs21Free => "Laguna XS 2.1 (free)",
4865            Self::InclusionaiLing261t => "Ling-2.6-1T",
4866            Self::InclusionaiLing26Flash => "Ling-2.6-flash",
4867            Self::InclusionaiLing30FlashFree => "Ling-3.0-flash (free)",
4868            Self::MetaLlamaLlama3170bInstruct => "Llama 3.1 70B Instruct",
4869            Self::MetaLlamaLlama318bInstruct => "Llama 3.1 8B Instruct",
4870            Self::Sao10kL31Euryale70b => "Llama 3.1 Euryale 70B v2.2",
4871            Self::MetaLlamaLlama4Maverick => "Llama 4 Maverick",
4872            Self::MetaLlamaLlama4Scout => "Llama 4 Scout",
4873            Self::MetaLlamaLlama3370bInstruct => "Llama-3.3-70B-Instruct",
4874            Self::MeituanLongcat20 => "LongCat 2.0",
4875            Self::InceptionMercury2 => "Mercury 2",
4876            Self::XiaomiMimoV25 => "MiMo-V2.5",
4877            Self::XiaomiMimoV25Pro => "MiMo-V2.5-Pro",
4878            Self::MinimaxMinimaxM1 => "MiniMax M1",
4879            Self::MinimaxMinimaxM2 => "MiniMax-M2",
4880            Self::MinimaxMinimaxM21 => "MiniMax-M2.1",
4881            Self::MinimaxMinimaxM25 => "MiniMax-M2.5",
4882            Self::MinimaxMinimaxM27 => "MiniMax-M2.7",
4883            Self::MinimaxMinimaxM3 => "MiniMax-M3",
4884            Self::MistralaiMinistral14b2512 => "Ministral 3 14B 2512",
4885            Self::MistralaiMinistral3b2512 => "Ministral 3 3B 2512",
4886            Self::MistralaiMinistral8b2512 => "Ministral 3 8B 2512",
4887            Self::MistralaiMistralLarge => "Mistral Large",
4888            Self::MistralaiMistralLarge2407 => "Mistral Large 2407",
4889            Self::MistralaiMistralLarge2512 => "Mistral Large 3",
4890            Self::MistralaiMistralMedium3 => "Mistral Medium 3",
4891            Self::MistralaiMistralMedium31 => "Mistral Medium 3.1",
4892            Self::MistralaiMistralMedium35 => "Mistral Medium 3.5",
4893            Self::MistralaiMistralNemo => "Mistral Nemo",
4894            Self::MistralaiMistralSmall3224bInstruct => "Mistral Small 3.2 24B",
4895            Self::MistralaiMistralSmall2603 => "Mistral Small 4",
4896            Self::MistralaiMixtral8x22bInstruct => "Mixtral 8x22B Instruct",
4897            Self::MetaMuseSpark11 => "Muse Spark 1.1",
4898            Self::GoogleGemini3ProImage => "Nano Banana Pro",
4899            Self::NvidiaNemotron3Nano30bA3b => "Nemotron 3 Nano 30B A3B",
4900            Self::NvidiaNemotron3Nano30bA3bFree => "Nemotron 3 Nano 30B A3B (free)",
4901            Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree => {
4902                "Nemotron 3 Nano Omni (free)"
4903            }
4904            Self::NvidiaNemotron3Super120bA12bFree => "Nemotron 3 Super (free)",
4905            Self::NvidiaNemotron3Super120bA12b => "Nemotron 3 Super 120B A12B",
4906            Self::NvidiaNemotron3Ultra550bA55bFree => "Nemotron 3 Ultra (free)",
4907            Self::NvidiaNemotron3Ultra550bA55b => "Nemotron 3 Ultra 550B A55B",
4908            Self::NvidiaNemotronNano12bV2VlFree => "Nemotron Nano 12B 2 VL (free)",
4909            Self::NvidiaNemotronNano9bV2Free => "Nemotron Nano 9B V2 (free)",
4910            Self::NexAgiNexN2Mini => "Nex-N2-Mini",
4911            Self::NexAgiNexN2Pro => "Nex-N2-Pro",
4912            Self::CohereNorthMiniCodeFree => "North Mini Code (free)",
4913            Self::AmazonNova2LiteV1 => "Nova 2 Lite",
4914            Self::AmazonNovaLiteV1 => "Nova Lite 1.0",
4915            Self::AmazonNovaMicroV1 => "Nova Micro 1.0",
4916            Self::AmazonNovaPremierV1 => "Nova Premier 1.0",
4917            Self::AmazonNovaProV1 => "Nova Pro 1.0",
4918            Self::QwenQwenPlus => "Qwen Plus",
4919            Self::QwenQwenPlus20250728 => "Qwen Plus 0728",
4920            Self::QwenQwenPlus20250728Thinking => "Qwen Plus 0728 (thinking)",
4921            Self::QwenQwen2572bInstruct => "Qwen2.5 72B Instruct",
4922            Self::QwenQwen257bInstruct => "Qwen2.5 7B Instruct",
4923            Self::QwenQwen314b => "Qwen3 14B",
4924            Self::QwenQwen3235bA22b2507 => "Qwen3 235B A22B Instruct 2507",
4925            Self::QwenQwen3235bA22bThinking2507 => "Qwen3 235B A22B Thinking 2507",
4926            Self::QwenQwen3235bA22b => "Qwen3 235B-A22B",
4927            Self::QwenQwen330bA3b => "Qwen3 30B A3B",
4928            Self::QwenQwen330bA3bInstruct2507 => "Qwen3 30B A3B Instruct 2507",
4929            Self::QwenQwen330bA3bThinking2507 => "Qwen3 30B A3B Thinking 2507",
4930            Self::QwenQwen332b => "Qwen3 32B",
4931            Self::QwenQwen38b => "Qwen3 8B",
4932            Self::QwenQwen3Coder => "Qwen3 Coder 480B A35B",
4933            Self::QwenQwen3CoderFlash => "Qwen3 Coder Flash",
4934            Self::QwenQwen3CoderNext => "Qwen3 Coder Next",
4935            Self::QwenQwen3CoderPlus => "Qwen3 Coder Plus",
4936            Self::QwenQwen3Max => "Qwen3 Max",
4937            Self::QwenQwen3MaxThinking => "Qwen3 Max Thinking",
4938            Self::QwenQwen3Vl235bA22bInstruct => "Qwen3 VL 235B A22B Instruct",
4939            Self::QwenQwen3Vl235bA22bThinking => "Qwen3 VL 235B A22B Thinking",
4940            Self::QwenQwen3Vl30bA3bInstruct => "Qwen3 VL 30B A3B Instruct",
4941            Self::QwenQwen3Vl30bA3bThinking => "Qwen3 VL 30B A3B Thinking",
4942            Self::QwenQwen3Vl32bInstruct => "Qwen3 VL 32B Instruct",
4943            Self::QwenQwen3Vl8bInstruct => "Qwen3 VL 8B Instruct",
4944            Self::QwenQwen3Vl8bThinking => "Qwen3 VL 8B Thinking",
4945            Self::QwenQwen3Coder30bA3bInstruct => "Qwen3-Coder 30B-A3B Instruct",
4946            Self::QwenQwen3Next80bA3bThinking => "Qwen3-Next 80B-A3B (Thinking)",
4947            Self::QwenQwen3Next80bA3bInstruct => "Qwen3-Next 80B-A3B Instruct",
4948            Self::QwenQwen35122bA10b => "Qwen3.5 122B-A10B",
4949            Self::QwenQwen3527b => "Qwen3.5 27B",
4950            Self::QwenQwen3535bA3b => "Qwen3.5 35B-A3B",
4951            Self::QwenQwen35397bA17b => "Qwen3.5 397B-A17B",
4952            Self::QwenQwen359b => "Qwen3.5 9B",
4953            Self::QwenQwen35Plus0215 => "Qwen3.5 Plus 2026-02-15",
4954            Self::QwenQwen35Plus20260420 => "Qwen3.5 Plus 2026-04-20",
4955            Self::QwenQwen35Flash0223 => "Qwen3.5-Flash",
4956            Self::QwenQwen3627b => "Qwen3.6 27B",
4957            Self::QwenQwen3635bA3b => "Qwen3.6 35B-A3B",
4958            Self::QwenQwen36Flash => "Qwen3.6 Flash",
4959            Self::QwenQwen36MaxPreview => "Qwen3.6 Max Preview",
4960            Self::QwenQwen36Plus => "Qwen3.6 Plus",
4961            Self::QwenQwen37Flash => "Qwen3.7 Flash",
4962            Self::QwenQwen37Max => "Qwen3.7 Max",
4963            Self::QwenQwen37Plus => "Qwen3.7 Plus",
4964            Self::DeepseekDeepseekR10528 => "R1 0528",
4965            Self::RekaaiRekaEdge => "Reka Edge",
4966            Self::RelaceRelaceSearch => "Relace Search",
4967            Self::InclusionaiRing261t => "Ring-2.6-1T",
4968            Self::MistralaiMistralSaba => "Saba",
4969            Self::BytedanceSeedSeed16 => "Seed 1.6",
4970            Self::BytedanceSeedSeed16Flash => "Seed 1.6 Flash",
4971            Self::BytedanceSeedSeed20Lite => "Seed-2.0-Lite",
4972            Self::BytedanceSeedSeed20Mini => "Seed-2.0-Mini",
4973            Self::UpstageSolarPro3 => "Solar Pro 3",
4974            Self::StepfunStep35Flash => "Step 3.5 Flash",
4975            Self::StepfunStep37Flash => "Step 3.7 Flash",
4976            Self::ArceeAiTrinityLargeThinking => "Trinity Large Thinking",
4977            Self::ThedrummerUnslopnemo12b => "UnslopNemo 12B",
4978            Self::ArceeAiVirtuosoLarge => "Virtuoso Large",
4979            Self::MistralaiVoxtralSmall24b2507 => "Voxtral Small 24B 2507",
4980            Self::OpenaiGptOss20bFree => "gpt-oss-20b (free)",
4981            Self::OpenaiGptOssSafeguard20b => "gpt-oss-safeguard-20b",
4982            Self::OpenaiO1 => "o1",
4983            Self::OpenaiO3 => "o3",
4984            Self::OpenaiO3MiniHigh => "o3 Mini High",
4985            Self::OpenaiO3Mini => "o3-mini",
4986            Self::OpenaiO3Pro => "o3-pro",
4987            Self::OpenaiO4MiniHigh => "o4 Mini High",
4988            Self::OpenaiO4Mini => "o4-mini",
4989        }
4990    }
4991    #[allow(clippy::too_many_lines)]
4992    fn context_window(self) -> u32 {
4993        match self {
4994            Self::OpenaiGpt35Turbo0613 => 4095,
4995            Self::OpenaiGpt4 => 8191,
4996            Self::RekaaiRekaEdge => 16_384,
4997            Self::OpenaiGpt35Turbo | Self::OpenaiGpt35Turbo16k => 16_385,
4998            Self::MistralaiVoxtralSmall24b2507 => 32_000,
4999            Self::MistralaiMistralSaba
5000            | Self::QwenQwen2572bInstruct
5001            | Self::QwenQwen257bInstruct => 32_768,
5002            Self::MistralaiMixtral8x22bInstruct | Self::ZAiGlm45v => 65_536,
5003            Self::QwenQwen330bA3bThinking2507 => 81_920,
5004            Self::AmazonNovaMicroV1
5005            | Self::CohereCommandR082024
5006            | Self::CohereCommandRPlus082024
5007            | Self::InceptionMercury2
5008            | Self::MistralaiMistralLarge
5009            | Self::NvidiaNemotronNano12bV2VlFree
5010            | Self::NvidiaNemotronNano9bV2Free
5011            | Self::OpenaiGpt4Turbo
5012            | Self::OpenaiGpt4TurboPreview
5013            | Self::OpenaiGpt4o
5014            | Self::OpenaiGpt4o20240513
5015            | Self::OpenaiGpt4o20240806
5016            | Self::OpenaiGpt4o20241120
5017            | Self::OpenaiGpt4oMini
5018            | Self::OpenaiGpt4oMini20240718
5019            | Self::OpenaiGpt52Chat
5020            | Self::OpenaiGpt53Chat
5021            | Self::OpenaiGptAudio
5022            | Self::OpenaiGptAudioMini
5023            | Self::UpstageSolarPro3 => 128_000,
5024            Self::AionLabsAion20
5025            | Self::AionLabsAion30
5026            | Self::AionLabsAion30Mini
5027            | Self::ArceeAiVirtuosoLarge
5028            | Self::GoogleGemini3ProImage
5029            | Self::GoogleGemma312bIt
5030            | Self::IbmGraniteGranite418b
5031            | Self::MetaLlamaLlama3170bInstruct
5032            | Self::MetaLlamaLlama318bInstruct
5033            | Self::MetaLlamaLlama3370bInstruct
5034            | Self::MistralaiMinistral3b2512
5035            | Self::MistralaiMistralLarge2407
5036            | Self::MistralaiMistralMedium3
5037            | Self::MistralaiMistralMedium31
5038            | Self::MistralaiMistralNemo
5039            | Self::MoonshotaiKimiK2
5040            | Self::OpenaiGptOss120b
5041            | Self::OpenaiGptOss20b
5042            | Self::OpenaiGptOss20bFree
5043            | Self::OpenaiGptOssSafeguard20b
5044            | Self::QwenQwen314b
5045            | Self::QwenQwen3235bA22b
5046            | Self::QwenQwen330bA3b
5047            | Self::QwenQwen332b
5048            | Self::QwenQwen38b
5049            | Self::QwenQwen3Vl235bA22bThinking
5050            | Self::QwenQwen3Vl32bInstruct
5051            | Self::QwenQwen3Vl8bThinking
5052            | Self::Sao10kL31Euryale70b
5053            | Self::ZAiGlm45
5054            | Self::ZAiGlm45Air
5055            | Self::ZAiGlm46v => 131_072,
5056            Self::DeepseekDeepseekChat
5057            | Self::DeepseekDeepseekChatV30324
5058            | Self::DeepseekDeepseekChatV31
5059            | Self::DeepseekDeepseekR1
5060            | Self::DeepseekDeepseekR10528
5061            | Self::DeepseekDeepseekV31Terminus
5062            | Self::DeepseekDeepseekV32
5063            | Self::DeepseekDeepseekV32Exp => 163_840,
5064            Self::AnthropicClaude3Haiku
5065            | Self::AnthropicClaudeHaiku45
5066            | Self::AnthropicClaudeOpus4
5067            | Self::AnthropicClaudeOpus41
5068            | Self::AnthropicClaudeOpus45
5069            | Self::OpenaiO1
5070            | Self::OpenaiO3
5071            | Self::OpenaiO3Mini
5072            | Self::OpenaiO3MiniHigh
5073            | Self::OpenaiO3Pro
5074            | Self::OpenaiO4Mini
5075            | Self::OpenaiO4MiniHigh
5076            | Self::OpenrouterFree => 200_000,
5077            Self::ZAiGlm47Flash | Self::ZAiGlm5Turbo | Self::ZAiGlm5vTurbo => 202_752,
5078            Self::MinimaxMinimaxM2
5079            | Self::MinimaxMinimaxM21
5080            | Self::MinimaxMinimaxM25
5081            | Self::MinimaxMinimaxM27
5082            | Self::ZAiGlm46
5083            | Self::ZAiGlm47
5084            | Self::ZAiGlm5
5085            | Self::ZAiGlm51 => 204_800,
5086            Self::Ai21JambaLarge17
5087            | Self::CohereNorthMiniCodeFree
5088            | Self::KwaipilotKatCoderAirV25
5089            | Self::KwaipilotKatCoderProV25
5090            | Self::MistralaiCodestral2508
5091            | Self::MistralaiMistralSmall3224bInstruct
5092            | Self::NvidiaNemotron3Nano30bA3bFree
5093            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
5094            | Self::RelaceRelaceSearch
5095            | Self::XAiGrokBuild01 => 256_000,
5096            Self::ArceeAiTrinityLargeThinking
5097            | Self::BytedanceSeedSeed16
5098            | Self::BytedanceSeedSeed16Flash
5099            | Self::BytedanceSeedSeed20Lite
5100            | Self::BytedanceSeedSeed20Mini
5101            | Self::GoogleGemma327bIt
5102            | Self::GoogleGemma426bA4bIt
5103            | Self::GoogleGemma426bA4bItFree
5104            | Self::GoogleGemma431bIt
5105            | Self::GoogleGemma431bItFree
5106            | Self::InclusionaiLing261t
5107            | Self::InclusionaiLing26Flash
5108            | Self::InclusionaiLing30FlashFree
5109            | Self::InclusionaiRing261t
5110            | Self::KwaipilotKatCoderProV2
5111            | Self::MistralaiMinistral14b2512
5112            | Self::MistralaiMinistral8b2512
5113            | Self::MistralaiMistralLarge2512
5114            | Self::MistralaiMistralMedium35
5115            | Self::MistralaiMistralSmall2603
5116            | Self::MoonshotaiKimiK20905
5117            | Self::MoonshotaiKimiK2Thinking
5118            | Self::MoonshotaiKimiK25
5119            | Self::MoonshotaiKimiK26
5120            | Self::MoonshotaiKimiK27Code
5121            | Self::NexAgiNexN2Mini
5122            | Self::NexAgiNexN2Pro
5123            | Self::NvidiaNemotron3Nano30bA3b
5124            | Self::NvidiaNemotron3Super120bA12bFree
5125            | Self::PoolsideLagunaS21Free
5126            | Self::PoolsideLagunaXs21
5127            | Self::PoolsideLagunaXs21Free
5128            | Self::QwenQwen3235bA22b2507
5129            | Self::QwenQwen3235bA22bThinking2507
5130            | Self::QwenQwen330bA3bInstruct2507
5131            | Self::QwenQwen3Coder
5132            | Self::QwenQwen3Coder30bA3bInstruct
5133            | Self::QwenQwen3CoderNext
5134            | Self::QwenQwen3Max
5135            | Self::QwenQwen3MaxThinking
5136            | Self::QwenQwen3Next80bA3bInstruct
5137            | Self::QwenQwen3Next80bA3bThinking
5138            | Self::QwenQwen3Vl235bA22bInstruct
5139            | Self::QwenQwen3Vl30bA3bInstruct
5140            | Self::QwenQwen3Vl30bA3bThinking
5141            | Self::QwenQwen3Vl8bInstruct
5142            | Self::QwenQwen35122bA10b
5143            | Self::QwenQwen3527b
5144            | Self::QwenQwen3535bA3b
5145            | Self::QwenQwen35397bA17b
5146            | Self::QwenQwen359b
5147            | Self::QwenQwen3627b
5148            | Self::QwenQwen3635bA3b
5149            | Self::QwenQwen36MaxPreview
5150            | Self::StepfunStep35Flash
5151            | Self::StepfunStep37Flash
5152            | Self::TencentHy3
5153            | Self::TencentHy3Preview => 262_144,
5154            Self::AmazonNovaLiteV1 | Self::AmazonNovaProV1 => 300_000,
5155            Self::OpenaiGpt5
5156            | Self::OpenaiGpt5Mini
5157            | Self::OpenaiGpt5Nano
5158            | Self::OpenaiGpt5Pro
5159            | Self::OpenaiGpt51
5160            | Self::OpenaiGpt51Codex
5161            | Self::OpenaiGpt51CodexMax
5162            | Self::OpenaiGpt51CodexMini
5163            | Self::OpenaiGpt52
5164            | Self::OpenaiGpt52Codex
5165            | Self::OpenaiGpt52Pro
5166            | Self::OpenaiGpt53Codex
5167            | Self::OpenaiGpt54Mini
5168            | Self::OpenaiGpt54Nano => 400_000,
5169            Self::XAiGrok45 => 500_000,
5170            Self::NvidiaNemotron3Ultra550bA55b => 512_288,
5171            Self::ThinkingmachinesInklingSmall => 524_288,
5172            Self::AmazonNova2LiteV1
5173            | Self::AmazonNovaPremierV1
5174            | Self::AnthropicClaudeFable5
5175            | Self::AnthropicClaudeOpus46
5176            | Self::AnthropicClaudeOpus47
5177            | Self::AnthropicClaudeOpus47Fast
5178            | Self::AnthropicClaudeOpus48
5179            | Self::AnthropicClaudeOpus48Fast
5180            | Self::AnthropicClaudeOpus5
5181            | Self::AnthropicClaudeOpus5Fast
5182            | Self::AnthropicClaudeSonnet4
5183            | Self::AnthropicClaudeSonnet45
5184            | Self::AnthropicClaudeSonnet46
5185            | Self::AnthropicClaudeSonnet5
5186            | Self::MinimaxMinimaxM1
5187            | Self::NvidiaNemotron3Super120bA12b
5188            | Self::NvidiaNemotron3Ultra550bA55bFree
5189            | Self::QwenQwenPlus
5190            | Self::QwenQwenPlus20250728
5191            | Self::QwenQwenPlus20250728Thinking
5192            | Self::QwenQwen3CoderFlash
5193            | Self::QwenQwen3CoderPlus
5194            | Self::QwenQwen35Flash0223
5195            | Self::QwenQwen35Plus0215
5196            | Self::QwenQwen35Plus20260420
5197            | Self::QwenQwen36Flash
5198            | Self::QwenQwen36Plus
5199            | Self::QwenQwen37Flash
5200            | Self::QwenQwen37Max
5201            | Self::QwenQwen37Plus
5202            | Self::SakanaFuguUltra
5203            | Self::XAiGrok43 => 1_000_000,
5204            Self::ThedrummerUnslopnemo12b => 1_024_000,
5205            Self::OpenaiGpt41 | Self::OpenaiGpt41Mini | Self::OpenaiGpt41Nano => {
5206                1_047_576
5207            }
5208            Self::DeepseekDeepseekV4Flash
5209            | Self::DeepseekDeepseekV4Flash0731
5210            | Self::DeepseekDeepseekV4Pro
5211            | Self::GoogleGemini25Flash
5212            | Self::GoogleGemini25FlashLite
5213            | Self::GoogleGemini25Pro
5214            | Self::GoogleGemini25ProPreview
5215            | Self::GoogleGemini25ProPreview0506
5216            | Self::GoogleGemini3FlashPreview
5217            | Self::GoogleGemini31FlashLite
5218            | Self::GoogleGemini31FlashLitePreview
5219            | Self::GoogleGemini31ProPreview
5220            | Self::GoogleGemini31ProPreviewCustomtools
5221            | Self::GoogleGemini35Flash
5222            | Self::GoogleGemini35FlashLite
5223            | Self::GoogleGemini36Flash
5224            | Self::MetaLlamaLlama4Maverick
5225            | Self::MetaMuseSpark11
5226            | Self::MinimaxMinimaxM3
5227            | Self::MoonshotaiKimiK3
5228            | Self::PoolsideLagunaS21
5229            | Self::ThinkingmachinesInkling
5230            | Self::ZAiGlm52 => 1_048_576,
5231            Self::MeituanLongcat20 => 1_048_756,
5232            Self::OpenaiGpt54
5233            | Self::OpenaiGpt54Pro
5234            | Self::OpenaiGpt55
5235            | Self::OpenaiGpt55Pro
5236            | Self::OpenaiGpt56Luna
5237            | Self::OpenaiGpt56LunaPro
5238            | Self::OpenaiGpt56Sol
5239            | Self::OpenaiGpt56SolPro
5240            | Self::OpenaiGpt56Terra
5241            | Self::OpenaiGpt56TerraPro
5242            | Self::XiaomiMimoV25
5243            | Self::XiaomiMimoV25Pro => 1_050_000,
5244            Self::MetaLlamaLlama4Scout => 1_310_720,
5245            Self::OpenrouterAuto | Self::XAiGrok420 => 2_000_000,
5246        }
5247    }
5248    #[allow(clippy::too_many_lines)]
5249    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
5250        match self {
5251            Self::Ai21JambaLarge17
5252            | Self::AmazonNovaLiteV1
5253            | Self::AmazonNovaMicroV1
5254            | Self::AmazonNovaPremierV1
5255            | Self::AmazonNovaProV1
5256            | Self::AnthropicClaude3Haiku
5257            | Self::ArceeAiVirtuosoLarge
5258            | Self::CohereCommandR082024
5259            | Self::CohereCommandRPlus082024
5260            | Self::DeepseekDeepseekChat
5261            | Self::DeepseekDeepseekChatV30324
5262            | Self::GoogleGemma312bIt
5263            | Self::GoogleGemma327bIt
5264            | Self::IbmGraniteGranite418b
5265            | Self::InclusionaiLing261t
5266            | Self::InclusionaiLing26Flash
5267            | Self::KwaipilotKatCoderAirV25
5268            | Self::KwaipilotKatCoderProV2
5269            | Self::KwaipilotKatCoderProV25
5270            | Self::MetaLlamaLlama3170bInstruct
5271            | Self::MetaLlamaLlama318bInstruct
5272            | Self::MetaLlamaLlama3370bInstruct
5273            | Self::MetaLlamaLlama4Maverick
5274            | Self::MetaLlamaLlama4Scout
5275            | Self::MistralaiCodestral2508
5276            | Self::MistralaiMinistral14b2512
5277            | Self::MistralaiMinistral3b2512
5278            | Self::MistralaiMinistral8b2512
5279            | Self::MistralaiMistralLarge
5280            | Self::MistralaiMistralLarge2407
5281            | Self::MistralaiMistralLarge2512
5282            | Self::MistralaiMistralMedium3
5283            | Self::MistralaiMistralMedium31
5284            | Self::MistralaiMistralNemo
5285            | Self::MistralaiMistralSaba
5286            | Self::MistralaiMistralSmall3224bInstruct
5287            | Self::MistralaiMixtral8x22bInstruct
5288            | Self::MistralaiVoxtralSmall24b2507
5289            | Self::MoonshotaiKimiK2
5290            | Self::MoonshotaiKimiK20905
5291            | Self::OpenaiGpt35Turbo
5292            | Self::OpenaiGpt35Turbo0613
5293            | Self::OpenaiGpt35Turbo16k
5294            | Self::OpenaiGpt4
5295            | Self::OpenaiGpt4Turbo
5296            | Self::OpenaiGpt4TurboPreview
5297            | Self::OpenaiGpt41
5298            | Self::OpenaiGpt41Mini
5299            | Self::OpenaiGpt41Nano
5300            | Self::OpenaiGpt4o
5301            | Self::OpenaiGpt4o20240513
5302            | Self::OpenaiGpt4o20240806
5303            | Self::OpenaiGpt4o20241120
5304            | Self::OpenaiGpt4oMini
5305            | Self::OpenaiGpt4oMini20240718
5306            | Self::OpenaiGpt52Chat
5307            | Self::OpenaiGpt53Chat
5308            | Self::OpenaiGptAudio
5309            | Self::OpenaiGptAudioMini
5310            | Self::QwenQwen2572bInstruct
5311            | Self::QwenQwen257bInstruct
5312            | Self::QwenQwenPlus
5313            | Self::QwenQwenPlus20250728
5314            | Self::QwenQwen3235bA22b2507
5315            | Self::QwenQwen330bA3bInstruct2507
5316            | Self::QwenQwen3Coder
5317            | Self::QwenQwen3Coder30bA3bInstruct
5318            | Self::QwenQwen3CoderFlash
5319            | Self::QwenQwen3CoderNext
5320            | Self::QwenQwen3CoderPlus
5321            | Self::QwenQwen3Max
5322            | Self::QwenQwen3Next80bA3bInstruct
5323            | Self::QwenQwen3Vl235bA22bInstruct
5324            | Self::QwenQwen3Vl30bA3bInstruct
5325            | Self::QwenQwen3Vl32bInstruct
5326            | Self::QwenQwen3Vl8bInstruct
5327            | Self::RekaaiRekaEdge
5328            | Self::RelaceRelaceSearch
5329            | Self::Sao10kL31Euryale70b
5330            | Self::ThedrummerUnslopnemo12b => &[],
5331            Self::MistralaiMistralMedium35
5332            | Self::MistralaiMistralSmall2603
5333            | Self::OpenaiGpt5Pro
5334            | Self::OpenaiO3MiniHigh
5335            | Self::OpenaiO4MiniHigh => &[ReasoningEffort::High],
5336            Self::DeepseekDeepseekV4Flash
5337            | Self::DeepseekDeepseekV4Pro
5338            | Self::InclusionaiRing261t
5339            | Self::ZAiGlm52 => &[ReasoningEffort::High, ReasoningEffort::Xhigh],
5340            Self::SakanaFuguUltra => {
5341                &[ReasoningEffort::High, ReasoningEffort::Xhigh, ReasoningEffort::Max]
5342            }
5343            Self::TencentHy3 | Self::TencentHy3Preview => {
5344                &[ReasoningEffort::Low, ReasoningEffort::High]
5345            }
5346            Self::DeepseekDeepseekV4Flash0731 | Self::MoonshotaiKimiK3 => {
5347                &[ReasoningEffort::Low, ReasoningEffort::High, ReasoningEffort::Max]
5348            }
5349            Self::NvidiaNemotron3Super120bA12b
5350            | Self::NvidiaNemotron3Super120bA12bFree => {
5351                &[ReasoningEffort::Low, ReasoningEffort::Medium]
5352            }
5353            Self::AionLabsAion20
5354            | Self::AionLabsAion30
5355            | Self::AionLabsAion30Mini
5356            | Self::AmazonNova2LiteV1
5357            | Self::AnthropicClaudeHaiku45
5358            | Self::AnthropicClaudeOpus4
5359            | Self::AnthropicClaudeOpus41
5360            | Self::AnthropicClaudeOpus45
5361            | Self::AnthropicClaudeSonnet4
5362            | Self::AnthropicClaudeSonnet45
5363            | Self::ArceeAiTrinityLargeThinking
5364            | Self::BytedanceSeedSeed16
5365            | Self::BytedanceSeedSeed16Flash
5366            | Self::CohereNorthMiniCodeFree
5367            | Self::DeepseekDeepseekChatV31
5368            | Self::DeepseekDeepseekR1
5369            | Self::DeepseekDeepseekR10528
5370            | Self::DeepseekDeepseekV31Terminus
5371            | Self::DeepseekDeepseekV32
5372            | Self::DeepseekDeepseekV32Exp
5373            | Self::GoogleGemini25Flash
5374            | Self::GoogleGemini25FlashLite
5375            | Self::GoogleGemini25Pro
5376            | Self::GoogleGemini25ProPreview
5377            | Self::GoogleGemini25ProPreview0506
5378            | Self::GoogleGemini3ProImage
5379            | Self::GoogleGemini31ProPreview
5380            | Self::GoogleGemini31ProPreviewCustomtools
5381            | Self::GoogleGemma426bA4bIt
5382            | Self::GoogleGemma426bA4bItFree
5383            | Self::GoogleGemma431bIt
5384            | Self::GoogleGemma431bItFree
5385            | Self::InceptionMercury2
5386            | Self::InclusionaiLing30FlashFree
5387            | Self::MeituanLongcat20
5388            | Self::MinimaxMinimaxM1
5389            | Self::MinimaxMinimaxM2
5390            | Self::MinimaxMinimaxM21
5391            | Self::MinimaxMinimaxM25
5392            | Self::MinimaxMinimaxM27
5393            | Self::MinimaxMinimaxM3
5394            | Self::MoonshotaiKimiK2Thinking
5395            | Self::MoonshotaiKimiK25
5396            | Self::MoonshotaiKimiK26
5397            | Self::MoonshotaiKimiK27Code
5398            | Self::NexAgiNexN2Mini
5399            | Self::NexAgiNexN2Pro
5400            | Self::NvidiaNemotron3Nano30bA3b
5401            | Self::NvidiaNemotron3Nano30bA3bFree
5402            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
5403            | Self::NvidiaNemotronNano12bV2VlFree
5404            | Self::NvidiaNemotronNano9bV2Free
5405            | Self::OpenaiGpt51
5406            | Self::OpenaiGpt51Codex
5407            | Self::OpenaiGpt51CodexMini
5408            | Self::OpenaiGptOss120b
5409            | Self::OpenaiGptOss20b
5410            | Self::OpenaiGptOss20bFree
5411            | Self::OpenaiGptOssSafeguard20b
5412            | Self::OpenaiO1
5413            | Self::OpenaiO3
5414            | Self::OpenaiO3Mini
5415            | Self::OpenaiO3Pro
5416            | Self::OpenaiO4Mini
5417            | Self::OpenrouterAuto
5418            | Self::OpenrouterFree
5419            | Self::PoolsideLagunaS21
5420            | Self::PoolsideLagunaS21Free
5421            | Self::PoolsideLagunaXs21
5422            | Self::PoolsideLagunaXs21Free
5423            | Self::QwenQwenPlus20250728Thinking
5424            | Self::QwenQwen314b
5425            | Self::QwenQwen3235bA22b
5426            | Self::QwenQwen3235bA22bThinking2507
5427            | Self::QwenQwen330bA3b
5428            | Self::QwenQwen330bA3bThinking2507
5429            | Self::QwenQwen332b
5430            | Self::QwenQwen38b
5431            | Self::QwenQwen3MaxThinking
5432            | Self::QwenQwen3Next80bA3bThinking
5433            | Self::QwenQwen3Vl235bA22bThinking
5434            | Self::QwenQwen3Vl30bA3bThinking
5435            | Self::QwenQwen3Vl8bThinking
5436            | Self::QwenQwen35122bA10b
5437            | Self::QwenQwen3527b
5438            | Self::QwenQwen3535bA3b
5439            | Self::QwenQwen35397bA17b
5440            | Self::QwenQwen359b
5441            | Self::QwenQwen35Flash0223
5442            | Self::QwenQwen35Plus0215
5443            | Self::QwenQwen35Plus20260420
5444            | Self::QwenQwen3627b
5445            | Self::QwenQwen3635bA3b
5446            | Self::QwenQwen36Flash
5447            | Self::QwenQwen36MaxPreview
5448            | Self::QwenQwen36Plus
5449            | Self::QwenQwen37Flash
5450            | Self::QwenQwen37Max
5451            | Self::QwenQwen37Plus
5452            | Self::StepfunStep35Flash
5453            | Self::StepfunStep37Flash
5454            | Self::UpstageSolarPro3
5455            | Self::XAiGrok420
5456            | Self::XAiGrok43
5457            | Self::XAiGrok45
5458            | Self::XAiGrokBuild01
5459            | Self::XiaomiMimoV25
5460            | Self::XiaomiMimoV25Pro
5461            | Self::ZAiGlm45
5462            | Self::ZAiGlm45Air
5463            | Self::ZAiGlm45v
5464            | Self::ZAiGlm46
5465            | Self::ZAiGlm46v
5466            | Self::ZAiGlm47
5467            | Self::ZAiGlm47Flash
5468            | Self::ZAiGlm5
5469            | Self::ZAiGlm5Turbo
5470            | Self::ZAiGlm51
5471            | Self::ZAiGlm5vTurbo => {
5472                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
5473            }
5474            Self::AnthropicClaudeOpus46 | Self::AnthropicClaudeSonnet46 => {
5475                &[
5476                    ReasoningEffort::Low,
5477                    ReasoningEffort::Medium,
5478                    ReasoningEffort::High,
5479                    ReasoningEffort::Max,
5480                ]
5481            }
5482            Self::OpenaiGpt51CodexMax
5483            | Self::OpenaiGpt52
5484            | Self::OpenaiGpt52Codex
5485            | Self::OpenaiGpt53Codex
5486            | Self::OpenaiGpt54
5487            | Self::OpenaiGpt54Mini
5488            | Self::OpenaiGpt54Nano
5489            | Self::OpenaiGpt55 => {
5490                &[
5491                    ReasoningEffort::Low,
5492                    ReasoningEffort::Medium,
5493                    ReasoningEffort::High,
5494                    ReasoningEffort::Xhigh,
5495                ]
5496            }
5497            Self::AnthropicClaudeFable5
5498            | Self::AnthropicClaudeOpus47
5499            | Self::AnthropicClaudeOpus47Fast
5500            | Self::AnthropicClaudeOpus48
5501            | Self::AnthropicClaudeOpus48Fast
5502            | Self::AnthropicClaudeOpus5
5503            | Self::AnthropicClaudeOpus5Fast
5504            | Self::AnthropicClaudeSonnet5
5505            | Self::OpenaiGpt56Luna
5506            | Self::OpenaiGpt56LunaPro
5507            | Self::OpenaiGpt56Sol
5508            | Self::OpenaiGpt56SolPro
5509            | Self::OpenaiGpt56Terra
5510            | Self::OpenaiGpt56TerraPro => {
5511                &[
5512                    ReasoningEffort::Low,
5513                    ReasoningEffort::Medium,
5514                    ReasoningEffort::High,
5515                    ReasoningEffort::Xhigh,
5516                    ReasoningEffort::Max,
5517                ]
5518            }
5519            Self::NvidiaNemotron3Ultra550bA55b
5520            | Self::NvidiaNemotron3Ultra550bA55bFree => {
5521                &[ReasoningEffort::Medium, ReasoningEffort::High]
5522            }
5523            Self::OpenaiGpt52Pro | Self::OpenaiGpt54Pro | Self::OpenaiGpt55Pro => {
5524                &[ReasoningEffort::Medium, ReasoningEffort::High, ReasoningEffort::Xhigh]
5525            }
5526            Self::BytedanceSeedSeed20Lite
5527            | Self::BytedanceSeedSeed20Mini
5528            | Self::GoogleGemini3FlashPreview
5529            | Self::GoogleGemini31FlashLite
5530            | Self::GoogleGemini31FlashLitePreview
5531            | Self::GoogleGemini35Flash
5532            | Self::GoogleGemini35FlashLite
5533            | Self::GoogleGemini36Flash
5534            | Self::OpenaiGpt5
5535            | Self::OpenaiGpt5Mini
5536            | Self::OpenaiGpt5Nano => {
5537                &[
5538                    ReasoningEffort::Minimal,
5539                    ReasoningEffort::Low,
5540                    ReasoningEffort::Medium,
5541                    ReasoningEffort::High,
5542                ]
5543            }
5544            Self::ThinkingmachinesInkling | Self::ThinkingmachinesInklingSmall => {
5545                &[
5546                    ReasoningEffort::Minimal,
5547                    ReasoningEffort::Low,
5548                    ReasoningEffort::Medium,
5549                    ReasoningEffort::High,
5550                    ReasoningEffort::Max,
5551                ]
5552            }
5553            Self::MetaMuseSpark11 => {
5554                &[
5555                    ReasoningEffort::Minimal,
5556                    ReasoningEffort::Low,
5557                    ReasoningEffort::Medium,
5558                    ReasoningEffort::High,
5559                    ReasoningEffort::Xhigh,
5560                ]
5561            }
5562        }
5563    }
5564    pub fn supports_reasoning(self) -> bool {
5565        !self.reasoning_levels().is_empty()
5566    }
5567    #[allow(clippy::too_many_lines)]
5568    pub fn supports_prompt_caching(self) -> bool {
5569        match self {
5570            Self::Ai21JambaLarge17
5571            | Self::AmazonNova2LiteV1
5572            | Self::AmazonNovaLiteV1
5573            | Self::AmazonNovaMicroV1
5574            | Self::AmazonNovaProV1
5575            | Self::ArceeAiVirtuosoLarge
5576            | Self::BytedanceSeedSeed16
5577            | Self::BytedanceSeedSeed16Flash
5578            | Self::BytedanceSeedSeed20Lite
5579            | Self::BytedanceSeedSeed20Mini
5580            | Self::CohereCommandR082024
5581            | Self::CohereCommandRPlus082024
5582            | Self::CohereNorthMiniCodeFree
5583            | Self::DeepseekDeepseekChat
5584            | Self::DeepseekDeepseekR1
5585            | Self::DeepseekDeepseekV32Exp
5586            | Self::GoogleGemma312bIt
5587            | Self::GoogleGemma426bA4bIt
5588            | Self::GoogleGemma426bA4bItFree
5589            | Self::GoogleGemma431bItFree
5590            | Self::InclusionaiLing30FlashFree
5591            | Self::MetaLlamaLlama3170bInstruct
5592            | Self::MetaLlamaLlama3370bInstruct
5593            | Self::MetaLlamaLlama4Maverick
5594            | Self::MetaLlamaLlama4Scout
5595            | Self::MinimaxMinimaxM1
5596            | Self::MinimaxMinimaxM2
5597            | Self::MistralaiMistralMedium35
5598            | Self::MistralaiMistralNemo
5599            | Self::MistralaiMistralSmall3224bInstruct
5600            | Self::MoonshotaiKimiK2
5601            | Self::MoonshotaiKimiK20905
5602            | Self::NvidiaNemotron3Nano30bA3bFree
5603            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
5604            | Self::NvidiaNemotron3Super120bA12b
5605            | Self::NvidiaNemotron3Super120bA12bFree
5606            | Self::NvidiaNemotron3Ultra550bA55bFree
5607            | Self::NvidiaNemotronNano12bV2VlFree
5608            | Self::NvidiaNemotronNano9bV2Free
5609            | Self::OpenaiGpt35Turbo
5610            | Self::OpenaiGpt35Turbo0613
5611            | Self::OpenaiGpt35Turbo16k
5612            | Self::OpenaiGpt4
5613            | Self::OpenaiGpt4Turbo
5614            | Self::OpenaiGpt4TurboPreview
5615            | Self::OpenaiGpt4o20240513
5616            | Self::OpenaiGpt5Pro
5617            | Self::OpenaiGpt52Pro
5618            | Self::OpenaiGpt54Pro
5619            | Self::OpenaiGpt55Pro
5620            | Self::OpenaiGptAudio
5621            | Self::OpenaiGptAudioMini
5622            | Self::OpenaiGptOss120b
5623            | Self::OpenaiGptOss20bFree
5624            | Self::OpenaiO3Pro
5625            | Self::OpenrouterAuto
5626            | Self::OpenrouterFree
5627            | Self::PoolsideLagunaS21Free
5628            | Self::PoolsideLagunaXs21Free
5629            | Self::QwenQwen2572bInstruct
5630            | Self::QwenQwen257bInstruct
5631            | Self::QwenQwenPlus20250728
5632            | Self::QwenQwen314b
5633            | Self::QwenQwen3235bA22b
5634            | Self::QwenQwen3235bA22b2507
5635            | Self::QwenQwen3235bA22bThinking2507
5636            | Self::QwenQwen330bA3b
5637            | Self::QwenQwen330bA3bInstruct2507
5638            | Self::QwenQwen330bA3bThinking2507
5639            | Self::QwenQwen332b
5640            | Self::QwenQwen38b
5641            | Self::QwenQwen3Coder30bA3bInstruct
5642            | Self::QwenQwen3MaxThinking
5643            | Self::QwenQwen3Next80bA3bThinking
5644            | Self::QwenQwen3Vl235bA22bThinking
5645            | Self::QwenQwen3Vl30bA3bInstruct
5646            | Self::QwenQwen3Vl30bA3bThinking
5647            | Self::QwenQwen3Vl32bInstruct
5648            | Self::QwenQwen3Vl8bInstruct
5649            | Self::QwenQwen3Vl8bThinking
5650            | Self::QwenQwen35122bA10b
5651            | Self::QwenQwen3527b
5652            | Self::QwenQwen3535bA3b
5653            | Self::QwenQwen35397bA17b
5654            | Self::QwenQwen359b
5655            | Self::QwenQwen35Flash0223
5656            | Self::QwenQwen35Plus0215
5657            | Self::QwenQwen3635bA3b
5658            | Self::RekaaiRekaEdge
5659            | Self::RelaceRelaceSearch
5660            | Self::Sao10kL31Euryale70b
5661            | Self::StepfunStep35Flash
5662            | Self::ThedrummerUnslopnemo12b => false,
5663            Self::AionLabsAion20
5664            | Self::AionLabsAion30
5665            | Self::AionLabsAion30Mini
5666            | Self::AmazonNovaPremierV1
5667            | Self::AnthropicClaude3Haiku
5668            | Self::AnthropicClaudeFable5
5669            | Self::AnthropicClaudeHaiku45
5670            | Self::AnthropicClaudeOpus4
5671            | Self::AnthropicClaudeOpus41
5672            | Self::AnthropicClaudeOpus45
5673            | Self::AnthropicClaudeOpus46
5674            | Self::AnthropicClaudeOpus47
5675            | Self::AnthropicClaudeOpus47Fast
5676            | Self::AnthropicClaudeOpus48
5677            | Self::AnthropicClaudeOpus48Fast
5678            | Self::AnthropicClaudeOpus5
5679            | Self::AnthropicClaudeOpus5Fast
5680            | Self::AnthropicClaudeSonnet4
5681            | Self::AnthropicClaudeSonnet45
5682            | Self::AnthropicClaudeSonnet46
5683            | Self::AnthropicClaudeSonnet5
5684            | Self::ArceeAiTrinityLargeThinking
5685            | Self::DeepseekDeepseekChatV30324
5686            | Self::DeepseekDeepseekChatV31
5687            | Self::DeepseekDeepseekR10528
5688            | Self::DeepseekDeepseekV31Terminus
5689            | Self::DeepseekDeepseekV32
5690            | Self::DeepseekDeepseekV4Flash
5691            | Self::DeepseekDeepseekV4Flash0731
5692            | Self::DeepseekDeepseekV4Pro
5693            | Self::GoogleGemini25Flash
5694            | Self::GoogleGemini25FlashLite
5695            | Self::GoogleGemini25Pro
5696            | Self::GoogleGemini25ProPreview
5697            | Self::GoogleGemini25ProPreview0506
5698            | Self::GoogleGemini3FlashPreview
5699            | Self::GoogleGemini3ProImage
5700            | Self::GoogleGemini31FlashLite
5701            | Self::GoogleGemini31FlashLitePreview
5702            | Self::GoogleGemini31ProPreview
5703            | Self::GoogleGemini31ProPreviewCustomtools
5704            | Self::GoogleGemini35Flash
5705            | Self::GoogleGemini35FlashLite
5706            | Self::GoogleGemini36Flash
5707            | Self::GoogleGemma327bIt
5708            | Self::GoogleGemma431bIt
5709            | Self::IbmGraniteGranite418b
5710            | Self::InceptionMercury2
5711            | Self::InclusionaiLing261t
5712            | Self::InclusionaiLing26Flash
5713            | Self::InclusionaiRing261t
5714            | Self::KwaipilotKatCoderAirV25
5715            | Self::KwaipilotKatCoderProV2
5716            | Self::KwaipilotKatCoderProV25
5717            | Self::MeituanLongcat20
5718            | Self::MetaLlamaLlama318bInstruct
5719            | Self::MetaMuseSpark11
5720            | Self::MinimaxMinimaxM21
5721            | Self::MinimaxMinimaxM25
5722            | Self::MinimaxMinimaxM27
5723            | Self::MinimaxMinimaxM3
5724            | Self::MistralaiCodestral2508
5725            | Self::MistralaiMinistral14b2512
5726            | Self::MistralaiMinistral3b2512
5727            | Self::MistralaiMinistral8b2512
5728            | Self::MistralaiMistralLarge
5729            | Self::MistralaiMistralLarge2407
5730            | Self::MistralaiMistralLarge2512
5731            | Self::MistralaiMistralMedium3
5732            | Self::MistralaiMistralMedium31
5733            | Self::MistralaiMistralSaba
5734            | Self::MistralaiMistralSmall2603
5735            | Self::MistralaiMixtral8x22bInstruct
5736            | Self::MistralaiVoxtralSmall24b2507
5737            | Self::MoonshotaiKimiK2Thinking
5738            | Self::MoonshotaiKimiK25
5739            | Self::MoonshotaiKimiK26
5740            | Self::MoonshotaiKimiK27Code
5741            | Self::MoonshotaiKimiK3
5742            | Self::NexAgiNexN2Mini
5743            | Self::NexAgiNexN2Pro
5744            | Self::NvidiaNemotron3Nano30bA3b
5745            | Self::NvidiaNemotron3Ultra550bA55b
5746            | Self::OpenaiGpt41
5747            | Self::OpenaiGpt41Mini
5748            | Self::OpenaiGpt41Nano
5749            | Self::OpenaiGpt4o
5750            | Self::OpenaiGpt4o20240806
5751            | Self::OpenaiGpt4o20241120
5752            | Self::OpenaiGpt4oMini
5753            | Self::OpenaiGpt4oMini20240718
5754            | Self::OpenaiGpt5
5755            | Self::OpenaiGpt5Mini
5756            | Self::OpenaiGpt5Nano
5757            | Self::OpenaiGpt51
5758            | Self::OpenaiGpt51Codex
5759            | Self::OpenaiGpt51CodexMax
5760            | Self::OpenaiGpt51CodexMini
5761            | Self::OpenaiGpt52
5762            | Self::OpenaiGpt52Chat
5763            | Self::OpenaiGpt52Codex
5764            | Self::OpenaiGpt53Chat
5765            | Self::OpenaiGpt53Codex
5766            | Self::OpenaiGpt54
5767            | Self::OpenaiGpt54Mini
5768            | Self::OpenaiGpt54Nano
5769            | Self::OpenaiGpt55
5770            | Self::OpenaiGpt56Luna
5771            | Self::OpenaiGpt56LunaPro
5772            | Self::OpenaiGpt56Sol
5773            | Self::OpenaiGpt56SolPro
5774            | Self::OpenaiGpt56Terra
5775            | Self::OpenaiGpt56TerraPro
5776            | Self::OpenaiGptOss20b
5777            | Self::OpenaiGptOssSafeguard20b
5778            | Self::OpenaiO1
5779            | Self::OpenaiO3
5780            | Self::OpenaiO3Mini
5781            | Self::OpenaiO3MiniHigh
5782            | Self::OpenaiO4Mini
5783            | Self::OpenaiO4MiniHigh
5784            | Self::PoolsideLagunaS21
5785            | Self::PoolsideLagunaXs21
5786            | Self::QwenQwenPlus
5787            | Self::QwenQwenPlus20250728Thinking
5788            | Self::QwenQwen3Coder
5789            | Self::QwenQwen3CoderFlash
5790            | Self::QwenQwen3CoderNext
5791            | Self::QwenQwen3CoderPlus
5792            | Self::QwenQwen3Max
5793            | Self::QwenQwen3Next80bA3bInstruct
5794            | Self::QwenQwen3Vl235bA22bInstruct
5795            | Self::QwenQwen35Plus20260420
5796            | Self::QwenQwen3627b
5797            | Self::QwenQwen36Flash
5798            | Self::QwenQwen36MaxPreview
5799            | Self::QwenQwen36Plus
5800            | Self::QwenQwen37Flash
5801            | Self::QwenQwen37Max
5802            | Self::QwenQwen37Plus
5803            | Self::SakanaFuguUltra
5804            | Self::StepfunStep37Flash
5805            | Self::TencentHy3
5806            | Self::TencentHy3Preview
5807            | Self::ThinkingmachinesInkling
5808            | Self::ThinkingmachinesInklingSmall
5809            | Self::UpstageSolarPro3
5810            | Self::XAiGrok420
5811            | Self::XAiGrok43
5812            | Self::XAiGrok45
5813            | Self::XAiGrokBuild01
5814            | Self::XiaomiMimoV25
5815            | Self::XiaomiMimoV25Pro
5816            | Self::ZAiGlm45
5817            | Self::ZAiGlm45Air
5818            | Self::ZAiGlm45v
5819            | Self::ZAiGlm46
5820            | Self::ZAiGlm46v
5821            | Self::ZAiGlm47
5822            | Self::ZAiGlm47Flash
5823            | Self::ZAiGlm5
5824            | Self::ZAiGlm5Turbo
5825            | Self::ZAiGlm51
5826            | Self::ZAiGlm52
5827            | Self::ZAiGlm5vTurbo => true,
5828        }
5829    }
5830    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
5831    pub fn pricing(self) -> Option<ModelPricing> {
5832        match self {
5833            Self::Ai21JambaLarge17 => {
5834                Some(ModelPricing {
5835                    input_per_million: 2f64,
5836                    output_per_million: 8f64,
5837                    cache_read_per_million: None,
5838                    cache_write_per_million: None,
5839                })
5840            }
5841            Self::AionLabsAion20 => {
5842                Some(ModelPricing {
5843                    input_per_million: 0.8f64,
5844                    output_per_million: 1.6f64,
5845                    cache_read_per_million: Some(0.2f64),
5846                    cache_write_per_million: None,
5847                })
5848            }
5849            Self::AionLabsAion30 => {
5850                Some(ModelPricing {
5851                    input_per_million: 3f64,
5852                    output_per_million: 6f64,
5853                    cache_read_per_million: Some(0.75f64),
5854                    cache_write_per_million: None,
5855                })
5856            }
5857            Self::AionLabsAion30Mini => {
5858                Some(ModelPricing {
5859                    input_per_million: 0.7f64,
5860                    output_per_million: 1.4f64,
5861                    cache_read_per_million: Some(0.18f64),
5862                    cache_write_per_million: None,
5863                })
5864            }
5865            Self::AmazonNova2LiteV1 => {
5866                Some(ModelPricing {
5867                    input_per_million: 0.3f64,
5868                    output_per_million: 2.5f64,
5869                    cache_read_per_million: None,
5870                    cache_write_per_million: None,
5871                })
5872            }
5873            Self::AmazonNovaLiteV1 => {
5874                Some(ModelPricing {
5875                    input_per_million: 0.06f64,
5876                    output_per_million: 0.24f64,
5877                    cache_read_per_million: None,
5878                    cache_write_per_million: None,
5879                })
5880            }
5881            Self::AmazonNovaMicroV1 => {
5882                Some(ModelPricing {
5883                    input_per_million: 0.035f64,
5884                    output_per_million: 0.14f64,
5885                    cache_read_per_million: None,
5886                    cache_write_per_million: None,
5887                })
5888            }
5889            Self::AmazonNovaPremierV1 => {
5890                Some(ModelPricing {
5891                    input_per_million: 2.5f64,
5892                    output_per_million: 12.5f64,
5893                    cache_read_per_million: Some(0.625f64),
5894                    cache_write_per_million: None,
5895                })
5896            }
5897            Self::AmazonNovaProV1 => {
5898                Some(ModelPricing {
5899                    input_per_million: 0.8f64,
5900                    output_per_million: 3.2f64,
5901                    cache_read_per_million: None,
5902                    cache_write_per_million: None,
5903                })
5904            }
5905            Self::AnthropicClaude3Haiku => {
5906                Some(ModelPricing {
5907                    input_per_million: 0.25f64,
5908                    output_per_million: 1.25f64,
5909                    cache_read_per_million: Some(0.03f64),
5910                    cache_write_per_million: Some(0.3f64),
5911                })
5912            }
5913            Self::AnthropicClaudeFable5 => {
5914                Some(ModelPricing {
5915                    input_per_million: 10f64,
5916                    output_per_million: 50f64,
5917                    cache_read_per_million: Some(1f64),
5918                    cache_write_per_million: Some(12.5f64),
5919                })
5920            }
5921            Self::AnthropicClaudeHaiku45 => {
5922                Some(ModelPricing {
5923                    input_per_million: 1f64,
5924                    output_per_million: 5f64,
5925                    cache_read_per_million: Some(0.1f64),
5926                    cache_write_per_million: Some(1.25f64),
5927                })
5928            }
5929            Self::AnthropicClaudeOpus4 => {
5930                Some(ModelPricing {
5931                    input_per_million: 15f64,
5932                    output_per_million: 75f64,
5933                    cache_read_per_million: Some(1.5f64),
5934                    cache_write_per_million: Some(18.75f64),
5935                })
5936            }
5937            Self::AnthropicClaudeOpus41 => {
5938                Some(ModelPricing {
5939                    input_per_million: 15f64,
5940                    output_per_million: 75f64,
5941                    cache_read_per_million: Some(1.5f64),
5942                    cache_write_per_million: Some(18.75f64),
5943                })
5944            }
5945            Self::AnthropicClaudeOpus45 => {
5946                Some(ModelPricing {
5947                    input_per_million: 5f64,
5948                    output_per_million: 25f64,
5949                    cache_read_per_million: Some(0.5f64),
5950                    cache_write_per_million: Some(6.25f64),
5951                })
5952            }
5953            Self::AnthropicClaudeOpus46 => {
5954                Some(ModelPricing {
5955                    input_per_million: 5f64,
5956                    output_per_million: 25f64,
5957                    cache_read_per_million: Some(0.5f64),
5958                    cache_write_per_million: Some(6.25f64),
5959                })
5960            }
5961            Self::AnthropicClaudeOpus47 => {
5962                Some(ModelPricing {
5963                    input_per_million: 5f64,
5964                    output_per_million: 25f64,
5965                    cache_read_per_million: Some(0.5f64),
5966                    cache_write_per_million: Some(6.25f64),
5967                })
5968            }
5969            Self::AnthropicClaudeOpus47Fast => {
5970                Some(ModelPricing {
5971                    input_per_million: 30f64,
5972                    output_per_million: 150f64,
5973                    cache_read_per_million: Some(3f64),
5974                    cache_write_per_million: Some(37.5f64),
5975                })
5976            }
5977            Self::AnthropicClaudeOpus48 => {
5978                Some(ModelPricing {
5979                    input_per_million: 5f64,
5980                    output_per_million: 25f64,
5981                    cache_read_per_million: Some(0.5f64),
5982                    cache_write_per_million: Some(6.25f64),
5983                })
5984            }
5985            Self::AnthropicClaudeOpus48Fast => {
5986                Some(ModelPricing {
5987                    input_per_million: 10f64,
5988                    output_per_million: 50f64,
5989                    cache_read_per_million: Some(1f64),
5990                    cache_write_per_million: Some(12.5f64),
5991                })
5992            }
5993            Self::AnthropicClaudeOpus5 => {
5994                Some(ModelPricing {
5995                    input_per_million: 5f64,
5996                    output_per_million: 25f64,
5997                    cache_read_per_million: Some(0.5f64),
5998                    cache_write_per_million: Some(6.25f64),
5999                })
6000            }
6001            Self::AnthropicClaudeOpus5Fast => {
6002                Some(ModelPricing {
6003                    input_per_million: 10f64,
6004                    output_per_million: 50f64,
6005                    cache_read_per_million: Some(1f64),
6006                    cache_write_per_million: Some(12.5f64),
6007                })
6008            }
6009            Self::AnthropicClaudeSonnet4 => {
6010                Some(ModelPricing {
6011                    input_per_million: 3f64,
6012                    output_per_million: 15f64,
6013                    cache_read_per_million: Some(0.3f64),
6014                    cache_write_per_million: Some(3.75f64),
6015                })
6016            }
6017            Self::AnthropicClaudeSonnet45 => {
6018                Some(ModelPricing {
6019                    input_per_million: 3f64,
6020                    output_per_million: 15f64,
6021                    cache_read_per_million: Some(0.3f64),
6022                    cache_write_per_million: Some(3.75f64),
6023                })
6024            }
6025            Self::AnthropicClaudeSonnet46 => {
6026                Some(ModelPricing {
6027                    input_per_million: 3f64,
6028                    output_per_million: 15f64,
6029                    cache_read_per_million: Some(0.3f64),
6030                    cache_write_per_million: Some(3.75f64),
6031                })
6032            }
6033            Self::AnthropicClaudeSonnet5 => {
6034                Some(ModelPricing {
6035                    input_per_million: 2f64,
6036                    output_per_million: 10f64,
6037                    cache_read_per_million: Some(0.2f64),
6038                    cache_write_per_million: Some(2.5f64),
6039                })
6040            }
6041            Self::ArceeAiTrinityLargeThinking => {
6042                Some(ModelPricing {
6043                    input_per_million: 0.22f64,
6044                    output_per_million: 0.85f64,
6045                    cache_read_per_million: Some(0.06f64),
6046                    cache_write_per_million: None,
6047                })
6048            }
6049            Self::ArceeAiVirtuosoLarge => {
6050                Some(ModelPricing {
6051                    input_per_million: 0.75f64,
6052                    output_per_million: 1.2f64,
6053                    cache_read_per_million: None,
6054                    cache_write_per_million: None,
6055                })
6056            }
6057            Self::BytedanceSeedSeed16 => {
6058                Some(ModelPricing {
6059                    input_per_million: 0.25f64,
6060                    output_per_million: 2f64,
6061                    cache_read_per_million: None,
6062                    cache_write_per_million: None,
6063                })
6064            }
6065            Self::BytedanceSeedSeed16Flash => {
6066                Some(ModelPricing {
6067                    input_per_million: 0.075f64,
6068                    output_per_million: 0.3f64,
6069                    cache_read_per_million: None,
6070                    cache_write_per_million: None,
6071                })
6072            }
6073            Self::BytedanceSeedSeed20Lite => {
6074                Some(ModelPricing {
6075                    input_per_million: 0.25f64,
6076                    output_per_million: 2f64,
6077                    cache_read_per_million: None,
6078                    cache_write_per_million: None,
6079                })
6080            }
6081            Self::BytedanceSeedSeed20Mini => {
6082                Some(ModelPricing {
6083                    input_per_million: 0.1f64,
6084                    output_per_million: 0.4f64,
6085                    cache_read_per_million: None,
6086                    cache_write_per_million: None,
6087                })
6088            }
6089            Self::CohereCommandR082024 => {
6090                Some(ModelPricing {
6091                    input_per_million: 0.15f64,
6092                    output_per_million: 0.6f64,
6093                    cache_read_per_million: None,
6094                    cache_write_per_million: None,
6095                })
6096            }
6097            Self::CohereCommandRPlus082024 => {
6098                Some(ModelPricing {
6099                    input_per_million: 2.5f64,
6100                    output_per_million: 10f64,
6101                    cache_read_per_million: None,
6102                    cache_write_per_million: None,
6103                })
6104            }
6105            Self::CohereNorthMiniCodeFree => {
6106                Some(ModelPricing {
6107                    input_per_million: 0f64,
6108                    output_per_million: 0f64,
6109                    cache_read_per_million: None,
6110                    cache_write_per_million: None,
6111                })
6112            }
6113            Self::DeepseekDeepseekChat => {
6114                Some(ModelPricing {
6115                    input_per_million: 0.2574f64,
6116                    output_per_million: 1.0287f64,
6117                    cache_read_per_million: None,
6118                    cache_write_per_million: None,
6119                })
6120            }
6121            Self::DeepseekDeepseekChatV30324 => {
6122                Some(ModelPricing {
6123                    input_per_million: 0.27f64,
6124                    output_per_million: 1.12f64,
6125                    cache_read_per_million: Some(0.135f64),
6126                    cache_write_per_million: None,
6127                })
6128            }
6129            Self::DeepseekDeepseekChatV31 => {
6130                Some(ModelPricing {
6131                    input_per_million: 0.25f64,
6132                    output_per_million: 0.95f64,
6133                    cache_read_per_million: Some(0.13f64),
6134                    cache_write_per_million: None,
6135                })
6136            }
6137            Self::DeepseekDeepseekR1 => {
6138                Some(ModelPricing {
6139                    input_per_million: 0.7f64,
6140                    output_per_million: 2.5f64,
6141                    cache_read_per_million: None,
6142                    cache_write_per_million: None,
6143                })
6144            }
6145            Self::DeepseekDeepseekR10528 => {
6146                Some(ModelPricing {
6147                    input_per_million: 0.5f64,
6148                    output_per_million: 2.15f64,
6149                    cache_read_per_million: Some(0.35f64),
6150                    cache_write_per_million: None,
6151                })
6152            }
6153            Self::DeepseekDeepseekV31Terminus => {
6154                Some(ModelPricing {
6155                    input_per_million: 0.27f64,
6156                    output_per_million: 1f64,
6157                    cache_read_per_million: Some(0.135f64),
6158                    cache_write_per_million: None,
6159                })
6160            }
6161            Self::DeepseekDeepseekV32 => {
6162                Some(ModelPricing {
6163                    input_per_million: 0.269f64,
6164                    output_per_million: 0.4f64,
6165                    cache_read_per_million: Some(0.1345f64),
6166                    cache_write_per_million: None,
6167                })
6168            }
6169            Self::DeepseekDeepseekV32Exp => {
6170                Some(ModelPricing {
6171                    input_per_million: 0.27f64,
6172                    output_per_million: 0.41f64,
6173                    cache_read_per_million: None,
6174                    cache_write_per_million: None,
6175                })
6176            }
6177            Self::DeepseekDeepseekV4Flash => {
6178                Some(ModelPricing {
6179                    input_per_million: 0.14f64,
6180                    output_per_million: 0.28f64,
6181                    cache_read_per_million: Some(0.028f64),
6182                    cache_write_per_million: None,
6183                })
6184            }
6185            Self::DeepseekDeepseekV4Flash0731 => {
6186                Some(ModelPricing {
6187                    input_per_million: 0.09f64,
6188                    output_per_million: 0.18f64,
6189                    cache_read_per_million: Some(0.018f64),
6190                    cache_write_per_million: None,
6191                })
6192            }
6193            Self::DeepseekDeepseekV4Pro => {
6194                Some(ModelPricing {
6195                    input_per_million: 0.435f64,
6196                    output_per_million: 0.87f64,
6197                    cache_read_per_million: Some(0.003625f64),
6198                    cache_write_per_million: None,
6199                })
6200            }
6201            Self::GoogleGemini25Flash => {
6202                Some(ModelPricing {
6203                    input_per_million: 0.3f64,
6204                    output_per_million: 2.5f64,
6205                    cache_read_per_million: Some(0.03f64),
6206                    cache_write_per_million: Some(0.083333f64),
6207                })
6208            }
6209            Self::GoogleGemini25FlashLite => {
6210                Some(ModelPricing {
6211                    input_per_million: 0.1f64,
6212                    output_per_million: 0.4f64,
6213                    cache_read_per_million: Some(0.01f64),
6214                    cache_write_per_million: Some(0.083333f64),
6215                })
6216            }
6217            Self::GoogleGemini25Pro => {
6218                Some(ModelPricing {
6219                    input_per_million: 1.25f64,
6220                    output_per_million: 10f64,
6221                    cache_read_per_million: Some(0.125f64),
6222                    cache_write_per_million: Some(0.375f64),
6223                })
6224            }
6225            Self::GoogleGemini25ProPreview => {
6226                Some(ModelPricing {
6227                    input_per_million: 1.25f64,
6228                    output_per_million: 10f64,
6229                    cache_read_per_million: Some(0.125f64),
6230                    cache_write_per_million: Some(0.375f64),
6231                })
6232            }
6233            Self::GoogleGemini25ProPreview0506 => {
6234                Some(ModelPricing {
6235                    input_per_million: 1.25f64,
6236                    output_per_million: 10f64,
6237                    cache_read_per_million: Some(0.125f64),
6238                    cache_write_per_million: Some(0.375f64),
6239                })
6240            }
6241            Self::GoogleGemini3FlashPreview => {
6242                Some(ModelPricing {
6243                    input_per_million: 0.5f64,
6244                    output_per_million: 3f64,
6245                    cache_read_per_million: Some(0.05f64),
6246                    cache_write_per_million: Some(0.083333f64),
6247                })
6248            }
6249            Self::GoogleGemini3ProImage => {
6250                Some(ModelPricing {
6251                    input_per_million: 2f64,
6252                    output_per_million: 12f64,
6253                    cache_read_per_million: Some(0.2f64),
6254                    cache_write_per_million: Some(0.375f64),
6255                })
6256            }
6257            Self::GoogleGemini31FlashLite => {
6258                Some(ModelPricing {
6259                    input_per_million: 0.25f64,
6260                    output_per_million: 1.5f64,
6261                    cache_read_per_million: Some(0.025f64),
6262                    cache_write_per_million: Some(0.083333f64),
6263                })
6264            }
6265            Self::GoogleGemini31FlashLitePreview => {
6266                Some(ModelPricing {
6267                    input_per_million: 0.25f64,
6268                    output_per_million: 1.5f64,
6269                    cache_read_per_million: Some(0.025f64),
6270                    cache_write_per_million: Some(0.083333f64),
6271                })
6272            }
6273            Self::GoogleGemini31ProPreview => {
6274                Some(ModelPricing {
6275                    input_per_million: 2f64,
6276                    output_per_million: 12f64,
6277                    cache_read_per_million: Some(0.2f64),
6278                    cache_write_per_million: Some(0.375f64),
6279                })
6280            }
6281            Self::GoogleGemini31ProPreviewCustomtools => {
6282                Some(ModelPricing {
6283                    input_per_million: 2f64,
6284                    output_per_million: 12f64,
6285                    cache_read_per_million: Some(0.2f64),
6286                    cache_write_per_million: Some(0.375f64),
6287                })
6288            }
6289            Self::GoogleGemini35Flash => {
6290                Some(ModelPricing {
6291                    input_per_million: 1.5f64,
6292                    output_per_million: 9f64,
6293                    cache_read_per_million: Some(0.15f64),
6294                    cache_write_per_million: Some(0.083333f64),
6295                })
6296            }
6297            Self::GoogleGemini35FlashLite => {
6298                Some(ModelPricing {
6299                    input_per_million: 0.3f64,
6300                    output_per_million: 2.5f64,
6301                    cache_read_per_million: Some(0.03f64),
6302                    cache_write_per_million: Some(0.083333f64),
6303                })
6304            }
6305            Self::GoogleGemini36Flash => {
6306                Some(ModelPricing {
6307                    input_per_million: 1.5f64,
6308                    output_per_million: 7.5f64,
6309                    cache_read_per_million: Some(0.15f64),
6310                    cache_write_per_million: Some(0.083333f64),
6311                })
6312            }
6313            Self::GoogleGemma312bIt => {
6314                Some(ModelPricing {
6315                    input_per_million: 0.05f64,
6316                    output_per_million: 0.15f64,
6317                    cache_read_per_million: None,
6318                    cache_write_per_million: None,
6319                })
6320            }
6321            Self::GoogleGemma327bIt => {
6322                Some(ModelPricing {
6323                    input_per_million: 0.08f64,
6324                    output_per_million: 0.45f64,
6325                    cache_read_per_million: Some(0.04f64),
6326                    cache_write_per_million: None,
6327                })
6328            }
6329            Self::GoogleGemma426bA4bIt => {
6330                Some(ModelPricing {
6331                    input_per_million: 0.07f64,
6332                    output_per_million: 0.34f64,
6333                    cache_read_per_million: None,
6334                    cache_write_per_million: None,
6335                })
6336            }
6337            Self::GoogleGemma426bA4bItFree => {
6338                Some(ModelPricing {
6339                    input_per_million: 0f64,
6340                    output_per_million: 0f64,
6341                    cache_read_per_million: None,
6342                    cache_write_per_million: None,
6343                })
6344            }
6345            Self::GoogleGemma431bIt => {
6346                Some(ModelPricing {
6347                    input_per_million: 0.1f64,
6348                    output_per_million: 0.34f64,
6349                    cache_read_per_million: Some(0.1f64),
6350                    cache_write_per_million: None,
6351                })
6352            }
6353            Self::GoogleGemma431bItFree => {
6354                Some(ModelPricing {
6355                    input_per_million: 0f64,
6356                    output_per_million: 0f64,
6357                    cache_read_per_million: None,
6358                    cache_write_per_million: None,
6359                })
6360            }
6361            Self::IbmGraniteGranite418b => {
6362                Some(ModelPricing {
6363                    input_per_million: 0.05f64,
6364                    output_per_million: 0.1f64,
6365                    cache_read_per_million: Some(0.05f64),
6366                    cache_write_per_million: None,
6367                })
6368            }
6369            Self::InceptionMercury2 => {
6370                Some(ModelPricing {
6371                    input_per_million: 0.25f64,
6372                    output_per_million: 0.75f64,
6373                    cache_read_per_million: Some(0.025f64),
6374                    cache_write_per_million: None,
6375                })
6376            }
6377            Self::InclusionaiLing261t => {
6378                Some(ModelPricing {
6379                    input_per_million: 0.075f64,
6380                    output_per_million: 0.625f64,
6381                    cache_read_per_million: Some(0.015f64),
6382                    cache_write_per_million: None,
6383                })
6384            }
6385            Self::InclusionaiLing26Flash => {
6386                Some(ModelPricing {
6387                    input_per_million: 0.01f64,
6388                    output_per_million: 0.03f64,
6389                    cache_read_per_million: Some(0.002f64),
6390                    cache_write_per_million: None,
6391                })
6392            }
6393            Self::InclusionaiLing30FlashFree => {
6394                Some(ModelPricing {
6395                    input_per_million: 0f64,
6396                    output_per_million: 0f64,
6397                    cache_read_per_million: None,
6398                    cache_write_per_million: None,
6399                })
6400            }
6401            Self::InclusionaiRing261t => {
6402                Some(ModelPricing {
6403                    input_per_million: 0.075f64,
6404                    output_per_million: 0.625f64,
6405                    cache_read_per_million: Some(0.015f64),
6406                    cache_write_per_million: None,
6407                })
6408            }
6409            Self::KwaipilotKatCoderAirV25 => {
6410                Some(ModelPricing {
6411                    input_per_million: 0.15f64,
6412                    output_per_million: 0.6f64,
6413                    cache_read_per_million: Some(0.03f64),
6414                    cache_write_per_million: None,
6415                })
6416            }
6417            Self::KwaipilotKatCoderProV2 => {
6418                Some(ModelPricing {
6419                    input_per_million: 0.3f64,
6420                    output_per_million: 1.2f64,
6421                    cache_read_per_million: Some(0.06f64),
6422                    cache_write_per_million: None,
6423                })
6424            }
6425            Self::KwaipilotKatCoderProV25 => {
6426                Some(ModelPricing {
6427                    input_per_million: 0.74f64,
6428                    output_per_million: 2.96f64,
6429                    cache_read_per_million: Some(0.15f64),
6430                    cache_write_per_million: None,
6431                })
6432            }
6433            Self::MeituanLongcat20 => {
6434                Some(ModelPricing {
6435                    input_per_million: 0.3f64,
6436                    output_per_million: 1.2f64,
6437                    cache_read_per_million: Some(0.006f64),
6438                    cache_write_per_million: None,
6439                })
6440            }
6441            Self::MetaLlamaLlama3170bInstruct => {
6442                Some(ModelPricing {
6443                    input_per_million: 0.4f64,
6444                    output_per_million: 0.4f64,
6445                    cache_read_per_million: None,
6446                    cache_write_per_million: None,
6447                })
6448            }
6449            Self::MetaLlamaLlama318bInstruct => {
6450                Some(ModelPricing {
6451                    input_per_million: 0.05f64,
6452                    output_per_million: 0.08f64,
6453                    cache_read_per_million: Some(0.025f64),
6454                    cache_write_per_million: None,
6455                })
6456            }
6457            Self::MetaLlamaLlama3370bInstruct => {
6458                Some(ModelPricing {
6459                    input_per_million: 0.13f64,
6460                    output_per_million: 0.4f64,
6461                    cache_read_per_million: None,
6462                    cache_write_per_million: None,
6463                })
6464            }
6465            Self::MetaLlamaLlama4Maverick => {
6466                Some(ModelPricing {
6467                    input_per_million: 0.2f64,
6468                    output_per_million: 0.8f64,
6469                    cache_read_per_million: None,
6470                    cache_write_per_million: None,
6471                })
6472            }
6473            Self::MetaLlamaLlama4Scout => {
6474                Some(ModelPricing {
6475                    input_per_million: 0.1f64,
6476                    output_per_million: 0.3f64,
6477                    cache_read_per_million: None,
6478                    cache_write_per_million: None,
6479                })
6480            }
6481            Self::MetaMuseSpark11 => {
6482                Some(ModelPricing {
6483                    input_per_million: 1.25f64,
6484                    output_per_million: 4.25f64,
6485                    cache_read_per_million: Some(0.15f64),
6486                    cache_write_per_million: None,
6487                })
6488            }
6489            Self::MinimaxMinimaxM1 => {
6490                Some(ModelPricing {
6491                    input_per_million: 0.55f64,
6492                    output_per_million: 2.2f64,
6493                    cache_read_per_million: None,
6494                    cache_write_per_million: None,
6495                })
6496            }
6497            Self::MinimaxMinimaxM2 => {
6498                Some(ModelPricing {
6499                    input_per_million: 0.255f64,
6500                    output_per_million: 1.02f64,
6501                    cache_read_per_million: None,
6502                    cache_write_per_million: None,
6503                })
6504            }
6505            Self::MinimaxMinimaxM21 => {
6506                Some(ModelPricing {
6507                    input_per_million: 0.3f64,
6508                    output_per_million: 1.2f64,
6509                    cache_read_per_million: Some(0.03f64),
6510                    cache_write_per_million: None,
6511                })
6512            }
6513            Self::MinimaxMinimaxM25 => {
6514                Some(ModelPricing {
6515                    input_per_million: 0.15f64,
6516                    output_per_million: 0.9f64,
6517                    cache_read_per_million: Some(0.05f64),
6518                    cache_write_per_million: None,
6519                })
6520            }
6521            Self::MinimaxMinimaxM27 => {
6522                Some(ModelPricing {
6523                    input_per_million: 0.25f64,
6524                    output_per_million: 1f64,
6525                    cache_read_per_million: Some(0.05f64),
6526                    cache_write_per_million: None,
6527                })
6528            }
6529            Self::MinimaxMinimaxM3 => {
6530                Some(ModelPricing {
6531                    input_per_million: 0.3f64,
6532                    output_per_million: 1.2f64,
6533                    cache_read_per_million: Some(0.06f64),
6534                    cache_write_per_million: None,
6535                })
6536            }
6537            Self::MistralaiCodestral2508 => {
6538                Some(ModelPricing {
6539                    input_per_million: 0.3f64,
6540                    output_per_million: 0.9f64,
6541                    cache_read_per_million: Some(0.03f64),
6542                    cache_write_per_million: None,
6543                })
6544            }
6545            Self::MistralaiMinistral14b2512 => {
6546                Some(ModelPricing {
6547                    input_per_million: 0.2f64,
6548                    output_per_million: 0.2f64,
6549                    cache_read_per_million: Some(0.02f64),
6550                    cache_write_per_million: None,
6551                })
6552            }
6553            Self::MistralaiMinistral3b2512 => {
6554                Some(ModelPricing {
6555                    input_per_million: 0.1f64,
6556                    output_per_million: 0.1f64,
6557                    cache_read_per_million: Some(0.01f64),
6558                    cache_write_per_million: None,
6559                })
6560            }
6561            Self::MistralaiMinistral8b2512 => {
6562                Some(ModelPricing {
6563                    input_per_million: 0.15f64,
6564                    output_per_million: 0.15f64,
6565                    cache_read_per_million: Some(0.015f64),
6566                    cache_write_per_million: None,
6567                })
6568            }
6569            Self::MistralaiMistralLarge => {
6570                Some(ModelPricing {
6571                    input_per_million: 2f64,
6572                    output_per_million: 6f64,
6573                    cache_read_per_million: Some(0.2f64),
6574                    cache_write_per_million: None,
6575                })
6576            }
6577            Self::MistralaiMistralLarge2407 => {
6578                Some(ModelPricing {
6579                    input_per_million: 2f64,
6580                    output_per_million: 6f64,
6581                    cache_read_per_million: Some(0.2f64),
6582                    cache_write_per_million: None,
6583                })
6584            }
6585            Self::MistralaiMistralLarge2512 => {
6586                Some(ModelPricing {
6587                    input_per_million: 0.5f64,
6588                    output_per_million: 1.5f64,
6589                    cache_read_per_million: Some(0.05f64),
6590                    cache_write_per_million: None,
6591                })
6592            }
6593            Self::MistralaiMistralMedium3 => {
6594                Some(ModelPricing {
6595                    input_per_million: 0.4f64,
6596                    output_per_million: 2f64,
6597                    cache_read_per_million: Some(0.04f64),
6598                    cache_write_per_million: None,
6599                })
6600            }
6601            Self::MistralaiMistralMedium35 => {
6602                Some(ModelPricing {
6603                    input_per_million: 1.5f64,
6604                    output_per_million: 7.5f64,
6605                    cache_read_per_million: None,
6606                    cache_write_per_million: None,
6607                })
6608            }
6609            Self::MistralaiMistralMedium31 => {
6610                Some(ModelPricing {
6611                    input_per_million: 0.4f64,
6612                    output_per_million: 2f64,
6613                    cache_read_per_million: Some(0.04f64),
6614                    cache_write_per_million: None,
6615                })
6616            }
6617            Self::MistralaiMistralNemo => {
6618                Some(ModelPricing {
6619                    input_per_million: 0.019f64,
6620                    output_per_million: 0.03f64,
6621                    cache_read_per_million: None,
6622                    cache_write_per_million: None,
6623                })
6624            }
6625            Self::MistralaiMistralSaba => {
6626                Some(ModelPricing {
6627                    input_per_million: 0.2f64,
6628                    output_per_million: 0.6f64,
6629                    cache_read_per_million: Some(0.02f64),
6630                    cache_write_per_million: None,
6631                })
6632            }
6633            Self::MistralaiMistralSmall2603 => {
6634                Some(ModelPricing {
6635                    input_per_million: 0.15f64,
6636                    output_per_million: 0.6f64,
6637                    cache_read_per_million: Some(0.015f64),
6638                    cache_write_per_million: None,
6639                })
6640            }
6641            Self::MistralaiMistralSmall3224bInstruct => {
6642                Some(ModelPricing {
6643                    input_per_million: 0.075f64,
6644                    output_per_million: 0.2f64,
6645                    cache_read_per_million: None,
6646                    cache_write_per_million: None,
6647                })
6648            }
6649            Self::MistralaiMixtral8x22bInstruct => {
6650                Some(ModelPricing {
6651                    input_per_million: 2f64,
6652                    output_per_million: 6f64,
6653                    cache_read_per_million: Some(0.2f64),
6654                    cache_write_per_million: None,
6655                })
6656            }
6657            Self::MistralaiVoxtralSmall24b2507 => {
6658                Some(ModelPricing {
6659                    input_per_million: 0.1f64,
6660                    output_per_million: 0.3f64,
6661                    cache_read_per_million: Some(0.01f64),
6662                    cache_write_per_million: None,
6663                })
6664            }
6665            Self::MoonshotaiKimiK2 => {
6666                Some(ModelPricing {
6667                    input_per_million: 0.57f64,
6668                    output_per_million: 2.3f64,
6669                    cache_read_per_million: None,
6670                    cache_write_per_million: None,
6671                })
6672            }
6673            Self::MoonshotaiKimiK20905 => {
6674                Some(ModelPricing {
6675                    input_per_million: 0.6f64,
6676                    output_per_million: 2.5f64,
6677                    cache_read_per_million: None,
6678                    cache_write_per_million: None,
6679                })
6680            }
6681            Self::MoonshotaiKimiK2Thinking => {
6682                Some(ModelPricing {
6683                    input_per_million: 0.6f64,
6684                    output_per_million: 2.5f64,
6685                    cache_read_per_million: Some(0.15f64),
6686                    cache_write_per_million: None,
6687                })
6688            }
6689            Self::MoonshotaiKimiK25 => {
6690                Some(ModelPricing {
6691                    input_per_million: 0.57f64,
6692                    output_per_million: 2.85f64,
6693                    cache_read_per_million: Some(0.095f64),
6694                    cache_write_per_million: None,
6695                })
6696            }
6697            Self::MoonshotaiKimiK26 => {
6698                Some(ModelPricing {
6699                    input_per_million: 0.6f64,
6700                    output_per_million: 3.41f64,
6701                    cache_read_per_million: Some(0.2f64),
6702                    cache_write_per_million: None,
6703                })
6704            }
6705            Self::MoonshotaiKimiK27Code => {
6706                Some(ModelPricing {
6707                    input_per_million: 0.73f64,
6708                    output_per_million: 3.5f64,
6709                    cache_read_per_million: Some(0.15f64),
6710                    cache_write_per_million: None,
6711                })
6712            }
6713            Self::MoonshotaiKimiK3 => {
6714                Some(ModelPricing {
6715                    input_per_million: 3f64,
6716                    output_per_million: 15f64,
6717                    cache_read_per_million: Some(0.3f64),
6718                    cache_write_per_million: None,
6719                })
6720            }
6721            Self::NexAgiNexN2Mini => {
6722                Some(ModelPricing {
6723                    input_per_million: 0.025f64,
6724                    output_per_million: 0.1f64,
6725                    cache_read_per_million: Some(0.0025f64),
6726                    cache_write_per_million: None,
6727                })
6728            }
6729            Self::NexAgiNexN2Pro => {
6730                Some(ModelPricing {
6731                    input_per_million: 0.25f64,
6732                    output_per_million: 1f64,
6733                    cache_read_per_million: Some(0.025f64),
6734                    cache_write_per_million: None,
6735                })
6736            }
6737            Self::NvidiaNemotron3Nano30bA3b => {
6738                Some(ModelPricing {
6739                    input_per_million: 0.05f64,
6740                    output_per_million: 0.2f64,
6741                    cache_read_per_million: Some(0.03f64),
6742                    cache_write_per_million: None,
6743                })
6744            }
6745            Self::NvidiaNemotron3Nano30bA3bFree => {
6746                Some(ModelPricing {
6747                    input_per_million: 0f64,
6748                    output_per_million: 0f64,
6749                    cache_read_per_million: None,
6750                    cache_write_per_million: None,
6751                })
6752            }
6753            Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree => {
6754                Some(ModelPricing {
6755                    input_per_million: 0f64,
6756                    output_per_million: 0f64,
6757                    cache_read_per_million: None,
6758                    cache_write_per_million: None,
6759                })
6760            }
6761            Self::NvidiaNemotron3Super120bA12b => {
6762                Some(ModelPricing {
6763                    input_per_million: 0.085f64,
6764                    output_per_million: 0.4f64,
6765                    cache_read_per_million: None,
6766                    cache_write_per_million: None,
6767                })
6768            }
6769            Self::NvidiaNemotron3Super120bA12bFree => {
6770                Some(ModelPricing {
6771                    input_per_million: 0f64,
6772                    output_per_million: 0f64,
6773                    cache_read_per_million: None,
6774                    cache_write_per_million: None,
6775                })
6776            }
6777            Self::NvidiaNemotron3Ultra550bA55b => {
6778                Some(ModelPricing {
6779                    input_per_million: 0.6f64,
6780                    output_per_million: 3.6f64,
6781                    cache_read_per_million: Some(0.2f64),
6782                    cache_write_per_million: None,
6783                })
6784            }
6785            Self::NvidiaNemotron3Ultra550bA55bFree => {
6786                Some(ModelPricing {
6787                    input_per_million: 0f64,
6788                    output_per_million: 0f64,
6789                    cache_read_per_million: None,
6790                    cache_write_per_million: None,
6791                })
6792            }
6793            Self::NvidiaNemotronNano12bV2VlFree => {
6794                Some(ModelPricing {
6795                    input_per_million: 0f64,
6796                    output_per_million: 0f64,
6797                    cache_read_per_million: None,
6798                    cache_write_per_million: None,
6799                })
6800            }
6801            Self::NvidiaNemotronNano9bV2Free => {
6802                Some(ModelPricing {
6803                    input_per_million: 0f64,
6804                    output_per_million: 0f64,
6805                    cache_read_per_million: None,
6806                    cache_write_per_million: None,
6807                })
6808            }
6809            Self::OpenaiGpt35Turbo => {
6810                Some(ModelPricing {
6811                    input_per_million: 0.5f64,
6812                    output_per_million: 1.5f64,
6813                    cache_read_per_million: None,
6814                    cache_write_per_million: None,
6815                })
6816            }
6817            Self::OpenaiGpt35Turbo0613 => {
6818                Some(ModelPricing {
6819                    input_per_million: 1f64,
6820                    output_per_million: 2f64,
6821                    cache_read_per_million: None,
6822                    cache_write_per_million: None,
6823                })
6824            }
6825            Self::OpenaiGpt35Turbo16k => {
6826                Some(ModelPricing {
6827                    input_per_million: 3f64,
6828                    output_per_million: 4f64,
6829                    cache_read_per_million: None,
6830                    cache_write_per_million: None,
6831                })
6832            }
6833            Self::OpenaiGpt4 => {
6834                Some(ModelPricing {
6835                    input_per_million: 30f64,
6836                    output_per_million: 60f64,
6837                    cache_read_per_million: None,
6838                    cache_write_per_million: None,
6839                })
6840            }
6841            Self::OpenaiGpt4Turbo => {
6842                Some(ModelPricing {
6843                    input_per_million: 10f64,
6844                    output_per_million: 30f64,
6845                    cache_read_per_million: None,
6846                    cache_write_per_million: None,
6847                })
6848            }
6849            Self::OpenaiGpt4TurboPreview => {
6850                Some(ModelPricing {
6851                    input_per_million: 10f64,
6852                    output_per_million: 30f64,
6853                    cache_read_per_million: None,
6854                    cache_write_per_million: None,
6855                })
6856            }
6857            Self::OpenaiGpt41 => {
6858                Some(ModelPricing {
6859                    input_per_million: 2f64,
6860                    output_per_million: 8f64,
6861                    cache_read_per_million: Some(0.5f64),
6862                    cache_write_per_million: None,
6863                })
6864            }
6865            Self::OpenaiGpt41Mini => {
6866                Some(ModelPricing {
6867                    input_per_million: 0.4f64,
6868                    output_per_million: 1.6f64,
6869                    cache_read_per_million: Some(0.1f64),
6870                    cache_write_per_million: None,
6871                })
6872            }
6873            Self::OpenaiGpt41Nano => {
6874                Some(ModelPricing {
6875                    input_per_million: 0.1f64,
6876                    output_per_million: 0.4f64,
6877                    cache_read_per_million: Some(0.025f64),
6878                    cache_write_per_million: None,
6879                })
6880            }
6881            Self::OpenaiGpt4o => {
6882                Some(ModelPricing {
6883                    input_per_million: 2.5f64,
6884                    output_per_million: 10f64,
6885                    cache_read_per_million: Some(1.25f64),
6886                    cache_write_per_million: None,
6887                })
6888            }
6889            Self::OpenaiGpt4o20240513 => {
6890                Some(ModelPricing {
6891                    input_per_million: 5f64,
6892                    output_per_million: 15f64,
6893                    cache_read_per_million: None,
6894                    cache_write_per_million: None,
6895                })
6896            }
6897            Self::OpenaiGpt4o20240806 => {
6898                Some(ModelPricing {
6899                    input_per_million: 2.5f64,
6900                    output_per_million: 10f64,
6901                    cache_read_per_million: Some(1.25f64),
6902                    cache_write_per_million: None,
6903                })
6904            }
6905            Self::OpenaiGpt4o20241120 => {
6906                Some(ModelPricing {
6907                    input_per_million: 2.5f64,
6908                    output_per_million: 10f64,
6909                    cache_read_per_million: Some(1.25f64),
6910                    cache_write_per_million: None,
6911                })
6912            }
6913            Self::OpenaiGpt4oMini => {
6914                Some(ModelPricing {
6915                    input_per_million: 0.15f64,
6916                    output_per_million: 0.6f64,
6917                    cache_read_per_million: Some(0.075f64),
6918                    cache_write_per_million: None,
6919                })
6920            }
6921            Self::OpenaiGpt4oMini20240718 => {
6922                Some(ModelPricing {
6923                    input_per_million: 0.15f64,
6924                    output_per_million: 0.6f64,
6925                    cache_read_per_million: Some(0.075f64),
6926                    cache_write_per_million: None,
6927                })
6928            }
6929            Self::OpenaiGpt5 => {
6930                Some(ModelPricing {
6931                    input_per_million: 1.25f64,
6932                    output_per_million: 10f64,
6933                    cache_read_per_million: Some(0.125f64),
6934                    cache_write_per_million: None,
6935                })
6936            }
6937            Self::OpenaiGpt5Mini => {
6938                Some(ModelPricing {
6939                    input_per_million: 0.25f64,
6940                    output_per_million: 2f64,
6941                    cache_read_per_million: Some(0.025f64),
6942                    cache_write_per_million: None,
6943                })
6944            }
6945            Self::OpenaiGpt5Nano => {
6946                Some(ModelPricing {
6947                    input_per_million: 0.05f64,
6948                    output_per_million: 0.4f64,
6949                    cache_read_per_million: Some(0.005f64),
6950                    cache_write_per_million: None,
6951                })
6952            }
6953            Self::OpenaiGpt5Pro => {
6954                Some(ModelPricing {
6955                    input_per_million: 15f64,
6956                    output_per_million: 120f64,
6957                    cache_read_per_million: None,
6958                    cache_write_per_million: None,
6959                })
6960            }
6961            Self::OpenaiGpt51 => {
6962                Some(ModelPricing {
6963                    input_per_million: 1.25f64,
6964                    output_per_million: 10f64,
6965                    cache_read_per_million: Some(0.125f64),
6966                    cache_write_per_million: None,
6967                })
6968            }
6969            Self::OpenaiGpt51Codex => {
6970                Some(ModelPricing {
6971                    input_per_million: 1.25f64,
6972                    output_per_million: 10f64,
6973                    cache_read_per_million: Some(0.13f64),
6974                    cache_write_per_million: None,
6975                })
6976            }
6977            Self::OpenaiGpt51CodexMax => {
6978                Some(ModelPricing {
6979                    input_per_million: 1.25f64,
6980                    output_per_million: 10f64,
6981                    cache_read_per_million: Some(0.125f64),
6982                    cache_write_per_million: None,
6983                })
6984            }
6985            Self::OpenaiGpt51CodexMini => {
6986                Some(ModelPricing {
6987                    input_per_million: 0.25f64,
6988                    output_per_million: 2f64,
6989                    cache_read_per_million: Some(0.03f64),
6990                    cache_write_per_million: None,
6991                })
6992            }
6993            Self::OpenaiGpt52 => {
6994                Some(ModelPricing {
6995                    input_per_million: 1.75f64,
6996                    output_per_million: 14f64,
6997                    cache_read_per_million: Some(0.175f64),
6998                    cache_write_per_million: None,
6999                })
7000            }
7001            Self::OpenaiGpt52Chat => {
7002                Some(ModelPricing {
7003                    input_per_million: 1.75f64,
7004                    output_per_million: 14f64,
7005                    cache_read_per_million: Some(0.175f64),
7006                    cache_write_per_million: None,
7007                })
7008            }
7009            Self::OpenaiGpt52Codex => {
7010                Some(ModelPricing {
7011                    input_per_million: 1.75f64,
7012                    output_per_million: 14f64,
7013                    cache_read_per_million: Some(0.175f64),
7014                    cache_write_per_million: None,
7015                })
7016            }
7017            Self::OpenaiGpt52Pro => {
7018                Some(ModelPricing {
7019                    input_per_million: 21f64,
7020                    output_per_million: 168f64,
7021                    cache_read_per_million: None,
7022                    cache_write_per_million: None,
7023                })
7024            }
7025            Self::OpenaiGpt53Chat => {
7026                Some(ModelPricing {
7027                    input_per_million: 1.75f64,
7028                    output_per_million: 14f64,
7029                    cache_read_per_million: Some(0.175f64),
7030                    cache_write_per_million: None,
7031                })
7032            }
7033            Self::OpenaiGpt53Codex => {
7034                Some(ModelPricing {
7035                    input_per_million: 1.75f64,
7036                    output_per_million: 14f64,
7037                    cache_read_per_million: Some(0.175f64),
7038                    cache_write_per_million: None,
7039                })
7040            }
7041            Self::OpenaiGpt54 => {
7042                Some(ModelPricing {
7043                    input_per_million: 2.5f64,
7044                    output_per_million: 15f64,
7045                    cache_read_per_million: Some(0.25f64),
7046                    cache_write_per_million: None,
7047                })
7048            }
7049            Self::OpenaiGpt54Mini => {
7050                Some(ModelPricing {
7051                    input_per_million: 0.75f64,
7052                    output_per_million: 4.5f64,
7053                    cache_read_per_million: Some(0.075f64),
7054                    cache_write_per_million: None,
7055                })
7056            }
7057            Self::OpenaiGpt54Nano => {
7058                Some(ModelPricing {
7059                    input_per_million: 0.2f64,
7060                    output_per_million: 1.25f64,
7061                    cache_read_per_million: Some(0.02f64),
7062                    cache_write_per_million: None,
7063                })
7064            }
7065            Self::OpenaiGpt54Pro => {
7066                Some(ModelPricing {
7067                    input_per_million: 30f64,
7068                    output_per_million: 180f64,
7069                    cache_read_per_million: None,
7070                    cache_write_per_million: None,
7071                })
7072            }
7073            Self::OpenaiGpt55 => {
7074                Some(ModelPricing {
7075                    input_per_million: 5f64,
7076                    output_per_million: 30f64,
7077                    cache_read_per_million: Some(0.5f64),
7078                    cache_write_per_million: None,
7079                })
7080            }
7081            Self::OpenaiGpt55Pro => {
7082                Some(ModelPricing {
7083                    input_per_million: 30f64,
7084                    output_per_million: 180f64,
7085                    cache_read_per_million: None,
7086                    cache_write_per_million: None,
7087                })
7088            }
7089            Self::OpenaiGpt56Luna => {
7090                Some(ModelPricing {
7091                    input_per_million: 0.1f64,
7092                    output_per_million: 0.6f64,
7093                    cache_read_per_million: Some(0.01f64),
7094                    cache_write_per_million: Some(0.125f64),
7095                })
7096            }
7097            Self::OpenaiGpt56LunaPro => {
7098                Some(ModelPricing {
7099                    input_per_million: 0.1f64,
7100                    output_per_million: 0.6f64,
7101                    cache_read_per_million: Some(0.01f64),
7102                    cache_write_per_million: Some(0.125f64),
7103                })
7104            }
7105            Self::OpenaiGpt56Sol => {
7106                Some(ModelPricing {
7107                    input_per_million: 5f64,
7108                    output_per_million: 30f64,
7109                    cache_read_per_million: Some(0.5f64),
7110                    cache_write_per_million: Some(6.25f64),
7111                })
7112            }
7113            Self::OpenaiGpt56SolPro => {
7114                Some(ModelPricing {
7115                    input_per_million: 5f64,
7116                    output_per_million: 30f64,
7117                    cache_read_per_million: Some(0.5f64),
7118                    cache_write_per_million: Some(6.25f64),
7119                })
7120            }
7121            Self::OpenaiGpt56Terra => {
7122                Some(ModelPricing {
7123                    input_per_million: 1f64,
7124                    output_per_million: 6f64,
7125                    cache_read_per_million: Some(0.1f64),
7126                    cache_write_per_million: Some(1.25f64),
7127                })
7128            }
7129            Self::OpenaiGpt56TerraPro => {
7130                Some(ModelPricing {
7131                    input_per_million: 1f64,
7132                    output_per_million: 6f64,
7133                    cache_read_per_million: Some(0.1f64),
7134                    cache_write_per_million: Some(1.25f64),
7135                })
7136            }
7137            Self::OpenaiGptAudio => {
7138                Some(ModelPricing {
7139                    input_per_million: 2.5f64,
7140                    output_per_million: 10f64,
7141                    cache_read_per_million: None,
7142                    cache_write_per_million: None,
7143                })
7144            }
7145            Self::OpenaiGptAudioMini => {
7146                Some(ModelPricing {
7147                    input_per_million: 0.6f64,
7148                    output_per_million: 2.4f64,
7149                    cache_read_per_million: None,
7150                    cache_write_per_million: None,
7151                })
7152            }
7153            Self::OpenaiGptOss120b => {
7154                Some(ModelPricing {
7155                    input_per_million: 0.037f64,
7156                    output_per_million: 0.17f64,
7157                    cache_read_per_million: None,
7158                    cache_write_per_million: None,
7159                })
7160            }
7161            Self::OpenaiGptOss20b => {
7162                Some(ModelPricing {
7163                    input_per_million: 0.03f64,
7164                    output_per_million: 0.13f64,
7165                    cache_read_per_million: Some(0.03f64),
7166                    cache_write_per_million: None,
7167                })
7168            }
7169            Self::OpenaiGptOss20bFree => {
7170                Some(ModelPricing {
7171                    input_per_million: 0f64,
7172                    output_per_million: 0f64,
7173                    cache_read_per_million: None,
7174                    cache_write_per_million: None,
7175                })
7176            }
7177            Self::OpenaiGptOssSafeguard20b => {
7178                Some(ModelPricing {
7179                    input_per_million: 0.075f64,
7180                    output_per_million: 0.3f64,
7181                    cache_read_per_million: Some(0.0375f64),
7182                    cache_write_per_million: None,
7183                })
7184            }
7185            Self::OpenaiO1 => {
7186                Some(ModelPricing {
7187                    input_per_million: 15f64,
7188                    output_per_million: 60f64,
7189                    cache_read_per_million: Some(7.5f64),
7190                    cache_write_per_million: None,
7191                })
7192            }
7193            Self::OpenaiO3 => {
7194                Some(ModelPricing {
7195                    input_per_million: 2f64,
7196                    output_per_million: 8f64,
7197                    cache_read_per_million: Some(0.5f64),
7198                    cache_write_per_million: None,
7199                })
7200            }
7201            Self::OpenaiO3Mini => {
7202                Some(ModelPricing {
7203                    input_per_million: 1.1f64,
7204                    output_per_million: 4.4f64,
7205                    cache_read_per_million: Some(0.55f64),
7206                    cache_write_per_million: None,
7207                })
7208            }
7209            Self::OpenaiO3MiniHigh => {
7210                Some(ModelPricing {
7211                    input_per_million: 1.1f64,
7212                    output_per_million: 4.4f64,
7213                    cache_read_per_million: Some(0.55f64),
7214                    cache_write_per_million: None,
7215                })
7216            }
7217            Self::OpenaiO3Pro => {
7218                Some(ModelPricing {
7219                    input_per_million: 20f64,
7220                    output_per_million: 80f64,
7221                    cache_read_per_million: None,
7222                    cache_write_per_million: None,
7223                })
7224            }
7225            Self::OpenaiO4Mini => {
7226                Some(ModelPricing {
7227                    input_per_million: 1.1f64,
7228                    output_per_million: 4.4f64,
7229                    cache_read_per_million: Some(0.275f64),
7230                    cache_write_per_million: None,
7231                })
7232            }
7233            Self::OpenaiO4MiniHigh => {
7234                Some(ModelPricing {
7235                    input_per_million: 1.1f64,
7236                    output_per_million: 4.4f64,
7237                    cache_read_per_million: Some(0.275f64),
7238                    cache_write_per_million: None,
7239                })
7240            }
7241            Self::OpenrouterAuto => None,
7242            Self::OpenrouterFree => {
7243                Some(ModelPricing {
7244                    input_per_million: 0f64,
7245                    output_per_million: 0f64,
7246                    cache_read_per_million: None,
7247                    cache_write_per_million: None,
7248                })
7249            }
7250            Self::PoolsideLagunaS21 => {
7251                Some(ModelPricing {
7252                    input_per_million: 0.09f64,
7253                    output_per_million: 0.18f64,
7254                    cache_read_per_million: Some(0.009f64),
7255                    cache_write_per_million: None,
7256                })
7257            }
7258            Self::PoolsideLagunaS21Free => {
7259                Some(ModelPricing {
7260                    input_per_million: 0f64,
7261                    output_per_million: 0f64,
7262                    cache_read_per_million: None,
7263                    cache_write_per_million: None,
7264                })
7265            }
7266            Self::PoolsideLagunaXs21 => {
7267                Some(ModelPricing {
7268                    input_per_million: 0.06f64,
7269                    output_per_million: 0.12f64,
7270                    cache_read_per_million: Some(0.03f64),
7271                    cache_write_per_million: None,
7272                })
7273            }
7274            Self::PoolsideLagunaXs21Free => {
7275                Some(ModelPricing {
7276                    input_per_million: 0f64,
7277                    output_per_million: 0f64,
7278                    cache_read_per_million: None,
7279                    cache_write_per_million: None,
7280                })
7281            }
7282            Self::QwenQwen2572bInstruct => {
7283                Some(ModelPricing {
7284                    input_per_million: 0.36f64,
7285                    output_per_million: 0.4f64,
7286                    cache_read_per_million: None,
7287                    cache_write_per_million: None,
7288                })
7289            }
7290            Self::QwenQwen257bInstruct => {
7291                Some(ModelPricing {
7292                    input_per_million: 0.1f64,
7293                    output_per_million: 0.2f64,
7294                    cache_read_per_million: None,
7295                    cache_write_per_million: None,
7296                })
7297            }
7298            Self::QwenQwenPlus => {
7299                Some(ModelPricing {
7300                    input_per_million: 0.26f64,
7301                    output_per_million: 0.78f64,
7302                    cache_read_per_million: Some(0.052f64),
7303                    cache_write_per_million: Some(0.325f64),
7304                })
7305            }
7306            Self::QwenQwenPlus20250728 => {
7307                Some(ModelPricing {
7308                    input_per_million: 0.26f64,
7309                    output_per_million: 0.78f64,
7310                    cache_read_per_million: None,
7311                    cache_write_per_million: None,
7312                })
7313            }
7314            Self::QwenQwenPlus20250728Thinking => {
7315                Some(ModelPricing {
7316                    input_per_million: 0.4f64,
7317                    output_per_million: 1.2f64,
7318                    cache_read_per_million: None,
7319                    cache_write_per_million: Some(0.5f64),
7320                })
7321            }
7322            Self::QwenQwen314b => {
7323                Some(ModelPricing {
7324                    input_per_million: 0.2275f64,
7325                    output_per_million: 0.91f64,
7326                    cache_read_per_million: None,
7327                    cache_write_per_million: None,
7328                })
7329            }
7330            Self::QwenQwen3235bA22b => {
7331                Some(ModelPricing {
7332                    input_per_million: 0.455f64,
7333                    output_per_million: 1.82f64,
7334                    cache_read_per_million: None,
7335                    cache_write_per_million: None,
7336                })
7337            }
7338            Self::QwenQwen3235bA22b2507 => {
7339                Some(ModelPricing {
7340                    input_per_million: 0.09f64,
7341                    output_per_million: 0.55f64,
7342                    cache_read_per_million: None,
7343                    cache_write_per_million: None,
7344                })
7345            }
7346            Self::QwenQwen3235bA22bThinking2507 => {
7347                Some(ModelPricing {
7348                    input_per_million: 0.23f64,
7349                    output_per_million: 2.3f64,
7350                    cache_read_per_million: None,
7351                    cache_write_per_million: None,
7352                })
7353            }
7354            Self::QwenQwen330bA3b => {
7355                Some(ModelPricing {
7356                    input_per_million: 0.12f64,
7357                    output_per_million: 0.5f64,
7358                    cache_read_per_million: None,
7359                    cache_write_per_million: None,
7360                })
7361            }
7362            Self::QwenQwen330bA3bInstruct2507 => {
7363                Some(ModelPricing {
7364                    input_per_million: 0.04815f64,
7365                    output_per_million: 0.19305f64,
7366                    cache_read_per_million: None,
7367                    cache_write_per_million: None,
7368                })
7369            }
7370            Self::QwenQwen330bA3bThinking2507 => {
7371                Some(ModelPricing {
7372                    input_per_million: 0.2f64,
7373                    output_per_million: 2.4f64,
7374                    cache_read_per_million: None,
7375                    cache_write_per_million: None,
7376                })
7377            }
7378            Self::QwenQwen332b => {
7379                Some(ModelPricing {
7380                    input_per_million: 0.08f64,
7381                    output_per_million: 0.28f64,
7382                    cache_read_per_million: None,
7383                    cache_write_per_million: None,
7384                })
7385            }
7386            Self::QwenQwen38b => {
7387                Some(ModelPricing {
7388                    input_per_million: 0.117f64,
7389                    output_per_million: 0.455f64,
7390                    cache_read_per_million: None,
7391                    cache_write_per_million: None,
7392                })
7393            }
7394            Self::QwenQwen3Coder => {
7395                Some(ModelPricing {
7396                    input_per_million: 0.3f64,
7397                    output_per_million: 1f64,
7398                    cache_read_per_million: Some(0.1f64),
7399                    cache_write_per_million: None,
7400                })
7401            }
7402            Self::QwenQwen3Coder30bA3bInstruct => {
7403                Some(ModelPricing {
7404                    input_per_million: 0.07f64,
7405                    output_per_million: 0.28f64,
7406                    cache_read_per_million: None,
7407                    cache_write_per_million: None,
7408                })
7409            }
7410            Self::QwenQwen3CoderFlash => {
7411                Some(ModelPricing {
7412                    input_per_million: 0.195f64,
7413                    output_per_million: 0.975f64,
7414                    cache_read_per_million: Some(0.039f64),
7415                    cache_write_per_million: Some(0.24375f64),
7416                })
7417            }
7418            Self::QwenQwen3CoderNext => {
7419                Some(ModelPricing {
7420                    input_per_million: 0.12f64,
7421                    output_per_million: 0.8f64,
7422                    cache_read_per_million: Some(0.07f64),
7423                    cache_write_per_million: None,
7424                })
7425            }
7426            Self::QwenQwen3CoderPlus => {
7427                Some(ModelPricing {
7428                    input_per_million: 0.65f64,
7429                    output_per_million: 3.25f64,
7430                    cache_read_per_million: Some(0.13f64),
7431                    cache_write_per_million: Some(0.8125f64),
7432                })
7433            }
7434            Self::QwenQwen3Max => {
7435                Some(ModelPricing {
7436                    input_per_million: 0.78f64,
7437                    output_per_million: 3.9f64,
7438                    cache_read_per_million: Some(0.156f64),
7439                    cache_write_per_million: Some(0.975f64),
7440                })
7441            }
7442            Self::QwenQwen3MaxThinking => {
7443                Some(ModelPricing {
7444                    input_per_million: 0.78f64,
7445                    output_per_million: 3.9f64,
7446                    cache_read_per_million: None,
7447                    cache_write_per_million: None,
7448                })
7449            }
7450            Self::QwenQwen3Next80bA3bInstruct => {
7451                Some(ModelPricing {
7452                    input_per_million: 0.1f64,
7453                    output_per_million: 1.1f64,
7454                    cache_read_per_million: Some(0.07f64),
7455                    cache_write_per_million: None,
7456                })
7457            }
7458            Self::QwenQwen3Next80bA3bThinking => {
7459                Some(ModelPricing {
7460                    input_per_million: 0.15f64,
7461                    output_per_million: 1.2f64,
7462                    cache_read_per_million: None,
7463                    cache_write_per_million: None,
7464                })
7465            }
7466            Self::QwenQwen3Vl235bA22bInstruct => {
7467                Some(ModelPricing {
7468                    input_per_million: 0.21f64,
7469                    output_per_million: 1.9f64,
7470                    cache_read_per_million: Some(0.1f64),
7471                    cache_write_per_million: None,
7472                })
7473            }
7474            Self::QwenQwen3Vl235bA22bThinking => {
7475                Some(ModelPricing {
7476                    input_per_million: 0.4f64,
7477                    output_per_million: 4f64,
7478                    cache_read_per_million: None,
7479                    cache_write_per_million: None,
7480                })
7481            }
7482            Self::QwenQwen3Vl30bA3bInstruct => {
7483                Some(ModelPricing {
7484                    input_per_million: 0.13f64,
7485                    output_per_million: 0.52f64,
7486                    cache_read_per_million: None,
7487                    cache_write_per_million: None,
7488                })
7489            }
7490            Self::QwenQwen3Vl30bA3bThinking => {
7491                Some(ModelPricing {
7492                    input_per_million: 0.2f64,
7493                    output_per_million: 2.4f64,
7494                    cache_read_per_million: None,
7495                    cache_write_per_million: None,
7496                })
7497            }
7498            Self::QwenQwen3Vl32bInstruct => {
7499                Some(ModelPricing {
7500                    input_per_million: 0.104f64,
7501                    output_per_million: 0.416f64,
7502                    cache_read_per_million: None,
7503                    cache_write_per_million: None,
7504                })
7505            }
7506            Self::QwenQwen3Vl8bInstruct => {
7507                Some(ModelPricing {
7508                    input_per_million: 0.117f64,
7509                    output_per_million: 0.455f64,
7510                    cache_read_per_million: None,
7511                    cache_write_per_million: None,
7512                })
7513            }
7514            Self::QwenQwen3Vl8bThinking => {
7515                Some(ModelPricing {
7516                    input_per_million: 0.18f64,
7517                    output_per_million: 2.1f64,
7518                    cache_read_per_million: None,
7519                    cache_write_per_million: None,
7520                })
7521            }
7522            Self::QwenQwen35122bA10b => {
7523                Some(ModelPricing {
7524                    input_per_million: 0.26f64,
7525                    output_per_million: 2.08f64,
7526                    cache_read_per_million: None,
7527                    cache_write_per_million: None,
7528                })
7529            }
7530            Self::QwenQwen3527b => {
7531                Some(ModelPricing {
7532                    input_per_million: 0.195f64,
7533                    output_per_million: 1.56f64,
7534                    cache_read_per_million: None,
7535                    cache_write_per_million: None,
7536                })
7537            }
7538            Self::QwenQwen3535bA3b => {
7539                Some(ModelPricing {
7540                    input_per_million: 0.14f64,
7541                    output_per_million: 1f64,
7542                    cache_read_per_million: None,
7543                    cache_write_per_million: None,
7544                })
7545            }
7546            Self::QwenQwen35397bA17b => {
7547                Some(ModelPricing {
7548                    input_per_million: 0.39f64,
7549                    output_per_million: 2.34f64,
7550                    cache_read_per_million: None,
7551                    cache_write_per_million: None,
7552                })
7553            }
7554            Self::QwenQwen359b => {
7555                Some(ModelPricing {
7556                    input_per_million: 0.1f64,
7557                    output_per_million: 0.15f64,
7558                    cache_read_per_million: None,
7559                    cache_write_per_million: None,
7560                })
7561            }
7562            Self::QwenQwen35Flash0223 => {
7563                Some(ModelPricing {
7564                    input_per_million: 0.065f64,
7565                    output_per_million: 0.26f64,
7566                    cache_read_per_million: None,
7567                    cache_write_per_million: None,
7568                })
7569            }
7570            Self::QwenQwen35Plus0215 => {
7571                Some(ModelPricing {
7572                    input_per_million: 0.26f64,
7573                    output_per_million: 1.56f64,
7574                    cache_read_per_million: None,
7575                    cache_write_per_million: None,
7576                })
7577            }
7578            Self::QwenQwen35Plus20260420 => {
7579                Some(ModelPricing {
7580                    input_per_million: 0.3f64,
7581                    output_per_million: 1.8f64,
7582                    cache_read_per_million: None,
7583                    cache_write_per_million: Some(0.375f64),
7584                })
7585            }
7586            Self::QwenQwen3627b => {
7587                Some(ModelPricing {
7588                    input_per_million: 0.3f64,
7589                    output_per_million: 2f64,
7590                    cache_read_per_million: Some(0.15f64),
7591                    cache_write_per_million: None,
7592                })
7593            }
7594            Self::QwenQwen3635bA3b => {
7595                Some(ModelPricing {
7596                    input_per_million: 0.14f64,
7597                    output_per_million: 1f64,
7598                    cache_read_per_million: None,
7599                    cache_write_per_million: None,
7600                })
7601            }
7602            Self::QwenQwen36Flash => {
7603                Some(ModelPricing {
7604                    input_per_million: 0.1875f64,
7605                    output_per_million: 1.125f64,
7606                    cache_read_per_million: None,
7607                    cache_write_per_million: Some(0.234375f64),
7608                })
7609            }
7610            Self::QwenQwen36MaxPreview => {
7611                Some(ModelPricing {
7612                    input_per_million: 1.027f64,
7613                    output_per_million: 6.162f64,
7614                    cache_read_per_million: None,
7615                    cache_write_per_million: Some(1.28375f64),
7616                })
7617            }
7618            Self::QwenQwen36Plus => {
7619                Some(ModelPricing {
7620                    input_per_million: 0.325f64,
7621                    output_per_million: 1.95f64,
7622                    cache_read_per_million: None,
7623                    cache_write_per_million: Some(0.40625f64),
7624                })
7625            }
7626            Self::QwenQwen37Flash => {
7627                Some(ModelPricing {
7628                    input_per_million: 0.03f64,
7629                    output_per_million: 0.13f64,
7630                    cache_read_per_million: Some(0.006f64),
7631                    cache_write_per_million: Some(0.038f64),
7632                })
7633            }
7634            Self::QwenQwen37Max => {
7635                Some(ModelPricing {
7636                    input_per_million: 1.475f64,
7637                    output_per_million: 4.425f64,
7638                    cache_read_per_million: Some(0.295f64),
7639                    cache_write_per_million: Some(1.84375f64),
7640                })
7641            }
7642            Self::QwenQwen37Plus => {
7643                Some(ModelPricing {
7644                    input_per_million: 0.32f64,
7645                    output_per_million: 1.28f64,
7646                    cache_read_per_million: Some(0.064f64),
7647                    cache_write_per_million: Some(0.4f64),
7648                })
7649            }
7650            Self::RekaaiRekaEdge => {
7651                Some(ModelPricing {
7652                    input_per_million: 0.1f64,
7653                    output_per_million: 0.1f64,
7654                    cache_read_per_million: None,
7655                    cache_write_per_million: None,
7656                })
7657            }
7658            Self::RelaceRelaceSearch => {
7659                Some(ModelPricing {
7660                    input_per_million: 1f64,
7661                    output_per_million: 3f64,
7662                    cache_read_per_million: None,
7663                    cache_write_per_million: None,
7664                })
7665            }
7666            Self::SakanaFuguUltra => {
7667                Some(ModelPricing {
7668                    input_per_million: 5f64,
7669                    output_per_million: 30f64,
7670                    cache_read_per_million: Some(0.5f64),
7671                    cache_write_per_million: None,
7672                })
7673            }
7674            Self::Sao10kL31Euryale70b => {
7675                Some(ModelPricing {
7676                    input_per_million: 0.85f64,
7677                    output_per_million: 0.85f64,
7678                    cache_read_per_million: None,
7679                    cache_write_per_million: None,
7680                })
7681            }
7682            Self::StepfunStep35Flash => {
7683                Some(ModelPricing {
7684                    input_per_million: 0.1f64,
7685                    output_per_million: 0.3f64,
7686                    cache_read_per_million: None,
7687                    cache_write_per_million: None,
7688                })
7689            }
7690            Self::StepfunStep37Flash => {
7691                Some(ModelPricing {
7692                    input_per_million: 0.2f64,
7693                    output_per_million: 1.15f64,
7694                    cache_read_per_million: Some(0.04f64),
7695                    cache_write_per_million: None,
7696                })
7697            }
7698            Self::TencentHy3 => {
7699                Some(ModelPricing {
7700                    input_per_million: 0.132f64,
7701                    output_per_million: 0.528f64,
7702                    cache_read_per_million: Some(0.033f64),
7703                    cache_write_per_million: None,
7704                })
7705            }
7706            Self::TencentHy3Preview => {
7707                Some(ModelPricing {
7708                    input_per_million: 0.063f64,
7709                    output_per_million: 0.21f64,
7710                    cache_read_per_million: Some(0.021f64),
7711                    cache_write_per_million: None,
7712                })
7713            }
7714            Self::ThedrummerUnslopnemo12b => {
7715                Some(ModelPricing {
7716                    input_per_million: 0.4f64,
7717                    output_per_million: 0.4f64,
7718                    cache_read_per_million: None,
7719                    cache_write_per_million: None,
7720                })
7721            }
7722            Self::ThinkingmachinesInkling => {
7723                Some(ModelPricing {
7724                    input_per_million: 1f64,
7725                    output_per_million: 4.05f64,
7726                    cache_read_per_million: Some(0.17f64),
7727                    cache_write_per_million: None,
7728                })
7729            }
7730            Self::ThinkingmachinesInklingSmall => {
7731                Some(ModelPricing {
7732                    input_per_million: 0.5f64,
7733                    output_per_million: 1.2f64,
7734                    cache_read_per_million: Some(0.1f64),
7735                    cache_write_per_million: None,
7736                })
7737            }
7738            Self::UpstageSolarPro3 => {
7739                Some(ModelPricing {
7740                    input_per_million: 0.15f64,
7741                    output_per_million: 0.6f64,
7742                    cache_read_per_million: Some(0.015f64),
7743                    cache_write_per_million: None,
7744                })
7745            }
7746            Self::XAiGrok420 => {
7747                Some(ModelPricing {
7748                    input_per_million: 1.25f64,
7749                    output_per_million: 2.5f64,
7750                    cache_read_per_million: Some(0.2f64),
7751                    cache_write_per_million: None,
7752                })
7753            }
7754            Self::XAiGrok43 => {
7755                Some(ModelPricing {
7756                    input_per_million: 1.25f64,
7757                    output_per_million: 2.5f64,
7758                    cache_read_per_million: Some(0.2f64),
7759                    cache_write_per_million: None,
7760                })
7761            }
7762            Self::XAiGrok45 => {
7763                Some(ModelPricing {
7764                    input_per_million: 2f64,
7765                    output_per_million: 6f64,
7766                    cache_read_per_million: Some(0.3f64),
7767                    cache_write_per_million: None,
7768                })
7769            }
7770            Self::XAiGrokBuild01 => {
7771                Some(ModelPricing {
7772                    input_per_million: 1f64,
7773                    output_per_million: 2f64,
7774                    cache_read_per_million: Some(0.2f64),
7775                    cache_write_per_million: None,
7776                })
7777            }
7778            Self::XiaomiMimoV25 => {
7779                Some(ModelPricing {
7780                    input_per_million: 0.14f64,
7781                    output_per_million: 0.28f64,
7782                    cache_read_per_million: Some(0.0028f64),
7783                    cache_write_per_million: None,
7784                })
7785            }
7786            Self::XiaomiMimoV25Pro => {
7787                Some(ModelPricing {
7788                    input_per_million: 0.435f64,
7789                    output_per_million: 0.87f64,
7790                    cache_read_per_million: Some(0.0036f64),
7791                    cache_write_per_million: None,
7792                })
7793            }
7794            Self::ZAiGlm45 => {
7795                Some(ModelPricing {
7796                    input_per_million: 0.6f64,
7797                    output_per_million: 2.2f64,
7798                    cache_read_per_million: Some(0.11f64),
7799                    cache_write_per_million: None,
7800                })
7801            }
7802            Self::ZAiGlm45Air => {
7803                Some(ModelPricing {
7804                    input_per_million: 0.13f64,
7805                    output_per_million: 0.85f64,
7806                    cache_read_per_million: Some(0.025f64),
7807                    cache_write_per_million: None,
7808                })
7809            }
7810            Self::ZAiGlm45v => {
7811                Some(ModelPricing {
7812                    input_per_million: 0.6f64,
7813                    output_per_million: 1.8f64,
7814                    cache_read_per_million: Some(0.11f64),
7815                    cache_write_per_million: None,
7816                })
7817            }
7818            Self::ZAiGlm46 => {
7819                Some(ModelPricing {
7820                    input_per_million: 0.5f64,
7821                    output_per_million: 2f64,
7822                    cache_read_per_million: Some(0.1f64),
7823                    cache_write_per_million: None,
7824                })
7825            }
7826            Self::ZAiGlm46v => {
7827                Some(ModelPricing {
7828                    input_per_million: 0.3f64,
7829                    output_per_million: 0.9f64,
7830                    cache_read_per_million: Some(0.055f64),
7831                    cache_write_per_million: None,
7832                })
7833            }
7834            Self::ZAiGlm47 => {
7835                Some(ModelPricing {
7836                    input_per_million: 0.4f64,
7837                    output_per_million: 1.75f64,
7838                    cache_read_per_million: Some(0.08f64),
7839                    cache_write_per_million: None,
7840                })
7841            }
7842            Self::ZAiGlm47Flash => {
7843                Some(ModelPricing {
7844                    input_per_million: 0.06f64,
7845                    output_per_million: 0.4f64,
7846                    cache_read_per_million: Some(0.01f64),
7847                    cache_write_per_million: None,
7848                })
7849            }
7850            Self::ZAiGlm5 => {
7851                Some(ModelPricing {
7852                    input_per_million: 0.95f64,
7853                    output_per_million: 2.55f64,
7854                    cache_read_per_million: Some(0.2f64),
7855                    cache_write_per_million: None,
7856                })
7857            }
7858            Self::ZAiGlm5Turbo => {
7859                Some(ModelPricing {
7860                    input_per_million: 1.2f64,
7861                    output_per_million: 4f64,
7862                    cache_read_per_million: Some(0.24f64),
7863                    cache_write_per_million: None,
7864                })
7865            }
7866            Self::ZAiGlm51 => {
7867                Some(ModelPricing {
7868                    input_per_million: 0.966f64,
7869                    output_per_million: 3.036f64,
7870                    cache_read_per_million: Some(0.1794f64),
7871                    cache_write_per_million: None,
7872                })
7873            }
7874            Self::ZAiGlm52 => {
7875                Some(ModelPricing {
7876                    input_per_million: 0.2842f64,
7877                    output_per_million: 0.8932f64,
7878                    cache_read_per_million: Some(0.05278f64),
7879                    cache_write_per_million: None,
7880                })
7881            }
7882            Self::ZAiGlm5vTurbo => {
7883                Some(ModelPricing {
7884                    input_per_million: 1.2f64,
7885                    output_per_million: 4f64,
7886                    cache_read_per_million: Some(0.24f64),
7887                    cache_write_per_million: None,
7888                })
7889            }
7890        }
7891    }
7892    #[allow(clippy::too_many_lines)]
7893    pub fn supports_image(self) -> bool {
7894        match self {
7895            Self::Ai21JambaLarge17
7896            | Self::AionLabsAion20
7897            | Self::AionLabsAion30
7898            | Self::AionLabsAion30Mini
7899            | Self::AmazonNovaMicroV1
7900            | Self::ArceeAiTrinityLargeThinking
7901            | Self::ArceeAiVirtuosoLarge
7902            | Self::CohereCommandR082024
7903            | Self::CohereCommandRPlus082024
7904            | Self::CohereNorthMiniCodeFree
7905            | Self::DeepseekDeepseekChat
7906            | Self::DeepseekDeepseekChatV30324
7907            | Self::DeepseekDeepseekChatV31
7908            | Self::DeepseekDeepseekR1
7909            | Self::DeepseekDeepseekR10528
7910            | Self::DeepseekDeepseekV31Terminus
7911            | Self::DeepseekDeepseekV32
7912            | Self::DeepseekDeepseekV32Exp
7913            | Self::DeepseekDeepseekV4Flash
7914            | Self::DeepseekDeepseekV4Flash0731
7915            | Self::DeepseekDeepseekV4Pro
7916            | Self::IbmGraniteGranite418b
7917            | Self::InceptionMercury2
7918            | Self::InclusionaiLing261t
7919            | Self::InclusionaiLing26Flash
7920            | Self::InclusionaiLing30FlashFree
7921            | Self::InclusionaiRing261t
7922            | Self::KwaipilotKatCoderAirV25
7923            | Self::KwaipilotKatCoderProV2
7924            | Self::KwaipilotKatCoderProV25
7925            | Self::MeituanLongcat20
7926            | Self::MetaLlamaLlama3170bInstruct
7927            | Self::MetaLlamaLlama318bInstruct
7928            | Self::MetaLlamaLlama3370bInstruct
7929            | Self::MinimaxMinimaxM1
7930            | Self::MinimaxMinimaxM2
7931            | Self::MinimaxMinimaxM21
7932            | Self::MinimaxMinimaxM25
7933            | Self::MinimaxMinimaxM27
7934            | Self::MistralaiCodestral2508
7935            | Self::MistralaiMistralLarge
7936            | Self::MistralaiMistralLarge2407
7937            | Self::MistralaiMistralNemo
7938            | Self::MistralaiMistralSaba
7939            | Self::MistralaiMixtral8x22bInstruct
7940            | Self::MistralaiVoxtralSmall24b2507
7941            | Self::MoonshotaiKimiK2
7942            | Self::MoonshotaiKimiK20905
7943            | Self::MoonshotaiKimiK2Thinking
7944            | Self::NvidiaNemotron3Nano30bA3b
7945            | Self::NvidiaNemotron3Nano30bA3bFree
7946            | Self::NvidiaNemotron3Super120bA12b
7947            | Self::NvidiaNemotron3Super120bA12bFree
7948            | Self::NvidiaNemotron3Ultra550bA55b
7949            | Self::NvidiaNemotron3Ultra550bA55bFree
7950            | Self::NvidiaNemotronNano9bV2Free
7951            | Self::OpenaiGpt35Turbo
7952            | Self::OpenaiGpt35Turbo0613
7953            | Self::OpenaiGpt35Turbo16k
7954            | Self::OpenaiGpt4
7955            | Self::OpenaiGpt4TurboPreview
7956            | Self::OpenaiGptAudio
7957            | Self::OpenaiGptAudioMini
7958            | Self::OpenaiGptOss120b
7959            | Self::OpenaiGptOss20b
7960            | Self::OpenaiGptOss20bFree
7961            | Self::OpenaiGptOssSafeguard20b
7962            | Self::OpenaiO3Mini
7963            | Self::OpenaiO3MiniHigh
7964            | Self::PoolsideLagunaS21
7965            | Self::PoolsideLagunaS21Free
7966            | Self::PoolsideLagunaXs21
7967            | Self::PoolsideLagunaXs21Free
7968            | Self::QwenQwen2572bInstruct
7969            | Self::QwenQwen257bInstruct
7970            | Self::QwenQwenPlus
7971            | Self::QwenQwenPlus20250728
7972            | Self::QwenQwenPlus20250728Thinking
7973            | Self::QwenQwen314b
7974            | Self::QwenQwen3235bA22b
7975            | Self::QwenQwen3235bA22b2507
7976            | Self::QwenQwen3235bA22bThinking2507
7977            | Self::QwenQwen330bA3b
7978            | Self::QwenQwen330bA3bInstruct2507
7979            | Self::QwenQwen330bA3bThinking2507
7980            | Self::QwenQwen332b
7981            | Self::QwenQwen38b
7982            | Self::QwenQwen3Coder
7983            | Self::QwenQwen3Coder30bA3bInstruct
7984            | Self::QwenQwen3CoderFlash
7985            | Self::QwenQwen3CoderNext
7986            | Self::QwenQwen3CoderPlus
7987            | Self::QwenQwen3Max
7988            | Self::QwenQwen3MaxThinking
7989            | Self::QwenQwen3Next80bA3bInstruct
7990            | Self::QwenQwen3Next80bA3bThinking
7991            | Self::QwenQwen36MaxPreview
7992            | Self::QwenQwen37Max
7993            | Self::RelaceRelaceSearch
7994            | Self::Sao10kL31Euryale70b
7995            | Self::StepfunStep35Flash
7996            | Self::TencentHy3
7997            | Self::TencentHy3Preview
7998            | Self::ThedrummerUnslopnemo12b
7999            | Self::UpstageSolarPro3
8000            | Self::XiaomiMimoV25Pro
8001            | Self::ZAiGlm45
8002            | Self::ZAiGlm45Air
8003            | Self::ZAiGlm46
8004            | Self::ZAiGlm47
8005            | Self::ZAiGlm47Flash
8006            | Self::ZAiGlm5
8007            | Self::ZAiGlm5Turbo
8008            | Self::ZAiGlm51
8009            | Self::ZAiGlm52 => false,
8010            Self::AmazonNova2LiteV1
8011            | Self::AmazonNovaLiteV1
8012            | Self::AmazonNovaPremierV1
8013            | Self::AmazonNovaProV1
8014            | Self::AnthropicClaude3Haiku
8015            | Self::AnthropicClaudeFable5
8016            | Self::AnthropicClaudeHaiku45
8017            | Self::AnthropicClaudeOpus4
8018            | Self::AnthropicClaudeOpus41
8019            | Self::AnthropicClaudeOpus45
8020            | Self::AnthropicClaudeOpus46
8021            | Self::AnthropicClaudeOpus47
8022            | Self::AnthropicClaudeOpus47Fast
8023            | Self::AnthropicClaudeOpus48
8024            | Self::AnthropicClaudeOpus48Fast
8025            | Self::AnthropicClaudeOpus5
8026            | Self::AnthropicClaudeOpus5Fast
8027            | Self::AnthropicClaudeSonnet4
8028            | Self::AnthropicClaudeSonnet45
8029            | Self::AnthropicClaudeSonnet46
8030            | Self::AnthropicClaudeSonnet5
8031            | Self::BytedanceSeedSeed16
8032            | Self::BytedanceSeedSeed16Flash
8033            | Self::BytedanceSeedSeed20Lite
8034            | Self::BytedanceSeedSeed20Mini
8035            | Self::GoogleGemini25Flash
8036            | Self::GoogleGemini25FlashLite
8037            | Self::GoogleGemini25Pro
8038            | Self::GoogleGemini25ProPreview
8039            | Self::GoogleGemini25ProPreview0506
8040            | Self::GoogleGemini3FlashPreview
8041            | Self::GoogleGemini3ProImage
8042            | Self::GoogleGemini31FlashLite
8043            | Self::GoogleGemini31FlashLitePreview
8044            | Self::GoogleGemini31ProPreview
8045            | Self::GoogleGemini31ProPreviewCustomtools
8046            | Self::GoogleGemini35Flash
8047            | Self::GoogleGemini35FlashLite
8048            | Self::GoogleGemini36Flash
8049            | Self::GoogleGemma312bIt
8050            | Self::GoogleGemma327bIt
8051            | Self::GoogleGemma426bA4bIt
8052            | Self::GoogleGemma426bA4bItFree
8053            | Self::GoogleGemma431bIt
8054            | Self::GoogleGemma431bItFree
8055            | Self::MetaLlamaLlama4Maverick
8056            | Self::MetaLlamaLlama4Scout
8057            | Self::MetaMuseSpark11
8058            | Self::MinimaxMinimaxM3
8059            | Self::MistralaiMinistral14b2512
8060            | Self::MistralaiMinistral3b2512
8061            | Self::MistralaiMinistral8b2512
8062            | Self::MistralaiMistralLarge2512
8063            | Self::MistralaiMistralMedium3
8064            | Self::MistralaiMistralMedium35
8065            | Self::MistralaiMistralMedium31
8066            | Self::MistralaiMistralSmall2603
8067            | Self::MistralaiMistralSmall3224bInstruct
8068            | Self::MoonshotaiKimiK25
8069            | Self::MoonshotaiKimiK26
8070            | Self::MoonshotaiKimiK27Code
8071            | Self::MoonshotaiKimiK3
8072            | Self::NexAgiNexN2Mini
8073            | Self::NexAgiNexN2Pro
8074            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
8075            | Self::NvidiaNemotronNano12bV2VlFree
8076            | Self::OpenaiGpt4Turbo
8077            | Self::OpenaiGpt41
8078            | Self::OpenaiGpt41Mini
8079            | Self::OpenaiGpt41Nano
8080            | Self::OpenaiGpt4o
8081            | Self::OpenaiGpt4o20240513
8082            | Self::OpenaiGpt4o20240806
8083            | Self::OpenaiGpt4o20241120
8084            | Self::OpenaiGpt4oMini
8085            | Self::OpenaiGpt4oMini20240718
8086            | Self::OpenaiGpt5
8087            | Self::OpenaiGpt5Mini
8088            | Self::OpenaiGpt5Nano
8089            | Self::OpenaiGpt5Pro
8090            | Self::OpenaiGpt51
8091            | Self::OpenaiGpt51Codex
8092            | Self::OpenaiGpt51CodexMax
8093            | Self::OpenaiGpt51CodexMini
8094            | Self::OpenaiGpt52
8095            | Self::OpenaiGpt52Chat
8096            | Self::OpenaiGpt52Codex
8097            | Self::OpenaiGpt52Pro
8098            | Self::OpenaiGpt53Chat
8099            | Self::OpenaiGpt53Codex
8100            | Self::OpenaiGpt54
8101            | Self::OpenaiGpt54Mini
8102            | Self::OpenaiGpt54Nano
8103            | Self::OpenaiGpt54Pro
8104            | Self::OpenaiGpt55
8105            | Self::OpenaiGpt55Pro
8106            | Self::OpenaiGpt56Luna
8107            | Self::OpenaiGpt56LunaPro
8108            | Self::OpenaiGpt56Sol
8109            | Self::OpenaiGpt56SolPro
8110            | Self::OpenaiGpt56Terra
8111            | Self::OpenaiGpt56TerraPro
8112            | Self::OpenaiO1
8113            | Self::OpenaiO3
8114            | Self::OpenaiO3Pro
8115            | Self::OpenaiO4Mini
8116            | Self::OpenaiO4MiniHigh
8117            | Self::OpenrouterAuto
8118            | Self::OpenrouterFree
8119            | Self::QwenQwen3Vl235bA22bInstruct
8120            | Self::QwenQwen3Vl235bA22bThinking
8121            | Self::QwenQwen3Vl30bA3bInstruct
8122            | Self::QwenQwen3Vl30bA3bThinking
8123            | Self::QwenQwen3Vl32bInstruct
8124            | Self::QwenQwen3Vl8bInstruct
8125            | Self::QwenQwen3Vl8bThinking
8126            | Self::QwenQwen35122bA10b
8127            | Self::QwenQwen3527b
8128            | Self::QwenQwen3535bA3b
8129            | Self::QwenQwen35397bA17b
8130            | Self::QwenQwen359b
8131            | Self::QwenQwen35Flash0223
8132            | Self::QwenQwen35Plus0215
8133            | Self::QwenQwen35Plus20260420
8134            | Self::QwenQwen3627b
8135            | Self::QwenQwen3635bA3b
8136            | Self::QwenQwen36Flash
8137            | Self::QwenQwen36Plus
8138            | Self::QwenQwen37Flash
8139            | Self::QwenQwen37Plus
8140            | Self::RekaaiRekaEdge
8141            | Self::SakanaFuguUltra
8142            | Self::StepfunStep37Flash
8143            | Self::ThinkingmachinesInkling
8144            | Self::ThinkingmachinesInklingSmall
8145            | Self::XAiGrok420
8146            | Self::XAiGrok43
8147            | Self::XAiGrok45
8148            | Self::XAiGrokBuild01
8149            | Self::XiaomiMimoV25
8150            | Self::ZAiGlm45v
8151            | Self::ZAiGlm46v
8152            | Self::ZAiGlm5vTurbo => true,
8153        }
8154    }
8155    #[allow(clippy::too_many_lines)]
8156    pub fn supports_audio(self) -> bool {
8157        match self {
8158            Self::Ai21JambaLarge17
8159            | Self::AionLabsAion20
8160            | Self::AionLabsAion30
8161            | Self::AionLabsAion30Mini
8162            | Self::AmazonNova2LiteV1
8163            | Self::AmazonNovaLiteV1
8164            | Self::AmazonNovaMicroV1
8165            | Self::AmazonNovaPremierV1
8166            | Self::AmazonNovaProV1
8167            | Self::AnthropicClaude3Haiku
8168            | Self::AnthropicClaudeFable5
8169            | Self::AnthropicClaudeHaiku45
8170            | Self::AnthropicClaudeOpus4
8171            | Self::AnthropicClaudeOpus41
8172            | Self::AnthropicClaudeOpus45
8173            | Self::AnthropicClaudeOpus46
8174            | Self::AnthropicClaudeOpus47
8175            | Self::AnthropicClaudeOpus47Fast
8176            | Self::AnthropicClaudeOpus48
8177            | Self::AnthropicClaudeOpus48Fast
8178            | Self::AnthropicClaudeOpus5
8179            | Self::AnthropicClaudeOpus5Fast
8180            | Self::AnthropicClaudeSonnet4
8181            | Self::AnthropicClaudeSonnet45
8182            | Self::AnthropicClaudeSonnet46
8183            | Self::AnthropicClaudeSonnet5
8184            | Self::ArceeAiTrinityLargeThinking
8185            | Self::ArceeAiVirtuosoLarge
8186            | Self::BytedanceSeedSeed16
8187            | Self::BytedanceSeedSeed16Flash
8188            | Self::BytedanceSeedSeed20Lite
8189            | Self::BytedanceSeedSeed20Mini
8190            | Self::CohereCommandR082024
8191            | Self::CohereCommandRPlus082024
8192            | Self::CohereNorthMiniCodeFree
8193            | Self::DeepseekDeepseekChat
8194            | Self::DeepseekDeepseekChatV30324
8195            | Self::DeepseekDeepseekChatV31
8196            | Self::DeepseekDeepseekR1
8197            | Self::DeepseekDeepseekR10528
8198            | Self::DeepseekDeepseekV31Terminus
8199            | Self::DeepseekDeepseekV32
8200            | Self::DeepseekDeepseekV32Exp
8201            | Self::DeepseekDeepseekV4Flash
8202            | Self::DeepseekDeepseekV4Flash0731
8203            | Self::DeepseekDeepseekV4Pro
8204            | Self::GoogleGemini3ProImage
8205            | Self::GoogleGemma312bIt
8206            | Self::GoogleGemma327bIt
8207            | Self::GoogleGemma426bA4bIt
8208            | Self::GoogleGemma426bA4bItFree
8209            | Self::GoogleGemma431bIt
8210            | Self::GoogleGemma431bItFree
8211            | Self::IbmGraniteGranite418b
8212            | Self::InceptionMercury2
8213            | Self::InclusionaiLing261t
8214            | Self::InclusionaiLing26Flash
8215            | Self::InclusionaiLing30FlashFree
8216            | Self::InclusionaiRing261t
8217            | Self::KwaipilotKatCoderAirV25
8218            | Self::KwaipilotKatCoderProV2
8219            | Self::KwaipilotKatCoderProV25
8220            | Self::MeituanLongcat20
8221            | Self::MetaLlamaLlama3170bInstruct
8222            | Self::MetaLlamaLlama318bInstruct
8223            | Self::MetaLlamaLlama3370bInstruct
8224            | Self::MetaLlamaLlama4Maverick
8225            | Self::MetaLlamaLlama4Scout
8226            | Self::MinimaxMinimaxM1
8227            | Self::MinimaxMinimaxM2
8228            | Self::MinimaxMinimaxM21
8229            | Self::MinimaxMinimaxM25
8230            | Self::MinimaxMinimaxM27
8231            | Self::MinimaxMinimaxM3
8232            | Self::MistralaiCodestral2508
8233            | Self::MistralaiMinistral14b2512
8234            | Self::MistralaiMinistral3b2512
8235            | Self::MistralaiMinistral8b2512
8236            | Self::MistralaiMistralLarge
8237            | Self::MistralaiMistralLarge2407
8238            | Self::MistralaiMistralLarge2512
8239            | Self::MistralaiMistralMedium3
8240            | Self::MistralaiMistralMedium35
8241            | Self::MistralaiMistralMedium31
8242            | Self::MistralaiMistralNemo
8243            | Self::MistralaiMistralSaba
8244            | Self::MistralaiMistralSmall2603
8245            | Self::MistralaiMistralSmall3224bInstruct
8246            | Self::MistralaiMixtral8x22bInstruct
8247            | Self::MoonshotaiKimiK2
8248            | Self::MoonshotaiKimiK20905
8249            | Self::MoonshotaiKimiK2Thinking
8250            | Self::MoonshotaiKimiK25
8251            | Self::MoonshotaiKimiK26
8252            | Self::MoonshotaiKimiK27Code
8253            | Self::MoonshotaiKimiK3
8254            | Self::NexAgiNexN2Mini
8255            | Self::NexAgiNexN2Pro
8256            | Self::NvidiaNemotron3Nano30bA3b
8257            | Self::NvidiaNemotron3Nano30bA3bFree
8258            | Self::NvidiaNemotron3Super120bA12b
8259            | Self::NvidiaNemotron3Super120bA12bFree
8260            | Self::NvidiaNemotron3Ultra550bA55b
8261            | Self::NvidiaNemotron3Ultra550bA55bFree
8262            | Self::NvidiaNemotronNano12bV2VlFree
8263            | Self::NvidiaNemotronNano9bV2Free
8264            | Self::OpenaiGpt35Turbo
8265            | Self::OpenaiGpt35Turbo0613
8266            | Self::OpenaiGpt35Turbo16k
8267            | Self::OpenaiGpt4
8268            | Self::OpenaiGpt4Turbo
8269            | Self::OpenaiGpt4TurboPreview
8270            | Self::OpenaiGpt41
8271            | Self::OpenaiGpt41Mini
8272            | Self::OpenaiGpt41Nano
8273            | Self::OpenaiGpt4o
8274            | Self::OpenaiGpt4o20240513
8275            | Self::OpenaiGpt4o20240806
8276            | Self::OpenaiGpt4o20241120
8277            | Self::OpenaiGpt4oMini
8278            | Self::OpenaiGpt4oMini20240718
8279            | Self::OpenaiGpt5
8280            | Self::OpenaiGpt5Mini
8281            | Self::OpenaiGpt5Nano
8282            | Self::OpenaiGpt5Pro
8283            | Self::OpenaiGpt51
8284            | Self::OpenaiGpt51Codex
8285            | Self::OpenaiGpt51CodexMax
8286            | Self::OpenaiGpt51CodexMini
8287            | Self::OpenaiGpt52
8288            | Self::OpenaiGpt52Chat
8289            | Self::OpenaiGpt52Codex
8290            | Self::OpenaiGpt52Pro
8291            | Self::OpenaiGpt53Chat
8292            | Self::OpenaiGpt53Codex
8293            | Self::OpenaiGpt54
8294            | Self::OpenaiGpt54Mini
8295            | Self::OpenaiGpt54Nano
8296            | Self::OpenaiGpt54Pro
8297            | Self::OpenaiGpt55
8298            | Self::OpenaiGpt55Pro
8299            | Self::OpenaiGpt56Luna
8300            | Self::OpenaiGpt56LunaPro
8301            | Self::OpenaiGpt56Sol
8302            | Self::OpenaiGpt56SolPro
8303            | Self::OpenaiGpt56Terra
8304            | Self::OpenaiGpt56TerraPro
8305            | Self::OpenaiGptOss120b
8306            | Self::OpenaiGptOss20b
8307            | Self::OpenaiGptOss20bFree
8308            | Self::OpenaiGptOssSafeguard20b
8309            | Self::OpenaiO1
8310            | Self::OpenaiO3
8311            | Self::OpenaiO3Mini
8312            | Self::OpenaiO3MiniHigh
8313            | Self::OpenaiO3Pro
8314            | Self::OpenaiO4Mini
8315            | Self::OpenaiO4MiniHigh
8316            | Self::OpenrouterFree
8317            | Self::PoolsideLagunaS21
8318            | Self::PoolsideLagunaS21Free
8319            | Self::PoolsideLagunaXs21
8320            | Self::PoolsideLagunaXs21Free
8321            | Self::QwenQwen2572bInstruct
8322            | Self::QwenQwen257bInstruct
8323            | Self::QwenQwenPlus
8324            | Self::QwenQwenPlus20250728
8325            | Self::QwenQwenPlus20250728Thinking
8326            | Self::QwenQwen314b
8327            | Self::QwenQwen3235bA22b
8328            | Self::QwenQwen3235bA22b2507
8329            | Self::QwenQwen3235bA22bThinking2507
8330            | Self::QwenQwen330bA3b
8331            | Self::QwenQwen330bA3bInstruct2507
8332            | Self::QwenQwen330bA3bThinking2507
8333            | Self::QwenQwen332b
8334            | Self::QwenQwen38b
8335            | Self::QwenQwen3Coder
8336            | Self::QwenQwen3Coder30bA3bInstruct
8337            | Self::QwenQwen3CoderFlash
8338            | Self::QwenQwen3CoderNext
8339            | Self::QwenQwen3CoderPlus
8340            | Self::QwenQwen3Max
8341            | Self::QwenQwen3MaxThinking
8342            | Self::QwenQwen3Next80bA3bInstruct
8343            | Self::QwenQwen3Next80bA3bThinking
8344            | Self::QwenQwen3Vl235bA22bInstruct
8345            | Self::QwenQwen3Vl235bA22bThinking
8346            | Self::QwenQwen3Vl30bA3bInstruct
8347            | Self::QwenQwen3Vl30bA3bThinking
8348            | Self::QwenQwen3Vl32bInstruct
8349            | Self::QwenQwen3Vl8bInstruct
8350            | Self::QwenQwen3Vl8bThinking
8351            | Self::QwenQwen35122bA10b
8352            | Self::QwenQwen3527b
8353            | Self::QwenQwen3535bA3b
8354            | Self::QwenQwen35397bA17b
8355            | Self::QwenQwen359b
8356            | Self::QwenQwen35Flash0223
8357            | Self::QwenQwen35Plus0215
8358            | Self::QwenQwen35Plus20260420
8359            | Self::QwenQwen3627b
8360            | Self::QwenQwen3635bA3b
8361            | Self::QwenQwen36Flash
8362            | Self::QwenQwen36MaxPreview
8363            | Self::QwenQwen36Plus
8364            | Self::QwenQwen37Flash
8365            | Self::QwenQwen37Max
8366            | Self::QwenQwen37Plus
8367            | Self::RekaaiRekaEdge
8368            | Self::RelaceRelaceSearch
8369            | Self::SakanaFuguUltra
8370            | Self::Sao10kL31Euryale70b
8371            | Self::StepfunStep35Flash
8372            | Self::StepfunStep37Flash
8373            | Self::TencentHy3
8374            | Self::TencentHy3Preview
8375            | Self::ThedrummerUnslopnemo12b
8376            | Self::UpstageSolarPro3
8377            | Self::XAiGrok420
8378            | Self::XAiGrok43
8379            | Self::XAiGrok45
8380            | Self::XAiGrokBuild01
8381            | Self::XiaomiMimoV25Pro
8382            | Self::ZAiGlm45
8383            | Self::ZAiGlm45Air
8384            | Self::ZAiGlm45v
8385            | Self::ZAiGlm46
8386            | Self::ZAiGlm46v
8387            | Self::ZAiGlm47
8388            | Self::ZAiGlm47Flash
8389            | Self::ZAiGlm5
8390            | Self::ZAiGlm5Turbo
8391            | Self::ZAiGlm51
8392            | Self::ZAiGlm52
8393            | Self::ZAiGlm5vTurbo => false,
8394            Self::GoogleGemini25Flash
8395            | Self::GoogleGemini25FlashLite
8396            | Self::GoogleGemini25Pro
8397            | Self::GoogleGemini25ProPreview
8398            | Self::GoogleGemini25ProPreview0506
8399            | Self::GoogleGemini3FlashPreview
8400            | Self::GoogleGemini31FlashLite
8401            | Self::GoogleGemini31FlashLitePreview
8402            | Self::GoogleGemini31ProPreview
8403            | Self::GoogleGemini31ProPreviewCustomtools
8404            | Self::GoogleGemini35Flash
8405            | Self::GoogleGemini35FlashLite
8406            | Self::GoogleGemini36Flash
8407            | Self::MetaMuseSpark11
8408            | Self::MistralaiVoxtralSmall24b2507
8409            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
8410            | Self::OpenaiGptAudio
8411            | Self::OpenaiGptAudioMini
8412            | Self::OpenrouterAuto
8413            | Self::ThinkingmachinesInkling
8414            | Self::ThinkingmachinesInklingSmall
8415            | Self::XiaomiMimoV25 => true,
8416        }
8417    }
8418    #[allow(clippy::too_many_lines)]
8419    pub fn transport(self) -> Option<ModelTransport> {
8420        match self {
8421            Self::Ai21JambaLarge17
8422            | Self::AionLabsAion20
8423            | Self::AionLabsAion30
8424            | Self::AionLabsAion30Mini
8425            | Self::AmazonNova2LiteV1
8426            | Self::AmazonNovaLiteV1
8427            | Self::AmazonNovaMicroV1
8428            | Self::AmazonNovaPremierV1
8429            | Self::AmazonNovaProV1
8430            | Self::AnthropicClaude3Haiku
8431            | Self::AnthropicClaudeFable5
8432            | Self::AnthropicClaudeHaiku45
8433            | Self::AnthropicClaudeOpus4
8434            | Self::AnthropicClaudeOpus41
8435            | Self::AnthropicClaudeOpus45
8436            | Self::AnthropicClaudeOpus46
8437            | Self::AnthropicClaudeOpus47
8438            | Self::AnthropicClaudeOpus47Fast
8439            | Self::AnthropicClaudeOpus48
8440            | Self::AnthropicClaudeOpus48Fast
8441            | Self::AnthropicClaudeOpus5
8442            | Self::AnthropicClaudeOpus5Fast
8443            | Self::AnthropicClaudeSonnet4
8444            | Self::AnthropicClaudeSonnet45
8445            | Self::AnthropicClaudeSonnet46
8446            | Self::AnthropicClaudeSonnet5
8447            | Self::ArceeAiTrinityLargeThinking
8448            | Self::ArceeAiVirtuosoLarge
8449            | Self::BytedanceSeedSeed16
8450            | Self::BytedanceSeedSeed16Flash
8451            | Self::BytedanceSeedSeed20Lite
8452            | Self::BytedanceSeedSeed20Mini
8453            | Self::CohereCommandR082024
8454            | Self::CohereCommandRPlus082024
8455            | Self::CohereNorthMiniCodeFree
8456            | Self::DeepseekDeepseekChat
8457            | Self::DeepseekDeepseekChatV30324
8458            | Self::DeepseekDeepseekChatV31
8459            | Self::DeepseekDeepseekR1
8460            | Self::DeepseekDeepseekR10528
8461            | Self::DeepseekDeepseekV31Terminus
8462            | Self::DeepseekDeepseekV32
8463            | Self::DeepseekDeepseekV32Exp
8464            | Self::DeepseekDeepseekV4Flash
8465            | Self::DeepseekDeepseekV4Flash0731
8466            | Self::DeepseekDeepseekV4Pro
8467            | Self::GoogleGemini25Flash
8468            | Self::GoogleGemini25FlashLite
8469            | Self::GoogleGemini25Pro
8470            | Self::GoogleGemini25ProPreview
8471            | Self::GoogleGemini25ProPreview0506
8472            | Self::GoogleGemini3FlashPreview
8473            | Self::GoogleGemini3ProImage
8474            | Self::GoogleGemini31FlashLite
8475            | Self::GoogleGemini31FlashLitePreview
8476            | Self::GoogleGemini31ProPreview
8477            | Self::GoogleGemini31ProPreviewCustomtools
8478            | Self::GoogleGemini35Flash
8479            | Self::GoogleGemini35FlashLite
8480            | Self::GoogleGemini36Flash
8481            | Self::GoogleGemma312bIt
8482            | Self::GoogleGemma327bIt
8483            | Self::GoogleGemma426bA4bIt
8484            | Self::GoogleGemma426bA4bItFree
8485            | Self::GoogleGemma431bIt
8486            | Self::GoogleGemma431bItFree
8487            | Self::IbmGraniteGranite418b
8488            | Self::InceptionMercury2
8489            | Self::InclusionaiLing261t
8490            | Self::InclusionaiLing26Flash
8491            | Self::InclusionaiLing30FlashFree
8492            | Self::InclusionaiRing261t
8493            | Self::KwaipilotKatCoderAirV25
8494            | Self::KwaipilotKatCoderProV2
8495            | Self::KwaipilotKatCoderProV25
8496            | Self::MeituanLongcat20
8497            | Self::MetaLlamaLlama3170bInstruct
8498            | Self::MetaLlamaLlama318bInstruct
8499            | Self::MetaLlamaLlama3370bInstruct
8500            | Self::MetaLlamaLlama4Maverick
8501            | Self::MetaLlamaLlama4Scout
8502            | Self::MetaMuseSpark11
8503            | Self::MinimaxMinimaxM1
8504            | Self::MinimaxMinimaxM2
8505            | Self::MinimaxMinimaxM21
8506            | Self::MinimaxMinimaxM25
8507            | Self::MinimaxMinimaxM27
8508            | Self::MinimaxMinimaxM3
8509            | Self::MistralaiCodestral2508
8510            | Self::MistralaiMinistral14b2512
8511            | Self::MistralaiMinistral3b2512
8512            | Self::MistralaiMinistral8b2512
8513            | Self::MistralaiMistralLarge
8514            | Self::MistralaiMistralLarge2407
8515            | Self::MistralaiMistralLarge2512
8516            | Self::MistralaiMistralMedium3
8517            | Self::MistralaiMistralMedium35
8518            | Self::MistralaiMistralMedium31
8519            | Self::MistralaiMistralNemo
8520            | Self::MistralaiMistralSaba
8521            | Self::MistralaiMistralSmall2603
8522            | Self::MistralaiMistralSmall3224bInstruct
8523            | Self::MistralaiMixtral8x22bInstruct
8524            | Self::MistralaiVoxtralSmall24b2507
8525            | Self::MoonshotaiKimiK2
8526            | Self::MoonshotaiKimiK20905
8527            | Self::MoonshotaiKimiK2Thinking
8528            | Self::MoonshotaiKimiK25
8529            | Self::MoonshotaiKimiK26
8530            | Self::MoonshotaiKimiK27Code
8531            | Self::MoonshotaiKimiK3
8532            | Self::NexAgiNexN2Mini
8533            | Self::NexAgiNexN2Pro
8534            | Self::NvidiaNemotron3Nano30bA3b
8535            | Self::NvidiaNemotron3Nano30bA3bFree
8536            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
8537            | Self::NvidiaNemotron3Super120bA12b
8538            | Self::NvidiaNemotron3Super120bA12bFree
8539            | Self::NvidiaNemotron3Ultra550bA55b
8540            | Self::NvidiaNemotron3Ultra550bA55bFree
8541            | Self::NvidiaNemotronNano12bV2VlFree
8542            | Self::NvidiaNemotronNano9bV2Free
8543            | Self::OpenaiGpt35Turbo
8544            | Self::OpenaiGpt35Turbo0613
8545            | Self::OpenaiGpt35Turbo16k
8546            | Self::OpenaiGpt4
8547            | Self::OpenaiGpt4Turbo
8548            | Self::OpenaiGpt4TurboPreview
8549            | Self::OpenaiGpt41
8550            | Self::OpenaiGpt41Mini
8551            | Self::OpenaiGpt41Nano
8552            | Self::OpenaiGpt4o
8553            | Self::OpenaiGpt4o20240513
8554            | Self::OpenaiGpt4o20240806
8555            | Self::OpenaiGpt4o20241120
8556            | Self::OpenaiGpt4oMini
8557            | Self::OpenaiGpt4oMini20240718
8558            | Self::OpenaiGpt5
8559            | Self::OpenaiGpt5Mini
8560            | Self::OpenaiGpt5Nano
8561            | Self::OpenaiGpt5Pro
8562            | Self::OpenaiGpt51
8563            | Self::OpenaiGpt51Codex
8564            | Self::OpenaiGpt51CodexMax
8565            | Self::OpenaiGpt51CodexMini
8566            | Self::OpenaiGpt52
8567            | Self::OpenaiGpt52Chat
8568            | Self::OpenaiGpt52Codex
8569            | Self::OpenaiGpt52Pro
8570            | Self::OpenaiGpt53Chat
8571            | Self::OpenaiGpt53Codex
8572            | Self::OpenaiGpt54
8573            | Self::OpenaiGpt54Mini
8574            | Self::OpenaiGpt54Nano
8575            | Self::OpenaiGpt54Pro
8576            | Self::OpenaiGpt55
8577            | Self::OpenaiGpt55Pro
8578            | Self::OpenaiGpt56Luna
8579            | Self::OpenaiGpt56LunaPro
8580            | Self::OpenaiGpt56Sol
8581            | Self::OpenaiGpt56SolPro
8582            | Self::OpenaiGpt56Terra
8583            | Self::OpenaiGpt56TerraPro
8584            | Self::OpenaiGptAudio
8585            | Self::OpenaiGptAudioMini
8586            | Self::OpenaiGptOss120b
8587            | Self::OpenaiGptOss20b
8588            | Self::OpenaiGptOss20bFree
8589            | Self::OpenaiGptOssSafeguard20b
8590            | Self::OpenaiO1
8591            | Self::OpenaiO3
8592            | Self::OpenaiO3Mini
8593            | Self::OpenaiO3MiniHigh
8594            | Self::OpenaiO3Pro
8595            | Self::OpenaiO4Mini
8596            | Self::OpenaiO4MiniHigh
8597            | Self::OpenrouterAuto
8598            | Self::OpenrouterFree
8599            | Self::PoolsideLagunaS21
8600            | Self::PoolsideLagunaS21Free
8601            | Self::PoolsideLagunaXs21
8602            | Self::PoolsideLagunaXs21Free
8603            | Self::QwenQwen2572bInstruct
8604            | Self::QwenQwen257bInstruct
8605            | Self::QwenQwenPlus
8606            | Self::QwenQwenPlus20250728
8607            | Self::QwenQwenPlus20250728Thinking
8608            | Self::QwenQwen314b
8609            | Self::QwenQwen3235bA22b
8610            | Self::QwenQwen3235bA22b2507
8611            | Self::QwenQwen3235bA22bThinking2507
8612            | Self::QwenQwen330bA3b
8613            | Self::QwenQwen330bA3bInstruct2507
8614            | Self::QwenQwen330bA3bThinking2507
8615            | Self::QwenQwen332b
8616            | Self::QwenQwen38b
8617            | Self::QwenQwen3Coder
8618            | Self::QwenQwen3Coder30bA3bInstruct
8619            | Self::QwenQwen3CoderFlash
8620            | Self::QwenQwen3CoderNext
8621            | Self::QwenQwen3CoderPlus
8622            | Self::QwenQwen3Max
8623            | Self::QwenQwen3MaxThinking
8624            | Self::QwenQwen3Next80bA3bInstruct
8625            | Self::QwenQwen3Next80bA3bThinking
8626            | Self::QwenQwen3Vl235bA22bInstruct
8627            | Self::QwenQwen3Vl235bA22bThinking
8628            | Self::QwenQwen3Vl30bA3bInstruct
8629            | Self::QwenQwen3Vl30bA3bThinking
8630            | Self::QwenQwen3Vl32bInstruct
8631            | Self::QwenQwen3Vl8bInstruct
8632            | Self::QwenQwen3Vl8bThinking
8633            | Self::QwenQwen35122bA10b
8634            | Self::QwenQwen3527b
8635            | Self::QwenQwen3535bA3b
8636            | Self::QwenQwen35397bA17b
8637            | Self::QwenQwen359b
8638            | Self::QwenQwen35Flash0223
8639            | Self::QwenQwen35Plus0215
8640            | Self::QwenQwen35Plus20260420
8641            | Self::QwenQwen3627b
8642            | Self::QwenQwen3635bA3b
8643            | Self::QwenQwen36Flash
8644            | Self::QwenQwen36MaxPreview
8645            | Self::QwenQwen36Plus
8646            | Self::QwenQwen37Flash
8647            | Self::QwenQwen37Max
8648            | Self::QwenQwen37Plus
8649            | Self::RekaaiRekaEdge
8650            | Self::RelaceRelaceSearch
8651            | Self::SakanaFuguUltra
8652            | Self::Sao10kL31Euryale70b
8653            | Self::StepfunStep35Flash
8654            | Self::StepfunStep37Flash
8655            | Self::TencentHy3
8656            | Self::TencentHy3Preview
8657            | Self::ThedrummerUnslopnemo12b
8658            | Self::ThinkingmachinesInkling
8659            | Self::ThinkingmachinesInklingSmall
8660            | Self::UpstageSolarPro3
8661            | Self::XAiGrok420
8662            | Self::XAiGrok43
8663            | Self::XAiGrok45
8664            | Self::XAiGrokBuild01
8665            | Self::XiaomiMimoV25
8666            | Self::XiaomiMimoV25Pro
8667            | Self::ZAiGlm45
8668            | Self::ZAiGlm45Air
8669            | Self::ZAiGlm45v
8670            | Self::ZAiGlm46
8671            | Self::ZAiGlm46v
8672            | Self::ZAiGlm47
8673            | Self::ZAiGlm47Flash
8674            | Self::ZAiGlm5
8675            | Self::ZAiGlm5Turbo
8676            | Self::ZAiGlm51
8677            | Self::ZAiGlm52
8678            | Self::ZAiGlm5vTurbo => None,
8679        }
8680    }
8681    const ALL: &[OpenRouterModel] = &[
8682        Self::Ai21JambaLarge17,
8683        Self::AionLabsAion20,
8684        Self::AionLabsAion30,
8685        Self::AionLabsAion30Mini,
8686        Self::AmazonNova2LiteV1,
8687        Self::AmazonNovaLiteV1,
8688        Self::AmazonNovaMicroV1,
8689        Self::AmazonNovaPremierV1,
8690        Self::AmazonNovaProV1,
8691        Self::AnthropicClaude3Haiku,
8692        Self::AnthropicClaudeFable5,
8693        Self::AnthropicClaudeHaiku45,
8694        Self::AnthropicClaudeOpus4,
8695        Self::AnthropicClaudeOpus41,
8696        Self::AnthropicClaudeOpus45,
8697        Self::AnthropicClaudeOpus46,
8698        Self::AnthropicClaudeOpus47,
8699        Self::AnthropicClaudeOpus47Fast,
8700        Self::AnthropicClaudeOpus48,
8701        Self::AnthropicClaudeOpus48Fast,
8702        Self::AnthropicClaudeOpus5,
8703        Self::AnthropicClaudeOpus5Fast,
8704        Self::AnthropicClaudeSonnet4,
8705        Self::AnthropicClaudeSonnet45,
8706        Self::AnthropicClaudeSonnet46,
8707        Self::AnthropicClaudeSonnet5,
8708        Self::ArceeAiTrinityLargeThinking,
8709        Self::ArceeAiVirtuosoLarge,
8710        Self::BytedanceSeedSeed16,
8711        Self::BytedanceSeedSeed16Flash,
8712        Self::BytedanceSeedSeed20Lite,
8713        Self::BytedanceSeedSeed20Mini,
8714        Self::CohereCommandR082024,
8715        Self::CohereCommandRPlus082024,
8716        Self::CohereNorthMiniCodeFree,
8717        Self::DeepseekDeepseekChat,
8718        Self::DeepseekDeepseekChatV30324,
8719        Self::DeepseekDeepseekChatV31,
8720        Self::DeepseekDeepseekR1,
8721        Self::DeepseekDeepseekR10528,
8722        Self::DeepseekDeepseekV31Terminus,
8723        Self::DeepseekDeepseekV32,
8724        Self::DeepseekDeepseekV32Exp,
8725        Self::DeepseekDeepseekV4Flash,
8726        Self::DeepseekDeepseekV4Flash0731,
8727        Self::DeepseekDeepseekV4Pro,
8728        Self::GoogleGemini25Flash,
8729        Self::GoogleGemini25FlashLite,
8730        Self::GoogleGemini25Pro,
8731        Self::GoogleGemini25ProPreview,
8732        Self::GoogleGemini25ProPreview0506,
8733        Self::GoogleGemini3FlashPreview,
8734        Self::GoogleGemini3ProImage,
8735        Self::GoogleGemini31FlashLite,
8736        Self::GoogleGemini31FlashLitePreview,
8737        Self::GoogleGemini31ProPreview,
8738        Self::GoogleGemini31ProPreviewCustomtools,
8739        Self::GoogleGemini35Flash,
8740        Self::GoogleGemini35FlashLite,
8741        Self::GoogleGemini36Flash,
8742        Self::GoogleGemma312bIt,
8743        Self::GoogleGemma327bIt,
8744        Self::GoogleGemma426bA4bIt,
8745        Self::GoogleGemma426bA4bItFree,
8746        Self::GoogleGemma431bIt,
8747        Self::GoogleGemma431bItFree,
8748        Self::IbmGraniteGranite418b,
8749        Self::InceptionMercury2,
8750        Self::InclusionaiLing261t,
8751        Self::InclusionaiLing26Flash,
8752        Self::InclusionaiLing30FlashFree,
8753        Self::InclusionaiRing261t,
8754        Self::KwaipilotKatCoderAirV25,
8755        Self::KwaipilotKatCoderProV2,
8756        Self::KwaipilotKatCoderProV25,
8757        Self::MeituanLongcat20,
8758        Self::MetaLlamaLlama3170bInstruct,
8759        Self::MetaLlamaLlama318bInstruct,
8760        Self::MetaLlamaLlama3370bInstruct,
8761        Self::MetaLlamaLlama4Maverick,
8762        Self::MetaLlamaLlama4Scout,
8763        Self::MetaMuseSpark11,
8764        Self::MinimaxMinimaxM1,
8765        Self::MinimaxMinimaxM2,
8766        Self::MinimaxMinimaxM21,
8767        Self::MinimaxMinimaxM25,
8768        Self::MinimaxMinimaxM27,
8769        Self::MinimaxMinimaxM3,
8770        Self::MistralaiCodestral2508,
8771        Self::MistralaiMinistral14b2512,
8772        Self::MistralaiMinistral3b2512,
8773        Self::MistralaiMinistral8b2512,
8774        Self::MistralaiMistralLarge,
8775        Self::MistralaiMistralLarge2407,
8776        Self::MistralaiMistralLarge2512,
8777        Self::MistralaiMistralMedium3,
8778        Self::MistralaiMistralMedium35,
8779        Self::MistralaiMistralMedium31,
8780        Self::MistralaiMistralNemo,
8781        Self::MistralaiMistralSaba,
8782        Self::MistralaiMistralSmall2603,
8783        Self::MistralaiMistralSmall3224bInstruct,
8784        Self::MistralaiMixtral8x22bInstruct,
8785        Self::MistralaiVoxtralSmall24b2507,
8786        Self::MoonshotaiKimiK2,
8787        Self::MoonshotaiKimiK20905,
8788        Self::MoonshotaiKimiK2Thinking,
8789        Self::MoonshotaiKimiK25,
8790        Self::MoonshotaiKimiK26,
8791        Self::MoonshotaiKimiK27Code,
8792        Self::MoonshotaiKimiK3,
8793        Self::NexAgiNexN2Mini,
8794        Self::NexAgiNexN2Pro,
8795        Self::NvidiaNemotron3Nano30bA3b,
8796        Self::NvidiaNemotron3Nano30bA3bFree,
8797        Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree,
8798        Self::NvidiaNemotron3Super120bA12b,
8799        Self::NvidiaNemotron3Super120bA12bFree,
8800        Self::NvidiaNemotron3Ultra550bA55b,
8801        Self::NvidiaNemotron3Ultra550bA55bFree,
8802        Self::NvidiaNemotronNano12bV2VlFree,
8803        Self::NvidiaNemotronNano9bV2Free,
8804        Self::OpenaiGpt35Turbo,
8805        Self::OpenaiGpt35Turbo0613,
8806        Self::OpenaiGpt35Turbo16k,
8807        Self::OpenaiGpt4,
8808        Self::OpenaiGpt4Turbo,
8809        Self::OpenaiGpt4TurboPreview,
8810        Self::OpenaiGpt41,
8811        Self::OpenaiGpt41Mini,
8812        Self::OpenaiGpt41Nano,
8813        Self::OpenaiGpt4o,
8814        Self::OpenaiGpt4o20240513,
8815        Self::OpenaiGpt4o20240806,
8816        Self::OpenaiGpt4o20241120,
8817        Self::OpenaiGpt4oMini,
8818        Self::OpenaiGpt4oMini20240718,
8819        Self::OpenaiGpt5,
8820        Self::OpenaiGpt5Mini,
8821        Self::OpenaiGpt5Nano,
8822        Self::OpenaiGpt5Pro,
8823        Self::OpenaiGpt51,
8824        Self::OpenaiGpt51Codex,
8825        Self::OpenaiGpt51CodexMax,
8826        Self::OpenaiGpt51CodexMini,
8827        Self::OpenaiGpt52,
8828        Self::OpenaiGpt52Chat,
8829        Self::OpenaiGpt52Codex,
8830        Self::OpenaiGpt52Pro,
8831        Self::OpenaiGpt53Chat,
8832        Self::OpenaiGpt53Codex,
8833        Self::OpenaiGpt54,
8834        Self::OpenaiGpt54Mini,
8835        Self::OpenaiGpt54Nano,
8836        Self::OpenaiGpt54Pro,
8837        Self::OpenaiGpt55,
8838        Self::OpenaiGpt55Pro,
8839        Self::OpenaiGpt56Luna,
8840        Self::OpenaiGpt56LunaPro,
8841        Self::OpenaiGpt56Sol,
8842        Self::OpenaiGpt56SolPro,
8843        Self::OpenaiGpt56Terra,
8844        Self::OpenaiGpt56TerraPro,
8845        Self::OpenaiGptAudio,
8846        Self::OpenaiGptAudioMini,
8847        Self::OpenaiGptOss120b,
8848        Self::OpenaiGptOss20b,
8849        Self::OpenaiGptOss20bFree,
8850        Self::OpenaiGptOssSafeguard20b,
8851        Self::OpenaiO1,
8852        Self::OpenaiO3,
8853        Self::OpenaiO3Mini,
8854        Self::OpenaiO3MiniHigh,
8855        Self::OpenaiO3Pro,
8856        Self::OpenaiO4Mini,
8857        Self::OpenaiO4MiniHigh,
8858        Self::OpenrouterAuto,
8859        Self::OpenrouterFree,
8860        Self::PoolsideLagunaS21,
8861        Self::PoolsideLagunaS21Free,
8862        Self::PoolsideLagunaXs21,
8863        Self::PoolsideLagunaXs21Free,
8864        Self::QwenQwen2572bInstruct,
8865        Self::QwenQwen257bInstruct,
8866        Self::QwenQwenPlus,
8867        Self::QwenQwenPlus20250728,
8868        Self::QwenQwenPlus20250728Thinking,
8869        Self::QwenQwen314b,
8870        Self::QwenQwen3235bA22b,
8871        Self::QwenQwen3235bA22b2507,
8872        Self::QwenQwen3235bA22bThinking2507,
8873        Self::QwenQwen330bA3b,
8874        Self::QwenQwen330bA3bInstruct2507,
8875        Self::QwenQwen330bA3bThinking2507,
8876        Self::QwenQwen332b,
8877        Self::QwenQwen38b,
8878        Self::QwenQwen3Coder,
8879        Self::QwenQwen3Coder30bA3bInstruct,
8880        Self::QwenQwen3CoderFlash,
8881        Self::QwenQwen3CoderNext,
8882        Self::QwenQwen3CoderPlus,
8883        Self::QwenQwen3Max,
8884        Self::QwenQwen3MaxThinking,
8885        Self::QwenQwen3Next80bA3bInstruct,
8886        Self::QwenQwen3Next80bA3bThinking,
8887        Self::QwenQwen3Vl235bA22bInstruct,
8888        Self::QwenQwen3Vl235bA22bThinking,
8889        Self::QwenQwen3Vl30bA3bInstruct,
8890        Self::QwenQwen3Vl30bA3bThinking,
8891        Self::QwenQwen3Vl32bInstruct,
8892        Self::QwenQwen3Vl8bInstruct,
8893        Self::QwenQwen3Vl8bThinking,
8894        Self::QwenQwen35122bA10b,
8895        Self::QwenQwen3527b,
8896        Self::QwenQwen3535bA3b,
8897        Self::QwenQwen35397bA17b,
8898        Self::QwenQwen359b,
8899        Self::QwenQwen35Flash0223,
8900        Self::QwenQwen35Plus0215,
8901        Self::QwenQwen35Plus20260420,
8902        Self::QwenQwen3627b,
8903        Self::QwenQwen3635bA3b,
8904        Self::QwenQwen36Flash,
8905        Self::QwenQwen36MaxPreview,
8906        Self::QwenQwen36Plus,
8907        Self::QwenQwen37Flash,
8908        Self::QwenQwen37Max,
8909        Self::QwenQwen37Plus,
8910        Self::RekaaiRekaEdge,
8911        Self::RelaceRelaceSearch,
8912        Self::SakanaFuguUltra,
8913        Self::Sao10kL31Euryale70b,
8914        Self::StepfunStep35Flash,
8915        Self::StepfunStep37Flash,
8916        Self::TencentHy3,
8917        Self::TencentHy3Preview,
8918        Self::ThedrummerUnslopnemo12b,
8919        Self::ThinkingmachinesInkling,
8920        Self::ThinkingmachinesInklingSmall,
8921        Self::UpstageSolarPro3,
8922        Self::XAiGrok420,
8923        Self::XAiGrok43,
8924        Self::XAiGrok45,
8925        Self::XAiGrokBuild01,
8926        Self::XiaomiMimoV25,
8927        Self::XiaomiMimoV25Pro,
8928        Self::ZAiGlm45,
8929        Self::ZAiGlm45Air,
8930        Self::ZAiGlm45v,
8931        Self::ZAiGlm46,
8932        Self::ZAiGlm46v,
8933        Self::ZAiGlm47,
8934        Self::ZAiGlm47Flash,
8935        Self::ZAiGlm5,
8936        Self::ZAiGlm5Turbo,
8937        Self::ZAiGlm51,
8938        Self::ZAiGlm52,
8939        Self::ZAiGlm5vTurbo,
8940    ];
8941}
8942impl std::str::FromStr for OpenRouterModel {
8943    type Err = String;
8944    #[allow(clippy::too_many_lines)]
8945    fn from_str(s: &str) -> Result<Self, Self::Err> {
8946        match s {
8947            "ai21/jamba-large-1.7" => Ok(Self::Ai21JambaLarge17),
8948            "aion-labs/aion-2.0" => Ok(Self::AionLabsAion20),
8949            "aion-labs/aion-3.0" => Ok(Self::AionLabsAion30),
8950            "aion-labs/aion-3.0-mini" => Ok(Self::AionLabsAion30Mini),
8951            "amazon/nova-2-lite-v1" => Ok(Self::AmazonNova2LiteV1),
8952            "amazon/nova-lite-v1" => Ok(Self::AmazonNovaLiteV1),
8953            "amazon/nova-micro-v1" => Ok(Self::AmazonNovaMicroV1),
8954            "amazon/nova-premier-v1" => Ok(Self::AmazonNovaPremierV1),
8955            "amazon/nova-pro-v1" => Ok(Self::AmazonNovaProV1),
8956            "anthropic/claude-3-haiku" => Ok(Self::AnthropicClaude3Haiku),
8957            "anthropic/claude-fable-5" => Ok(Self::AnthropicClaudeFable5),
8958            "anthropic/claude-haiku-4.5" => Ok(Self::AnthropicClaudeHaiku45),
8959            "anthropic/claude-opus-4" => Ok(Self::AnthropicClaudeOpus4),
8960            "anthropic/claude-opus-4.1" => Ok(Self::AnthropicClaudeOpus41),
8961            "anthropic/claude-opus-4.5" => Ok(Self::AnthropicClaudeOpus45),
8962            "anthropic/claude-opus-4.6" => Ok(Self::AnthropicClaudeOpus46),
8963            "anthropic/claude-opus-4.7" => Ok(Self::AnthropicClaudeOpus47),
8964            "anthropic/claude-opus-4.7-fast" => Ok(Self::AnthropicClaudeOpus47Fast),
8965            "anthropic/claude-opus-4.8" => Ok(Self::AnthropicClaudeOpus48),
8966            "anthropic/claude-opus-4.8-fast" => Ok(Self::AnthropicClaudeOpus48Fast),
8967            "anthropic/claude-opus-5" => Ok(Self::AnthropicClaudeOpus5),
8968            "anthropic/claude-opus-5-fast" => Ok(Self::AnthropicClaudeOpus5Fast),
8969            "anthropic/claude-sonnet-4" => Ok(Self::AnthropicClaudeSonnet4),
8970            "anthropic/claude-sonnet-4.5" => Ok(Self::AnthropicClaudeSonnet45),
8971            "anthropic/claude-sonnet-4.6" => Ok(Self::AnthropicClaudeSonnet46),
8972            "anthropic/claude-sonnet-5" => Ok(Self::AnthropicClaudeSonnet5),
8973            "arcee-ai/trinity-large-thinking" => Ok(Self::ArceeAiTrinityLargeThinking),
8974            "arcee-ai/virtuoso-large" => Ok(Self::ArceeAiVirtuosoLarge),
8975            "bytedance-seed/seed-1.6" => Ok(Self::BytedanceSeedSeed16),
8976            "bytedance-seed/seed-1.6-flash" => Ok(Self::BytedanceSeedSeed16Flash),
8977            "bytedance-seed/seed-2.0-lite" => Ok(Self::BytedanceSeedSeed20Lite),
8978            "bytedance-seed/seed-2.0-mini" => Ok(Self::BytedanceSeedSeed20Mini),
8979            "cohere/command-r-08-2024" => Ok(Self::CohereCommandR082024),
8980            "cohere/command-r-plus-08-2024" => Ok(Self::CohereCommandRPlus082024),
8981            "cohere/north-mini-code:free" => Ok(Self::CohereNorthMiniCodeFree),
8982            "deepseek/deepseek-chat" => Ok(Self::DeepseekDeepseekChat),
8983            "deepseek/deepseek-chat-v3-0324" => Ok(Self::DeepseekDeepseekChatV30324),
8984            "deepseek/deepseek-chat-v3.1" => Ok(Self::DeepseekDeepseekChatV31),
8985            "deepseek/deepseek-r1" => Ok(Self::DeepseekDeepseekR1),
8986            "deepseek/deepseek-r1-0528" => Ok(Self::DeepseekDeepseekR10528),
8987            "deepseek/deepseek-v3.1-terminus" => Ok(Self::DeepseekDeepseekV31Terminus),
8988            "deepseek/deepseek-v3.2" => Ok(Self::DeepseekDeepseekV32),
8989            "deepseek/deepseek-v3.2-exp" => Ok(Self::DeepseekDeepseekV32Exp),
8990            "deepseek/deepseek-v4-flash" => Ok(Self::DeepseekDeepseekV4Flash),
8991            "deepseek/deepseek-v4-flash-0731" => Ok(Self::DeepseekDeepseekV4Flash0731),
8992            "deepseek/deepseek-v4-pro" => Ok(Self::DeepseekDeepseekV4Pro),
8993            "google/gemini-2.5-flash" => Ok(Self::GoogleGemini25Flash),
8994            "google/gemini-2.5-flash-lite" => Ok(Self::GoogleGemini25FlashLite),
8995            "google/gemini-2.5-pro" => Ok(Self::GoogleGemini25Pro),
8996            "google/gemini-2.5-pro-preview" => Ok(Self::GoogleGemini25ProPreview),
8997            "google/gemini-2.5-pro-preview-05-06" => {
8998                Ok(Self::GoogleGemini25ProPreview0506)
8999            }
9000            "google/gemini-3-flash-preview" => Ok(Self::GoogleGemini3FlashPreview),
9001            "google/gemini-3-pro-image" => Ok(Self::GoogleGemini3ProImage),
9002            "google/gemini-3.1-flash-lite" => Ok(Self::GoogleGemini31FlashLite),
9003            "google/gemini-3.1-flash-lite-preview" => {
9004                Ok(Self::GoogleGemini31FlashLitePreview)
9005            }
9006            "google/gemini-3.1-pro-preview" => Ok(Self::GoogleGemini31ProPreview),
9007            "google/gemini-3.1-pro-preview-customtools" => {
9008                Ok(Self::GoogleGemini31ProPreviewCustomtools)
9009            }
9010            "google/gemini-3.5-flash" => Ok(Self::GoogleGemini35Flash),
9011            "google/gemini-3.5-flash-lite" => Ok(Self::GoogleGemini35FlashLite),
9012            "google/gemini-3.6-flash" => Ok(Self::GoogleGemini36Flash),
9013            "google/gemma-3-12b-it" => Ok(Self::GoogleGemma312bIt),
9014            "google/gemma-3-27b-it" => Ok(Self::GoogleGemma327bIt),
9015            "google/gemma-4-26b-a4b-it" => Ok(Self::GoogleGemma426bA4bIt),
9016            "google/gemma-4-26b-a4b-it:free" => Ok(Self::GoogleGemma426bA4bItFree),
9017            "google/gemma-4-31b-it" => Ok(Self::GoogleGemma431bIt),
9018            "google/gemma-4-31b-it:free" => Ok(Self::GoogleGemma431bItFree),
9019            "ibm-granite/granite-4.1-8b" => Ok(Self::IbmGraniteGranite418b),
9020            "inception/mercury-2" => Ok(Self::InceptionMercury2),
9021            "inclusionai/ling-2.6-1t" => Ok(Self::InclusionaiLing261t),
9022            "inclusionai/ling-2.6-flash" => Ok(Self::InclusionaiLing26Flash),
9023            "inclusionai/ling-3.0-flash:free" => Ok(Self::InclusionaiLing30FlashFree),
9024            "inclusionai/ring-2.6-1t" => Ok(Self::InclusionaiRing261t),
9025            "kwaipilot/kat-coder-air-v2.5" => Ok(Self::KwaipilotKatCoderAirV25),
9026            "kwaipilot/kat-coder-pro-v2" => Ok(Self::KwaipilotKatCoderProV2),
9027            "kwaipilot/kat-coder-pro-v2.5" => Ok(Self::KwaipilotKatCoderProV25),
9028            "meituan/longcat-2.0" => Ok(Self::MeituanLongcat20),
9029            "meta-llama/llama-3.1-70b-instruct" => Ok(Self::MetaLlamaLlama3170bInstruct),
9030            "meta-llama/llama-3.1-8b-instruct" => Ok(Self::MetaLlamaLlama318bInstruct),
9031            "meta-llama/llama-3.3-70b-instruct" => Ok(Self::MetaLlamaLlama3370bInstruct),
9032            "meta-llama/llama-4-maverick" => Ok(Self::MetaLlamaLlama4Maverick),
9033            "meta-llama/llama-4-scout" => Ok(Self::MetaLlamaLlama4Scout),
9034            "meta/muse-spark-1.1" => Ok(Self::MetaMuseSpark11),
9035            "minimax/minimax-m1" => Ok(Self::MinimaxMinimaxM1),
9036            "minimax/minimax-m2" => Ok(Self::MinimaxMinimaxM2),
9037            "minimax/minimax-m2.1" => Ok(Self::MinimaxMinimaxM21),
9038            "minimax/minimax-m2.5" => Ok(Self::MinimaxMinimaxM25),
9039            "minimax/minimax-m2.7" => Ok(Self::MinimaxMinimaxM27),
9040            "minimax/minimax-m3" => Ok(Self::MinimaxMinimaxM3),
9041            "mistralai/codestral-2508" => Ok(Self::MistralaiCodestral2508),
9042            "mistralai/ministral-14b-2512" => Ok(Self::MistralaiMinistral14b2512),
9043            "mistralai/ministral-3b-2512" => Ok(Self::MistralaiMinistral3b2512),
9044            "mistralai/ministral-8b-2512" => Ok(Self::MistralaiMinistral8b2512),
9045            "mistralai/mistral-large" => Ok(Self::MistralaiMistralLarge),
9046            "mistralai/mistral-large-2407" => Ok(Self::MistralaiMistralLarge2407),
9047            "mistralai/mistral-large-2512" => Ok(Self::MistralaiMistralLarge2512),
9048            "mistralai/mistral-medium-3" => Ok(Self::MistralaiMistralMedium3),
9049            "mistralai/mistral-medium-3-5" => Ok(Self::MistralaiMistralMedium35),
9050            "mistralai/mistral-medium-3.1" => Ok(Self::MistralaiMistralMedium31),
9051            "mistralai/mistral-nemo" => Ok(Self::MistralaiMistralNemo),
9052            "mistralai/mistral-saba" => Ok(Self::MistralaiMistralSaba),
9053            "mistralai/mistral-small-2603" => Ok(Self::MistralaiMistralSmall2603),
9054            "mistralai/mistral-small-3.2-24b-instruct" => {
9055                Ok(Self::MistralaiMistralSmall3224bInstruct)
9056            }
9057            "mistralai/mixtral-8x22b-instruct" => Ok(Self::MistralaiMixtral8x22bInstruct),
9058            "mistralai/voxtral-small-24b-2507" => Ok(Self::MistralaiVoxtralSmall24b2507),
9059            "moonshotai/kimi-k2" => Ok(Self::MoonshotaiKimiK2),
9060            "moonshotai/kimi-k2-0905" => Ok(Self::MoonshotaiKimiK20905),
9061            "moonshotai/kimi-k2-thinking" => Ok(Self::MoonshotaiKimiK2Thinking),
9062            "moonshotai/kimi-k2.5" => Ok(Self::MoonshotaiKimiK25),
9063            "moonshotai/kimi-k2.6" => Ok(Self::MoonshotaiKimiK26),
9064            "moonshotai/kimi-k2.7-code" => Ok(Self::MoonshotaiKimiK27Code),
9065            "moonshotai/kimi-k3" => Ok(Self::MoonshotaiKimiK3),
9066            "nex-agi/nex-n2-mini" => Ok(Self::NexAgiNexN2Mini),
9067            "nex-agi/nex-n2-pro" => Ok(Self::NexAgiNexN2Pro),
9068            "nvidia/nemotron-3-nano-30b-a3b" => Ok(Self::NvidiaNemotron3Nano30bA3b),
9069            "nvidia/nemotron-3-nano-30b-a3b:free" => {
9070                Ok(Self::NvidiaNemotron3Nano30bA3bFree)
9071            }
9072            "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free" => {
9073                Ok(Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree)
9074            }
9075            "nvidia/nemotron-3-super-120b-a12b" => Ok(Self::NvidiaNemotron3Super120bA12b),
9076            "nvidia/nemotron-3-super-120b-a12b:free" => {
9077                Ok(Self::NvidiaNemotron3Super120bA12bFree)
9078            }
9079            "nvidia/nemotron-3-ultra-550b-a55b" => Ok(Self::NvidiaNemotron3Ultra550bA55b),
9080            "nvidia/nemotron-3-ultra-550b-a55b:free" => {
9081                Ok(Self::NvidiaNemotron3Ultra550bA55bFree)
9082            }
9083            "nvidia/nemotron-nano-12b-v2-vl:free" => {
9084                Ok(Self::NvidiaNemotronNano12bV2VlFree)
9085            }
9086            "nvidia/nemotron-nano-9b-v2:free" => Ok(Self::NvidiaNemotronNano9bV2Free),
9087            "openai/gpt-3.5-turbo" => Ok(Self::OpenaiGpt35Turbo),
9088            "openai/gpt-3.5-turbo-0613" => Ok(Self::OpenaiGpt35Turbo0613),
9089            "openai/gpt-3.5-turbo-16k" => Ok(Self::OpenaiGpt35Turbo16k),
9090            "openai/gpt-4" => Ok(Self::OpenaiGpt4),
9091            "openai/gpt-4-turbo" => Ok(Self::OpenaiGpt4Turbo),
9092            "openai/gpt-4-turbo-preview" => Ok(Self::OpenaiGpt4TurboPreview),
9093            "openai/gpt-4.1" => Ok(Self::OpenaiGpt41),
9094            "openai/gpt-4.1-mini" => Ok(Self::OpenaiGpt41Mini),
9095            "openai/gpt-4.1-nano" => Ok(Self::OpenaiGpt41Nano),
9096            "openai/gpt-4o" => Ok(Self::OpenaiGpt4o),
9097            "openai/gpt-4o-2024-05-13" => Ok(Self::OpenaiGpt4o20240513),
9098            "openai/gpt-4o-2024-08-06" => Ok(Self::OpenaiGpt4o20240806),
9099            "openai/gpt-4o-2024-11-20" => Ok(Self::OpenaiGpt4o20241120),
9100            "openai/gpt-4o-mini" => Ok(Self::OpenaiGpt4oMini),
9101            "openai/gpt-4o-mini-2024-07-18" => Ok(Self::OpenaiGpt4oMini20240718),
9102            "openai/gpt-5" => Ok(Self::OpenaiGpt5),
9103            "openai/gpt-5-mini" => Ok(Self::OpenaiGpt5Mini),
9104            "openai/gpt-5-nano" => Ok(Self::OpenaiGpt5Nano),
9105            "openai/gpt-5-pro" => Ok(Self::OpenaiGpt5Pro),
9106            "openai/gpt-5.1" => Ok(Self::OpenaiGpt51),
9107            "openai/gpt-5.1-codex" => Ok(Self::OpenaiGpt51Codex),
9108            "openai/gpt-5.1-codex-max" => Ok(Self::OpenaiGpt51CodexMax),
9109            "openai/gpt-5.1-codex-mini" => Ok(Self::OpenaiGpt51CodexMini),
9110            "openai/gpt-5.2" => Ok(Self::OpenaiGpt52),
9111            "openai/gpt-5.2-chat" => Ok(Self::OpenaiGpt52Chat),
9112            "openai/gpt-5.2-codex" => Ok(Self::OpenaiGpt52Codex),
9113            "openai/gpt-5.2-pro" => Ok(Self::OpenaiGpt52Pro),
9114            "openai/gpt-5.3-chat" => Ok(Self::OpenaiGpt53Chat),
9115            "openai/gpt-5.3-codex" => Ok(Self::OpenaiGpt53Codex),
9116            "openai/gpt-5.4" => Ok(Self::OpenaiGpt54),
9117            "openai/gpt-5.4-mini" => Ok(Self::OpenaiGpt54Mini),
9118            "openai/gpt-5.4-nano" => Ok(Self::OpenaiGpt54Nano),
9119            "openai/gpt-5.4-pro" => Ok(Self::OpenaiGpt54Pro),
9120            "openai/gpt-5.5" => Ok(Self::OpenaiGpt55),
9121            "openai/gpt-5.5-pro" => Ok(Self::OpenaiGpt55Pro),
9122            "openai/gpt-5.6-luna" => Ok(Self::OpenaiGpt56Luna),
9123            "openai/gpt-5.6-luna-pro" => Ok(Self::OpenaiGpt56LunaPro),
9124            "openai/gpt-5.6-sol" => Ok(Self::OpenaiGpt56Sol),
9125            "openai/gpt-5.6-sol-pro" => Ok(Self::OpenaiGpt56SolPro),
9126            "openai/gpt-5.6-terra" => Ok(Self::OpenaiGpt56Terra),
9127            "openai/gpt-5.6-terra-pro" => Ok(Self::OpenaiGpt56TerraPro),
9128            "openai/gpt-audio" => Ok(Self::OpenaiGptAudio),
9129            "openai/gpt-audio-mini" => Ok(Self::OpenaiGptAudioMini),
9130            "openai/gpt-oss-120b" => Ok(Self::OpenaiGptOss120b),
9131            "openai/gpt-oss-20b" => Ok(Self::OpenaiGptOss20b),
9132            "openai/gpt-oss-20b:free" => Ok(Self::OpenaiGptOss20bFree),
9133            "openai/gpt-oss-safeguard-20b" => Ok(Self::OpenaiGptOssSafeguard20b),
9134            "openai/o1" => Ok(Self::OpenaiO1),
9135            "openai/o3" => Ok(Self::OpenaiO3),
9136            "openai/o3-mini" => Ok(Self::OpenaiO3Mini),
9137            "openai/o3-mini-high" => Ok(Self::OpenaiO3MiniHigh),
9138            "openai/o3-pro" => Ok(Self::OpenaiO3Pro),
9139            "openai/o4-mini" => Ok(Self::OpenaiO4Mini),
9140            "openai/o4-mini-high" => Ok(Self::OpenaiO4MiniHigh),
9141            "openrouter/auto" => Ok(Self::OpenrouterAuto),
9142            "openrouter/free" => Ok(Self::OpenrouterFree),
9143            "poolside/laguna-s-2.1" => Ok(Self::PoolsideLagunaS21),
9144            "poolside/laguna-s-2.1:free" => Ok(Self::PoolsideLagunaS21Free),
9145            "poolside/laguna-xs-2.1" => Ok(Self::PoolsideLagunaXs21),
9146            "poolside/laguna-xs-2.1:free" => Ok(Self::PoolsideLagunaXs21Free),
9147            "qwen/qwen-2.5-72b-instruct" => Ok(Self::QwenQwen2572bInstruct),
9148            "qwen/qwen-2.5-7b-instruct" => Ok(Self::QwenQwen257bInstruct),
9149            "qwen/qwen-plus" => Ok(Self::QwenQwenPlus),
9150            "qwen/qwen-plus-2025-07-28" => Ok(Self::QwenQwenPlus20250728),
9151            "qwen/qwen-plus-2025-07-28:thinking" => {
9152                Ok(Self::QwenQwenPlus20250728Thinking)
9153            }
9154            "qwen/qwen3-14b" => Ok(Self::QwenQwen314b),
9155            "qwen/qwen3-235b-a22b" => Ok(Self::QwenQwen3235bA22b),
9156            "qwen/qwen3-235b-a22b-2507" => Ok(Self::QwenQwen3235bA22b2507),
9157            "qwen/qwen3-235b-a22b-thinking-2507" => {
9158                Ok(Self::QwenQwen3235bA22bThinking2507)
9159            }
9160            "qwen/qwen3-30b-a3b" => Ok(Self::QwenQwen330bA3b),
9161            "qwen/qwen3-30b-a3b-instruct-2507" => Ok(Self::QwenQwen330bA3bInstruct2507),
9162            "qwen/qwen3-30b-a3b-thinking-2507" => Ok(Self::QwenQwen330bA3bThinking2507),
9163            "qwen/qwen3-32b" => Ok(Self::QwenQwen332b),
9164            "qwen/qwen3-8b" => Ok(Self::QwenQwen38b),
9165            "qwen/qwen3-coder" => Ok(Self::QwenQwen3Coder),
9166            "qwen/qwen3-coder-30b-a3b-instruct" => Ok(Self::QwenQwen3Coder30bA3bInstruct),
9167            "qwen/qwen3-coder-flash" => Ok(Self::QwenQwen3CoderFlash),
9168            "qwen/qwen3-coder-next" => Ok(Self::QwenQwen3CoderNext),
9169            "qwen/qwen3-coder-plus" => Ok(Self::QwenQwen3CoderPlus),
9170            "qwen/qwen3-max" => Ok(Self::QwenQwen3Max),
9171            "qwen/qwen3-max-thinking" => Ok(Self::QwenQwen3MaxThinking),
9172            "qwen/qwen3-next-80b-a3b-instruct" => Ok(Self::QwenQwen3Next80bA3bInstruct),
9173            "qwen/qwen3-next-80b-a3b-thinking" => Ok(Self::QwenQwen3Next80bA3bThinking),
9174            "qwen/qwen3-vl-235b-a22b-instruct" => Ok(Self::QwenQwen3Vl235bA22bInstruct),
9175            "qwen/qwen3-vl-235b-a22b-thinking" => Ok(Self::QwenQwen3Vl235bA22bThinking),
9176            "qwen/qwen3-vl-30b-a3b-instruct" => Ok(Self::QwenQwen3Vl30bA3bInstruct),
9177            "qwen/qwen3-vl-30b-a3b-thinking" => Ok(Self::QwenQwen3Vl30bA3bThinking),
9178            "qwen/qwen3-vl-32b-instruct" => Ok(Self::QwenQwen3Vl32bInstruct),
9179            "qwen/qwen3-vl-8b-instruct" => Ok(Self::QwenQwen3Vl8bInstruct),
9180            "qwen/qwen3-vl-8b-thinking" => Ok(Self::QwenQwen3Vl8bThinking),
9181            "qwen/qwen3.5-122b-a10b" => Ok(Self::QwenQwen35122bA10b),
9182            "qwen/qwen3.5-27b" => Ok(Self::QwenQwen3527b),
9183            "qwen/qwen3.5-35b-a3b" => Ok(Self::QwenQwen3535bA3b),
9184            "qwen/qwen3.5-397b-a17b" => Ok(Self::QwenQwen35397bA17b),
9185            "qwen/qwen3.5-9b" => Ok(Self::QwenQwen359b),
9186            "qwen/qwen3.5-flash-02-23" => Ok(Self::QwenQwen35Flash0223),
9187            "qwen/qwen3.5-plus-02-15" => Ok(Self::QwenQwen35Plus0215),
9188            "qwen/qwen3.5-plus-20260420" => Ok(Self::QwenQwen35Plus20260420),
9189            "qwen/qwen3.6-27b" => Ok(Self::QwenQwen3627b),
9190            "qwen/qwen3.6-35b-a3b" => Ok(Self::QwenQwen3635bA3b),
9191            "qwen/qwen3.6-flash" => Ok(Self::QwenQwen36Flash),
9192            "qwen/qwen3.6-max-preview" => Ok(Self::QwenQwen36MaxPreview),
9193            "qwen/qwen3.6-plus" => Ok(Self::QwenQwen36Plus),
9194            "qwen/qwen3.7-flash" => Ok(Self::QwenQwen37Flash),
9195            "qwen/qwen3.7-max" => Ok(Self::QwenQwen37Max),
9196            "qwen/qwen3.7-plus" => Ok(Self::QwenQwen37Plus),
9197            "rekaai/reka-edge" => Ok(Self::RekaaiRekaEdge),
9198            "relace/relace-search" => Ok(Self::RelaceRelaceSearch),
9199            "sakana/fugu-ultra" => Ok(Self::SakanaFuguUltra),
9200            "sao10k/l3.1-euryale-70b" => Ok(Self::Sao10kL31Euryale70b),
9201            "stepfun/step-3.5-flash" => Ok(Self::StepfunStep35Flash),
9202            "stepfun/step-3.7-flash" => Ok(Self::StepfunStep37Flash),
9203            "tencent/hy3" => Ok(Self::TencentHy3),
9204            "tencent/hy3-preview" => Ok(Self::TencentHy3Preview),
9205            "thedrummer/unslopnemo-12b" => Ok(Self::ThedrummerUnslopnemo12b),
9206            "thinkingmachines/inkling" => Ok(Self::ThinkingmachinesInkling),
9207            "thinkingmachines/inkling-small" => Ok(Self::ThinkingmachinesInklingSmall),
9208            "upstage/solar-pro-3" => Ok(Self::UpstageSolarPro3),
9209            "x-ai/grok-4.20" => Ok(Self::XAiGrok420),
9210            "x-ai/grok-4.3" => Ok(Self::XAiGrok43),
9211            "x-ai/grok-4.5" => Ok(Self::XAiGrok45),
9212            "x-ai/grok-build-0.1" => Ok(Self::XAiGrokBuild01),
9213            "xiaomi/mimo-v2.5" => Ok(Self::XiaomiMimoV25),
9214            "xiaomi/mimo-v2.5-pro" => Ok(Self::XiaomiMimoV25Pro),
9215            "z-ai/glm-4.5" => Ok(Self::ZAiGlm45),
9216            "z-ai/glm-4.5-air" => Ok(Self::ZAiGlm45Air),
9217            "z-ai/glm-4.5v" => Ok(Self::ZAiGlm45v),
9218            "z-ai/glm-4.6" => Ok(Self::ZAiGlm46),
9219            "z-ai/glm-4.6v" => Ok(Self::ZAiGlm46v),
9220            "z-ai/glm-4.7" => Ok(Self::ZAiGlm47),
9221            "z-ai/glm-4.7-flash" => Ok(Self::ZAiGlm47Flash),
9222            "z-ai/glm-5" => Ok(Self::ZAiGlm5),
9223            "z-ai/glm-5-turbo" => Ok(Self::ZAiGlm5Turbo),
9224            "z-ai/glm-5.1" => Ok(Self::ZAiGlm51),
9225            "z-ai/glm-5.2" => Ok(Self::ZAiGlm52),
9226            "z-ai/glm-5v-turbo" => Ok(Self::ZAiGlm5vTurbo),
9227            _ => Err(format!("Unknown openrouter model: '{s}'")),
9228        }
9229    }
9230}
9231impl ZAiModel {
9232    #[allow(clippy::too_many_lines)]
9233    fn model_id(self) -> &'static str {
9234        match self {
9235            Self::Glm45 => "glm-4.5",
9236            Self::Glm45Air => "glm-4.5-air",
9237            Self::Glm45Flash => "glm-4.5-flash",
9238            Self::Glm45v => "glm-4.5v",
9239            Self::Glm46 => "glm-4.6",
9240            Self::Glm46v => "glm-4.6v",
9241            Self::Glm47 => "glm-4.7",
9242            Self::Glm47Flash => "glm-4.7-flash",
9243            Self::Glm47Flashx => "glm-4.7-flashx",
9244            Self::Glm5 => "glm-5",
9245            Self::Glm5Turbo => "glm-5-turbo",
9246            Self::Glm51 => "glm-5.1",
9247            Self::Glm52 => "glm-5.2",
9248            Self::Glm52Highspeed => "glm-5.2-highspeed",
9249            Self::Glm5vTurbo => "glm-5v-turbo",
9250        }
9251    }
9252    #[allow(clippy::too_many_lines)]
9253    fn display_name(self) -> &'static str {
9254        match self {
9255            Self::Glm45 => "GLM-4.5",
9256            Self::Glm45Air => "GLM-4.5-Air",
9257            Self::Glm45Flash => "GLM-4.5-Flash",
9258            Self::Glm45v => "GLM-4.5V",
9259            Self::Glm46 => "GLM-4.6",
9260            Self::Glm46v => "GLM-4.6V",
9261            Self::Glm47 => "GLM-4.7",
9262            Self::Glm47Flash => "GLM-4.7-Flash",
9263            Self::Glm47Flashx => "GLM-4.7-FlashX",
9264            Self::Glm5 => "GLM-5",
9265            Self::Glm5Turbo => "GLM-5-Turbo",
9266            Self::Glm51 => "GLM-5.1",
9267            Self::Glm52 => "GLM-5.2",
9268            Self::Glm52Highspeed => "GLM-5.2 Highspeed",
9269            Self::Glm5vTurbo => "GLM-5V-Turbo",
9270        }
9271    }
9272    #[allow(clippy::too_many_lines)]
9273    fn context_window(self) -> u32 {
9274        match self {
9275            Self::Glm45v => 64_000,
9276            Self::Glm46v => 128_000,
9277            Self::Glm45 | Self::Glm45Air | Self::Glm45Flash => 131_072,
9278            Self::Glm47Flash
9279            | Self::Glm47Flashx
9280            | Self::Glm5Turbo
9281            | Self::Glm51
9282            | Self::Glm5vTurbo => 200_000,
9283            Self::Glm46 | Self::Glm47 | Self::Glm5 => 204_800,
9284            Self::Glm52 | Self::Glm52Highspeed => 1_000_000,
9285        }
9286    }
9287    #[allow(clippy::too_many_lines)]
9288    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
9289        match self {
9290            Self::Glm52 | Self::Glm52Highspeed => {
9291                &[ReasoningEffort::High, ReasoningEffort::Max]
9292            }
9293            Self::Glm45
9294            | Self::Glm45Air
9295            | Self::Glm45Flash
9296            | Self::Glm45v
9297            | Self::Glm46
9298            | Self::Glm46v
9299            | Self::Glm47
9300            | Self::Glm47Flash
9301            | Self::Glm47Flashx
9302            | Self::Glm5
9303            | Self::Glm5Turbo
9304            | Self::Glm51
9305            | Self::Glm5vTurbo => {
9306                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
9307            }
9308        }
9309    }
9310    pub fn supports_reasoning(self) -> bool {
9311        !self.reasoning_levels().is_empty()
9312    }
9313    #[allow(clippy::too_many_lines)]
9314    pub fn supports_prompt_caching(self) -> bool {
9315        match self {
9316            Self::Glm45v | Self::Glm46v => false,
9317            Self::Glm45
9318            | Self::Glm45Air
9319            | Self::Glm45Flash
9320            | Self::Glm46
9321            | Self::Glm47
9322            | Self::Glm47Flash
9323            | Self::Glm47Flashx
9324            | Self::Glm5
9325            | Self::Glm5Turbo
9326            | Self::Glm51
9327            | Self::Glm52
9328            | Self::Glm52Highspeed
9329            | Self::Glm5vTurbo => true,
9330        }
9331    }
9332    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
9333    pub fn pricing(self) -> Option<ModelPricing> {
9334        match self {
9335            Self::Glm45 => {
9336                Some(ModelPricing {
9337                    input_per_million: 0.6f64,
9338                    output_per_million: 2.2f64,
9339                    cache_read_per_million: Some(0.11f64),
9340                    cache_write_per_million: Some(0f64),
9341                })
9342            }
9343            Self::Glm45Air => {
9344                Some(ModelPricing {
9345                    input_per_million: 0.2f64,
9346                    output_per_million: 1.1f64,
9347                    cache_read_per_million: Some(0.03f64),
9348                    cache_write_per_million: Some(0f64),
9349                })
9350            }
9351            Self::Glm45Flash => {
9352                Some(ModelPricing {
9353                    input_per_million: 0f64,
9354                    output_per_million: 0f64,
9355                    cache_read_per_million: Some(0f64),
9356                    cache_write_per_million: Some(0f64),
9357                })
9358            }
9359            Self::Glm45v => {
9360                Some(ModelPricing {
9361                    input_per_million: 0.6f64,
9362                    output_per_million: 1.8f64,
9363                    cache_read_per_million: None,
9364                    cache_write_per_million: None,
9365                })
9366            }
9367            Self::Glm46 => {
9368                Some(ModelPricing {
9369                    input_per_million: 0.6f64,
9370                    output_per_million: 2.2f64,
9371                    cache_read_per_million: Some(0.11f64),
9372                    cache_write_per_million: Some(0f64),
9373                })
9374            }
9375            Self::Glm46v => {
9376                Some(ModelPricing {
9377                    input_per_million: 0.3f64,
9378                    output_per_million: 0.9f64,
9379                    cache_read_per_million: None,
9380                    cache_write_per_million: None,
9381                })
9382            }
9383            Self::Glm47 => {
9384                Some(ModelPricing {
9385                    input_per_million: 0.6f64,
9386                    output_per_million: 2.2f64,
9387                    cache_read_per_million: Some(0.11f64),
9388                    cache_write_per_million: Some(0f64),
9389                })
9390            }
9391            Self::Glm47Flash => {
9392                Some(ModelPricing {
9393                    input_per_million: 0f64,
9394                    output_per_million: 0f64,
9395                    cache_read_per_million: Some(0f64),
9396                    cache_write_per_million: Some(0f64),
9397                })
9398            }
9399            Self::Glm47Flashx => {
9400                Some(ModelPricing {
9401                    input_per_million: 0.07f64,
9402                    output_per_million: 0.4f64,
9403                    cache_read_per_million: Some(0.01f64),
9404                    cache_write_per_million: Some(0f64),
9405                })
9406            }
9407            Self::Glm5 => {
9408                Some(ModelPricing {
9409                    input_per_million: 1f64,
9410                    output_per_million: 3.2f64,
9411                    cache_read_per_million: Some(0.2f64),
9412                    cache_write_per_million: Some(0f64),
9413                })
9414            }
9415            Self::Glm5Turbo => {
9416                Some(ModelPricing {
9417                    input_per_million: 1.2f64,
9418                    output_per_million: 4f64,
9419                    cache_read_per_million: Some(0.24f64),
9420                    cache_write_per_million: Some(0f64),
9421                })
9422            }
9423            Self::Glm51 => {
9424                Some(ModelPricing {
9425                    input_per_million: 1.4f64,
9426                    output_per_million: 4.4f64,
9427                    cache_read_per_million: Some(0.26f64),
9428                    cache_write_per_million: Some(0f64),
9429                })
9430            }
9431            Self::Glm52 => {
9432                Some(ModelPricing {
9433                    input_per_million: 1.4f64,
9434                    output_per_million: 4.4f64,
9435                    cache_read_per_million: Some(0.26f64),
9436                    cache_write_per_million: Some(0f64),
9437                })
9438            }
9439            Self::Glm52Highspeed => {
9440                Some(ModelPricing {
9441                    input_per_million: 0f64,
9442                    output_per_million: 0f64,
9443                    cache_read_per_million: Some(0f64),
9444                    cache_write_per_million: Some(0f64),
9445                })
9446            }
9447            Self::Glm5vTurbo => {
9448                Some(ModelPricing {
9449                    input_per_million: 1.2f64,
9450                    output_per_million: 4f64,
9451                    cache_read_per_million: Some(0.24f64),
9452                    cache_write_per_million: Some(0f64),
9453                })
9454            }
9455        }
9456    }
9457    #[allow(clippy::too_many_lines)]
9458    pub fn supports_image(self) -> bool {
9459        match self {
9460            Self::Glm45
9461            | Self::Glm45Air
9462            | Self::Glm45Flash
9463            | Self::Glm46
9464            | Self::Glm47
9465            | Self::Glm47Flash
9466            | Self::Glm47Flashx
9467            | Self::Glm5
9468            | Self::Glm5Turbo
9469            | Self::Glm51
9470            | Self::Glm52
9471            | Self::Glm52Highspeed => false,
9472            Self::Glm45v | Self::Glm46v | Self::Glm5vTurbo => true,
9473        }
9474    }
9475    #[allow(clippy::too_many_lines)]
9476    pub fn supports_audio(self) -> bool {
9477        match self {
9478            Self::Glm45
9479            | Self::Glm45Air
9480            | Self::Glm45Flash
9481            | Self::Glm45v
9482            | Self::Glm46
9483            | Self::Glm46v
9484            | Self::Glm47
9485            | Self::Glm47Flash
9486            | Self::Glm47Flashx
9487            | Self::Glm5
9488            | Self::Glm5Turbo
9489            | Self::Glm51
9490            | Self::Glm52
9491            | Self::Glm52Highspeed
9492            | Self::Glm5vTurbo => false,
9493        }
9494    }
9495    #[allow(clippy::too_many_lines)]
9496    pub fn transport(self) -> Option<ModelTransport> {
9497        match self {
9498            Self::Glm45
9499            | Self::Glm45Air
9500            | Self::Glm45Flash
9501            | Self::Glm45v
9502            | Self::Glm46
9503            | Self::Glm46v
9504            | Self::Glm47
9505            | Self::Glm47Flash
9506            | Self::Glm47Flashx
9507            | Self::Glm5
9508            | Self::Glm5Turbo
9509            | Self::Glm51
9510            | Self::Glm52
9511            | Self::Glm52Highspeed
9512            | Self::Glm5vTurbo => None,
9513        }
9514    }
9515    const ALL: &[ZAiModel] = &[
9516        Self::Glm45,
9517        Self::Glm45Air,
9518        Self::Glm45Flash,
9519        Self::Glm45v,
9520        Self::Glm46,
9521        Self::Glm46v,
9522        Self::Glm47,
9523        Self::Glm47Flash,
9524        Self::Glm47Flashx,
9525        Self::Glm5,
9526        Self::Glm5Turbo,
9527        Self::Glm51,
9528        Self::Glm52,
9529        Self::Glm52Highspeed,
9530        Self::Glm5vTurbo,
9531    ];
9532}
9533impl std::str::FromStr for ZAiModel {
9534    type Err = String;
9535    #[allow(clippy::too_many_lines)]
9536    fn from_str(s: &str) -> Result<Self, Self::Err> {
9537        match s {
9538            "glm-4.5" => Ok(Self::Glm45),
9539            "glm-4.5-air" => Ok(Self::Glm45Air),
9540            "glm-4.5-flash" => Ok(Self::Glm45Flash),
9541            "glm-4.5v" => Ok(Self::Glm45v),
9542            "glm-4.6" => Ok(Self::Glm46),
9543            "glm-4.6v" => Ok(Self::Glm46v),
9544            "glm-4.7" => Ok(Self::Glm47),
9545            "glm-4.7-flash" => Ok(Self::Glm47Flash),
9546            "glm-4.7-flashx" => Ok(Self::Glm47Flashx),
9547            "glm-5" => Ok(Self::Glm5),
9548            "glm-5-turbo" => Ok(Self::Glm5Turbo),
9549            "glm-5.1" => Ok(Self::Glm51),
9550            "glm-5.2" => Ok(Self::Glm52),
9551            "glm-5.2-highspeed" => Ok(Self::Glm52Highspeed),
9552            "glm-5v-turbo" => Ok(Self::Glm5vTurbo),
9553            _ => Err(format!("Unknown zai model: '{s}'")),
9554        }
9555    }
9556}
9557impl BedrockFoundationModel {
9558    #[allow(clippy::too_many_lines)]
9559    fn model_id(self) -> &'static str {
9560        match self {
9561            Self::AmazonNova2LiteV10 => "amazon.nova-2-lite-v1:0",
9562            Self::AmazonNovaLiteV10 => "amazon.nova-lite-v1:0",
9563            Self::AmazonNovaMicroV10 => "amazon.nova-micro-v1:0",
9564            Self::AmazonNovaProV10 => "amazon.nova-pro-v1:0",
9565            Self::AnthropicClaudeFable5 => "anthropic.claude-fable-5",
9566            Self::AnthropicClaudeHaiku4520251001V10 => {
9567                "anthropic.claude-haiku-4-5-20251001-v1:0"
9568            }
9569            Self::AnthropicClaudeOpus4120250805V10 => {
9570                "anthropic.claude-opus-4-1-20250805-v1:0"
9571            }
9572            Self::AnthropicClaudeOpus4520251101V10 => {
9573                "anthropic.claude-opus-4-5-20251101-v1:0"
9574            }
9575            Self::AnthropicClaudeOpus46V1 => "anthropic.claude-opus-4-6-v1",
9576            Self::AnthropicClaudeOpus47 => "anthropic.claude-opus-4-7",
9577            Self::AnthropicClaudeOpus48 => "anthropic.claude-opus-4-8",
9578            Self::AnthropicClaudeOpus5 => "anthropic.claude-opus-5",
9579            Self::AnthropicClaudeSonnet4520250929V10 => {
9580                "anthropic.claude-sonnet-4-5-20250929-v1:0"
9581            }
9582            Self::AnthropicClaudeSonnet46 => "anthropic.claude-sonnet-4-6",
9583            Self::AnthropicClaudeSonnet5 => "anthropic.claude-sonnet-5",
9584            Self::AuAnthropicClaudeHaiku4520251001V10 => {
9585                "au.anthropic.claude-haiku-4-5-20251001-v1:0"
9586            }
9587            Self::AuAnthropicClaudeOpus46V1 => "au.anthropic.claude-opus-4-6-v1",
9588            Self::AuAnthropicClaudeOpus48 => "au.anthropic.claude-opus-4-8",
9589            Self::AuAnthropicClaudeOpus5 => "au.anthropic.claude-opus-5",
9590            Self::AuAnthropicClaudeSonnet4520250929V10 => {
9591                "au.anthropic.claude-sonnet-4-5-20250929-v1:0"
9592            }
9593            Self::AuAnthropicClaudeSonnet46 => "au.anthropic.claude-sonnet-4-6",
9594            Self::AuAnthropicClaudeSonnet5 => "au.anthropic.claude-sonnet-5",
9595            Self::DeepseekR1V10 => "deepseek.r1-v1:0",
9596            Self::DeepseekV3V10 => "deepseek.v3-v1:0",
9597            Self::DeepseekV32 => "deepseek.v3.2",
9598            Self::EuAnthropicClaudeFable5 => "eu.anthropic.claude-fable-5",
9599            Self::EuAnthropicClaudeHaiku4520251001V10 => {
9600                "eu.anthropic.claude-haiku-4-5-20251001-v1:0"
9601            }
9602            Self::EuAnthropicClaudeOpus4520251101V10 => {
9603                "eu.anthropic.claude-opus-4-5-20251101-v1:0"
9604            }
9605            Self::EuAnthropicClaudeOpus46V1 => "eu.anthropic.claude-opus-4-6-v1",
9606            Self::EuAnthropicClaudeOpus47 => "eu.anthropic.claude-opus-4-7",
9607            Self::EuAnthropicClaudeOpus48 => "eu.anthropic.claude-opus-4-8",
9608            Self::EuAnthropicClaudeOpus5 => "eu.anthropic.claude-opus-5",
9609            Self::EuAnthropicClaudeSonnet4520250929V10 => {
9610                "eu.anthropic.claude-sonnet-4-5-20250929-v1:0"
9611            }
9612            Self::EuAnthropicClaudeSonnet46 => "eu.anthropic.claude-sonnet-4-6",
9613            Self::EuAnthropicClaudeSonnet5 => "eu.anthropic.claude-sonnet-5",
9614            Self::GlobalAnthropicClaudeFable5 => "global.anthropic.claude-fable-5",
9615            Self::GlobalAnthropicClaudeHaiku4520251001V10 => {
9616                "global.anthropic.claude-haiku-4-5-20251001-v1:0"
9617            }
9618            Self::GlobalAnthropicClaudeOpus4520251101V10 => {
9619                "global.anthropic.claude-opus-4-5-20251101-v1:0"
9620            }
9621            Self::GlobalAnthropicClaudeOpus46V1 => "global.anthropic.claude-opus-4-6-v1",
9622            Self::GlobalAnthropicClaudeOpus47 => "global.anthropic.claude-opus-4-7",
9623            Self::GlobalAnthropicClaudeOpus48 => "global.anthropic.claude-opus-4-8",
9624            Self::GlobalAnthropicClaudeOpus5 => "global.anthropic.claude-opus-5",
9625            Self::GlobalAnthropicClaudeSonnet4520250929V10 => {
9626                "global.anthropic.claude-sonnet-4-5-20250929-v1:0"
9627            }
9628            Self::GlobalAnthropicClaudeSonnet46 => "global.anthropic.claude-sonnet-4-6",
9629            Self::GlobalAnthropicClaudeSonnet5 => "global.anthropic.claude-sonnet-5",
9630            Self::GoogleGemma327bIt => "google.gemma-3-27b-it",
9631            Self::GoogleGemma34bIt => "google.gemma-3-4b-it",
9632            Self::JpAnthropicClaudeHaiku4520251001V10 => {
9633                "jp.anthropic.claude-haiku-4-5-20251001-v1:0"
9634            }
9635            Self::JpAnthropicClaudeOpus47 => "jp.anthropic.claude-opus-4-7",
9636            Self::JpAnthropicClaudeOpus48 => "jp.anthropic.claude-opus-4-8",
9637            Self::JpAnthropicClaudeOpus5 => "jp.anthropic.claude-opus-5",
9638            Self::JpAnthropicClaudeSonnet4520250929V10 => {
9639                "jp.anthropic.claude-sonnet-4-5-20250929-v1:0"
9640            }
9641            Self::JpAnthropicClaudeSonnet46 => "jp.anthropic.claude-sonnet-4-6",
9642            Self::JpAnthropicClaudeSonnet5 => "jp.anthropic.claude-sonnet-5",
9643            Self::MetaLlama3170bInstructV10 => "meta.llama3-1-70b-instruct-v1:0",
9644            Self::MetaLlama318bInstructV10 => "meta.llama3-1-8b-instruct-v1:0",
9645            Self::MetaLlama3370bInstructV10 => "meta.llama3-3-70b-instruct-v1:0",
9646            Self::MetaLlama4Maverick17bInstructV10 => {
9647                "meta.llama4-maverick-17b-instruct-v1:0"
9648            }
9649            Self::MetaLlama4Scout17bInstructV10 => "meta.llama4-scout-17b-instruct-v1:0",
9650            Self::MinimaxMinimaxM2 => "minimax.minimax-m2",
9651            Self::MinimaxMinimaxM21 => "minimax.minimax-m2.1",
9652            Self::MinimaxMinimaxM25 => "minimax.minimax-m2.5",
9653            Self::MistralDevstral2123b => "mistral.devstral-2-123b",
9654            Self::MistralMagistralSmall2509 => "mistral.magistral-small-2509",
9655            Self::MistralMinistral314bInstruct => "mistral.ministral-3-14b-instruct",
9656            Self::MistralMinistral33bInstruct => "mistral.ministral-3-3b-instruct",
9657            Self::MistralMinistral38bInstruct => "mistral.ministral-3-8b-instruct",
9658            Self::MistralMistralLarge3675bInstruct => {
9659                "mistral.mistral-large-3-675b-instruct"
9660            }
9661            Self::MistralPixtralLarge2502V10 => "mistral.pixtral-large-2502-v1:0",
9662            Self::MistralVoxtralMini3b2507 => "mistral.voxtral-mini-3b-2507",
9663            Self::MistralVoxtralSmall24b2507 => "mistral.voxtral-small-24b-2507",
9664            Self::MoonshotKimiK2Thinking => "moonshot.kimi-k2-thinking",
9665            Self::MoonshotaiKimiK25 => "moonshotai.kimi-k2.5",
9666            Self::NvidiaNemotronNano12bV2 => "nvidia.nemotron-nano-12b-v2",
9667            Self::NvidiaNemotronNano330b => "nvidia.nemotron-nano-3-30b",
9668            Self::NvidiaNemotronNano9bV2 => "nvidia.nemotron-nano-9b-v2",
9669            Self::NvidiaNemotronSuper3120b => "nvidia.nemotron-super-3-120b",
9670            Self::OpenaiGpt54 => "openai.gpt-5.4",
9671            Self::OpenaiGpt55 => "openai.gpt-5.5",
9672            Self::OpenaiGpt56Luna => "openai.gpt-5.6-luna",
9673            Self::OpenaiGpt56Sol => "openai.gpt-5.6-sol",
9674            Self::OpenaiGpt56Terra => "openai.gpt-5.6-terra",
9675            Self::OpenaiGptOss120b => "openai.gpt-oss-120b",
9676            Self::OpenaiGptOss120b10 => "openai.gpt-oss-120b-1:0",
9677            Self::OpenaiGptOss20b => "openai.gpt-oss-20b",
9678            Self::OpenaiGptOss20b10 => "openai.gpt-oss-20b-1:0",
9679            Self::OpenaiGptOssSafeguard120b => "openai.gpt-oss-safeguard-120b",
9680            Self::OpenaiGptOssSafeguard20b => "openai.gpt-oss-safeguard-20b",
9681            Self::QwenQwen3235bA22b2507V10 => "qwen.qwen3-235b-a22b-2507-v1:0",
9682            Self::QwenQwen332bV10 => "qwen.qwen3-32b-v1:0",
9683            Self::QwenQwen3Coder30bA3bV10 => "qwen.qwen3-coder-30b-a3b-v1:0",
9684            Self::QwenQwen3Coder480bA35bV10 => "qwen.qwen3-coder-480b-a35b-v1:0",
9685            Self::QwenQwen3CoderNext => "qwen.qwen3-coder-next",
9686            Self::QwenQwen3Next80bA3b => "qwen.qwen3-next-80b-a3b",
9687            Self::QwenQwen3Vl235bA22b => "qwen.qwen3-vl-235b-a22b",
9688            Self::UsAnthropicClaudeFable5 => "us.anthropic.claude-fable-5",
9689            Self::UsAnthropicClaudeHaiku4520251001V10 => {
9690                "us.anthropic.claude-haiku-4-5-20251001-v1:0"
9691            }
9692            Self::UsAnthropicClaudeOpus4120250805V10 => {
9693                "us.anthropic.claude-opus-4-1-20250805-v1:0"
9694            }
9695            Self::UsAnthropicClaudeOpus4520251101V10 => {
9696                "us.anthropic.claude-opus-4-5-20251101-v1:0"
9697            }
9698            Self::UsAnthropicClaudeOpus46V1 => "us.anthropic.claude-opus-4-6-v1",
9699            Self::UsAnthropicClaudeOpus47 => "us.anthropic.claude-opus-4-7",
9700            Self::UsAnthropicClaudeOpus48 => "us.anthropic.claude-opus-4-8",
9701            Self::UsAnthropicClaudeOpus5 => "us.anthropic.claude-opus-5",
9702            Self::UsAnthropicClaudeSonnet4520250929V10 => {
9703                "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
9704            }
9705            Self::UsAnthropicClaudeSonnet46 => "us.anthropic.claude-sonnet-4-6",
9706            Self::UsAnthropicClaudeSonnet5 => "us.anthropic.claude-sonnet-5",
9707            Self::UsDeepseekR1V10 => "us.deepseek.r1-v1:0",
9708            Self::UsMetaLlama4Maverick17bInstructV10 => {
9709                "us.meta.llama4-maverick-17b-instruct-v1:0"
9710            }
9711            Self::UsMetaLlama4Scout17bInstructV10 => {
9712                "us.meta.llama4-scout-17b-instruct-v1:0"
9713            }
9714            Self::WriterPalmyraX4V10 => "writer.palmyra-x4-v1:0",
9715            Self::WriterPalmyraX5V10 => "writer.palmyra-x5-v1:0",
9716            Self::XaiGrok43 => "xai.grok-4.3",
9717            Self::ZaiGlm47 => "zai.glm-4.7",
9718            Self::ZaiGlm47Flash => "zai.glm-4.7-flash",
9719            Self::ZaiGlm5 => "zai.glm-5",
9720        }
9721    }
9722    #[allow(clippy::too_many_lines)]
9723    fn display_name(self) -> &'static str {
9724        match self {
9725            Self::AuAnthropicClaudeOpus46V1 => "AU Anthropic Claude Opus 4.6",
9726            Self::AuAnthropicClaudeSonnet46 => "AU Anthropic Claude Sonnet 4.6",
9727            Self::AnthropicClaudeFable5 => "Claude Fable 5",
9728            Self::EuAnthropicClaudeFable5 => "Claude Fable 5 (EU)",
9729            Self::GlobalAnthropicClaudeFable5 => "Claude Fable 5 (Global)",
9730            Self::UsAnthropicClaudeFable5 => "Claude Fable 5 (US)",
9731            Self::AnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5",
9732            Self::AuAnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5 (AU)",
9733            Self::EuAnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5 (EU)",
9734            Self::GlobalAnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5 (Global)",
9735            Self::JpAnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5 (JP)",
9736            Self::UsAnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5 (US)",
9737            Self::AnthropicClaudeOpus4120250805V10 => "Claude Opus 4.1",
9738            Self::UsAnthropicClaudeOpus4120250805V10 => "Claude Opus 4.1 (US)",
9739            Self::AnthropicClaudeOpus4520251101V10 => "Claude Opus 4.5",
9740            Self::EuAnthropicClaudeOpus4520251101V10 => "Claude Opus 4.5 (EU)",
9741            Self::GlobalAnthropicClaudeOpus4520251101V10 => "Claude Opus 4.5 (Global)",
9742            Self::UsAnthropicClaudeOpus4520251101V10 => "Claude Opus 4.5 (US)",
9743            Self::AnthropicClaudeOpus46V1 => "Claude Opus 4.6",
9744            Self::EuAnthropicClaudeOpus46V1 => "Claude Opus 4.6 (EU)",
9745            Self::GlobalAnthropicClaudeOpus46V1 => "Claude Opus 4.6 (Global)",
9746            Self::UsAnthropicClaudeOpus46V1 => "Claude Opus 4.6 (US)",
9747            Self::AnthropicClaudeOpus47 => "Claude Opus 4.7",
9748            Self::EuAnthropicClaudeOpus47 => "Claude Opus 4.7 (EU)",
9749            Self::GlobalAnthropicClaudeOpus47 => "Claude Opus 4.7 (Global)",
9750            Self::JpAnthropicClaudeOpus47 => "Claude Opus 4.7 (JP)",
9751            Self::UsAnthropicClaudeOpus47 => "Claude Opus 4.7 (US)",
9752            Self::AnthropicClaudeOpus48 => "Claude Opus 4.8",
9753            Self::AuAnthropicClaudeOpus48 => "Claude Opus 4.8 (AU)",
9754            Self::EuAnthropicClaudeOpus48 => "Claude Opus 4.8 (EU)",
9755            Self::GlobalAnthropicClaudeOpus48 => "Claude Opus 4.8 (Global)",
9756            Self::JpAnthropicClaudeOpus48 => "Claude Opus 4.8 (JP)",
9757            Self::UsAnthropicClaudeOpus48 => "Claude Opus 4.8 (US)",
9758            Self::AnthropicClaudeOpus5 => "Claude Opus 5",
9759            Self::AuAnthropicClaudeOpus5 => "Claude Opus 5 (AU)",
9760            Self::EuAnthropicClaudeOpus5 => "Claude Opus 5 (EU)",
9761            Self::GlobalAnthropicClaudeOpus5 => "Claude Opus 5 (Global)",
9762            Self::JpAnthropicClaudeOpus5 => "Claude Opus 5 (JP)",
9763            Self::UsAnthropicClaudeOpus5 => "Claude Opus 5 (US)",
9764            Self::AnthropicClaudeSonnet4520250929V10 => "Claude Sonnet 4.5",
9765            Self::AuAnthropicClaudeSonnet4520250929V10 => "Claude Sonnet 4.5 (AU)",
9766            Self::EuAnthropicClaudeSonnet4520250929V10 => "Claude Sonnet 4.5 (EU)",
9767            Self::GlobalAnthropicClaudeSonnet4520250929V10 => {
9768                "Claude Sonnet 4.5 (Global)"
9769            }
9770            Self::JpAnthropicClaudeSonnet4520250929V10 => "Claude Sonnet 4.5 (JP)",
9771            Self::UsAnthropicClaudeSonnet4520250929V10 => "Claude Sonnet 4.5 (US)",
9772            Self::AnthropicClaudeSonnet46 => "Claude Sonnet 4.6",
9773            Self::EuAnthropicClaudeSonnet46 => "Claude Sonnet 4.6 (EU)",
9774            Self::GlobalAnthropicClaudeSonnet46 => "Claude Sonnet 4.6 (Global)",
9775            Self::JpAnthropicClaudeSonnet46 => "Claude Sonnet 4.6 (JP)",
9776            Self::UsAnthropicClaudeSonnet46 => "Claude Sonnet 4.6 (US)",
9777            Self::AnthropicClaudeSonnet5 => "Claude Sonnet 5",
9778            Self::AuAnthropicClaudeSonnet5 => "Claude Sonnet 5 (AU)",
9779            Self::EuAnthropicClaudeSonnet5 => "Claude Sonnet 5 (EU)",
9780            Self::GlobalAnthropicClaudeSonnet5 => "Claude Sonnet 5 (Global)",
9781            Self::JpAnthropicClaudeSonnet5 => "Claude Sonnet 5 (JP)",
9782            Self::UsAnthropicClaudeSonnet5 => "Claude Sonnet 5 (US)",
9783            Self::DeepseekR1V10 => "DeepSeek-R1",
9784            Self::UsDeepseekR1V10 => "DeepSeek-R1 (US)",
9785            Self::DeepseekV3V10 => "DeepSeek-V3.1",
9786            Self::DeepseekV32 => "DeepSeek-V3.2",
9787            Self::MistralDevstral2123b => "Devstral 2 123B",
9788            Self::ZaiGlm47 => "GLM-4.7",
9789            Self::ZaiGlm47Flash => "GLM-4.7-Flash",
9790            Self::ZaiGlm5 => "GLM-5",
9791            Self::OpenaiGptOssSafeguard120b => "GPT OSS Safeguard 120B",
9792            Self::OpenaiGptOssSafeguard20b => "GPT OSS Safeguard 20B",
9793            Self::OpenaiGpt54 => "GPT-5.4",
9794            Self::OpenaiGpt55 => "GPT-5.5",
9795            Self::OpenaiGpt56Luna => "GPT-5.6 Luna",
9796            Self::OpenaiGpt56Sol => "GPT-5.6 Sol",
9797            Self::OpenaiGpt56Terra => "GPT-5.6 Terra",
9798            Self::GoogleGemma34bIt => "Gemma 3 4B IT",
9799            Self::GoogleGemma327bIt => "Google Gemma 3 27B Instruct",
9800            Self::XaiGrok43 => "Grok 4.3",
9801            Self::MoonshotKimiK2Thinking => "Kimi K2 Thinking",
9802            Self::MoonshotaiKimiK25 => "Kimi K2.5",
9803            Self::MetaLlama3170bInstructV10 => "Llama 3.1 70B Instruct",
9804            Self::MetaLlama318bInstructV10 => "Llama 3.1 8B Instruct",
9805            Self::MetaLlama3370bInstructV10 => "Llama 3.3 70B Instruct",
9806            Self::MetaLlama4Maverick17bInstructV10 => "Llama 4 Maverick 17B Instruct",
9807            Self::UsMetaLlama4Maverick17bInstructV10 => {
9808                "Llama 4 Maverick 17B Instruct (US)"
9809            }
9810            Self::MetaLlama4Scout17bInstructV10 => "Llama 4 Scout 17B Instruct",
9811            Self::UsMetaLlama4Scout17bInstructV10 => "Llama 4 Scout 17B Instruct (US)",
9812            Self::MistralMagistralSmall2509 => "Magistral Small 1.2",
9813            Self::MinimaxMinimaxM2 => "MiniMax M2",
9814            Self::MinimaxMinimaxM21 => "MiniMax M2.1",
9815            Self::MinimaxMinimaxM25 => "MiniMax M2.5",
9816            Self::MistralMinistral314bInstruct => "Ministral 14B 3.0",
9817            Self::MistralMinistral33bInstruct => "Ministral 3 3B",
9818            Self::MistralMinistral38bInstruct => "Ministral 3 8B",
9819            Self::MistralMistralLarge3675bInstruct => "Mistral Large 3",
9820            Self::NvidiaNemotronSuper3120b => "NVIDIA Nemotron 3 Super 120B A12B",
9821            Self::NvidiaNemotronNano12bV2 => "NVIDIA Nemotron Nano 12B v2 VL BF16",
9822            Self::NvidiaNemotronNano330b => "NVIDIA Nemotron Nano 3 30B",
9823            Self::NvidiaNemotronNano9bV2 => "NVIDIA Nemotron Nano 9B v2",
9824            Self::AmazonNova2LiteV10 => "Nova 2 Lite",
9825            Self::AmazonNovaLiteV10 => "Nova Lite",
9826            Self::AmazonNovaMicroV10 => "Nova Micro",
9827            Self::AmazonNovaProV10 => "Nova Pro",
9828            Self::WriterPalmyraX4V10 => "Palmyra X4",
9829            Self::WriterPalmyraX5V10 => "Palmyra X5",
9830            Self::MistralPixtralLarge2502V10 => "Pixtral Large (25.02)",
9831            Self::QwenQwen3Next80bA3b => "Qwen/Qwen3-Next-80B-A3B-Instruct",
9832            Self::QwenQwen3Vl235bA22b => "Qwen/Qwen3-VL-235B-A22B-Instruct",
9833            Self::QwenQwen3235bA22b2507V10 => "Qwen3 235B A22B 2507",
9834            Self::QwenQwen332bV10 => "Qwen3 32B (dense)",
9835            Self::QwenQwen3Coder30bA3bV10 => "Qwen3 Coder 30B A3B Instruct",
9836            Self::QwenQwen3Coder480bA35bV10 => "Qwen3 Coder 480B A35B Instruct",
9837            Self::QwenQwen3CoderNext => "Qwen3 Coder Next",
9838            Self::MistralVoxtralMini3b2507 => "Voxtral Mini 3B 2507",
9839            Self::MistralVoxtralSmall24b2507 => "Voxtral Small 24B 2507",
9840            Self::OpenaiGptOss120b | Self::OpenaiGptOss120b10 => "gpt-oss-120b",
9841            Self::OpenaiGptOss20b | Self::OpenaiGptOss20b10 => "gpt-oss-20b",
9842        }
9843    }
9844    #[allow(clippy::too_many_lines)]
9845    fn context_window(self) -> u32 {
9846        match self {
9847            Self::QwenQwen332bV10 => 16_384,
9848            Self::MistralVoxtralSmall24b2507 => 32_000,
9849            Self::WriterPalmyraX4V10 => 122_880,
9850            Self::AmazonNova2LiteV10
9851            | Self::AmazonNovaMicroV10
9852            | Self::DeepseekR1V10
9853            | Self::GoogleGemma34bIt
9854            | Self::MetaLlama3170bInstructV10
9855            | Self::MetaLlama318bInstructV10
9856            | Self::MetaLlama3370bInstructV10
9857            | Self::MistralMagistralSmall2509
9858            | Self::MistralMinistral314bInstruct
9859            | Self::MistralMinistral38bInstruct
9860            | Self::MistralPixtralLarge2502V10
9861            | Self::MistralVoxtralMini3b2507
9862            | Self::NvidiaNemotronNano12bV2
9863            | Self::NvidiaNemotronNano330b
9864            | Self::NvidiaNemotronNano9bV2
9865            | Self::OpenaiGptOss120b
9866            | Self::OpenaiGptOss120b10
9867            | Self::OpenaiGptOss20b
9868            | Self::OpenaiGptOss20b10
9869            | Self::OpenaiGptOssSafeguard120b
9870            | Self::OpenaiGptOssSafeguard20b
9871            | Self::UsDeepseekR1V10 => 128_000,
9872            Self::QwenQwen3Coder480bA35bV10 | Self::QwenQwen3CoderNext => 131_072,
9873            Self::DeepseekV3V10 | Self::DeepseekV32 => 163_840,
9874            Self::MinimaxMinimaxM25 => 196_608,
9875            Self::AnthropicClaudeHaiku4520251001V10
9876            | Self::AnthropicClaudeOpus4120250805V10
9877            | Self::AnthropicClaudeOpus4520251101V10
9878            | Self::AnthropicClaudeSonnet4520250929V10
9879            | Self::AuAnthropicClaudeHaiku4520251001V10
9880            | Self::AuAnthropicClaudeSonnet4520250929V10
9881            | Self::EuAnthropicClaudeHaiku4520251001V10
9882            | Self::EuAnthropicClaudeOpus4520251101V10
9883            | Self::EuAnthropicClaudeSonnet4520250929V10
9884            | Self::GlobalAnthropicClaudeHaiku4520251001V10
9885            | Self::GlobalAnthropicClaudeOpus4520251101V10
9886            | Self::GlobalAnthropicClaudeSonnet4520250929V10
9887            | Self::JpAnthropicClaudeHaiku4520251001V10
9888            | Self::JpAnthropicClaudeSonnet4520250929V10
9889            | Self::UsAnthropicClaudeHaiku4520251001V10
9890            | Self::UsAnthropicClaudeOpus4120250805V10
9891            | Self::UsAnthropicClaudeOpus4520251101V10
9892            | Self::UsAnthropicClaudeSonnet4520250929V10
9893            | Self::ZaiGlm47Flash => 200_000,
9894            Self::GoogleGemma327bIt | Self::ZaiGlm5 => 202_752,
9895            Self::MinimaxMinimaxM2 => 204_608,
9896            Self::MinimaxMinimaxM21 | Self::ZaiGlm47 => 204_800,
9897            Self::MistralDevstral2123b
9898            | Self::MistralMinistral33bInstruct
9899            | Self::MistralMistralLarge3675bInstruct => 256_000,
9900            Self::QwenQwen3Next80bA3b | Self::QwenQwen3Vl235bA22b => 262_000,
9901            Self::MoonshotKimiK2Thinking | Self::MoonshotaiKimiK25 => 262_143,
9902            Self::NvidiaNemotronSuper3120b
9903            | Self::QwenQwen3235bA22b2507V10
9904            | Self::QwenQwen3Coder30bA3bV10 => 262_144,
9905            Self::OpenaiGpt54
9906            | Self::OpenaiGpt55
9907            | Self::OpenaiGpt56Luna
9908            | Self::OpenaiGpt56Sol
9909            | Self::OpenaiGpt56Terra => 272_000,
9910            Self::AmazonNovaLiteV10 | Self::AmazonNovaProV10 => 300_000,
9911            Self::AnthropicClaudeFable5
9912            | Self::AnthropicClaudeOpus46V1
9913            | Self::AnthropicClaudeOpus47
9914            | Self::AnthropicClaudeOpus48
9915            | Self::AnthropicClaudeOpus5
9916            | Self::AnthropicClaudeSonnet46
9917            | Self::AnthropicClaudeSonnet5
9918            | Self::AuAnthropicClaudeOpus46V1
9919            | Self::AuAnthropicClaudeOpus48
9920            | Self::AuAnthropicClaudeOpus5
9921            | Self::AuAnthropicClaudeSonnet46
9922            | Self::AuAnthropicClaudeSonnet5
9923            | Self::EuAnthropicClaudeFable5
9924            | Self::EuAnthropicClaudeOpus46V1
9925            | Self::EuAnthropicClaudeOpus47
9926            | Self::EuAnthropicClaudeOpus48
9927            | Self::EuAnthropicClaudeOpus5
9928            | Self::EuAnthropicClaudeSonnet46
9929            | Self::EuAnthropicClaudeSonnet5
9930            | Self::GlobalAnthropicClaudeFable5
9931            | Self::GlobalAnthropicClaudeOpus46V1
9932            | Self::GlobalAnthropicClaudeOpus47
9933            | Self::GlobalAnthropicClaudeOpus48
9934            | Self::GlobalAnthropicClaudeOpus5
9935            | Self::GlobalAnthropicClaudeSonnet46
9936            | Self::GlobalAnthropicClaudeSonnet5
9937            | Self::JpAnthropicClaudeOpus47
9938            | Self::JpAnthropicClaudeOpus48
9939            | Self::JpAnthropicClaudeOpus5
9940            | Self::JpAnthropicClaudeSonnet46
9941            | Self::JpAnthropicClaudeSonnet5
9942            | Self::MetaLlama4Maverick17bInstructV10
9943            | Self::UsAnthropicClaudeFable5
9944            | Self::UsAnthropicClaudeOpus46V1
9945            | Self::UsAnthropicClaudeOpus47
9946            | Self::UsAnthropicClaudeOpus48
9947            | Self::UsAnthropicClaudeOpus5
9948            | Self::UsAnthropicClaudeSonnet46
9949            | Self::UsAnthropicClaudeSonnet5
9950            | Self::UsMetaLlama4Maverick17bInstructV10
9951            | Self::XaiGrok43 => 1_000_000,
9952            Self::WriterPalmyraX5V10 => 1_040_000,
9953            Self::MetaLlama4Scout17bInstructV10
9954            | Self::UsMetaLlama4Scout17bInstructV10 => 3_500_000,
9955        }
9956    }
9957    #[allow(clippy::too_many_lines)]
9958    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
9959        match self {
9960            Self::AmazonNovaLiteV10
9961            | Self::AmazonNovaMicroV10
9962            | Self::AmazonNovaProV10
9963            | Self::GoogleGemma327bIt
9964            | Self::GoogleGemma34bIt
9965            | Self::MetaLlama3170bInstructV10
9966            | Self::MetaLlama318bInstructV10
9967            | Self::MetaLlama3370bInstructV10
9968            | Self::MetaLlama4Maverick17bInstructV10
9969            | Self::MetaLlama4Scout17bInstructV10
9970            | Self::MistralDevstral2123b
9971            | Self::MistralMinistral314bInstruct
9972            | Self::MistralMinistral33bInstruct
9973            | Self::MistralMinistral38bInstruct
9974            | Self::MistralMistralLarge3675bInstruct
9975            | Self::MistralPixtralLarge2502V10
9976            | Self::MistralVoxtralMini3b2507
9977            | Self::MistralVoxtralSmall24b2507
9978            | Self::NvidiaNemotronNano12bV2
9979            | Self::NvidiaNemotronNano9bV2
9980            | Self::OpenaiGptOssSafeguard120b
9981            | Self::OpenaiGptOssSafeguard20b
9982            | Self::QwenQwen3235bA22b2507V10
9983            | Self::QwenQwen3Coder30bA3bV10
9984            | Self::QwenQwen3Coder480bA35bV10
9985            | Self::QwenQwen3Next80bA3b
9986            | Self::QwenQwen3Vl235bA22b
9987            | Self::UsMetaLlama4Maverick17bInstructV10
9988            | Self::UsMetaLlama4Scout17bInstructV10 => &[],
9989            Self::AmazonNova2LiteV10
9990            | Self::AnthropicClaudeHaiku4520251001V10
9991            | Self::AnthropicClaudeOpus4120250805V10
9992            | Self::AnthropicClaudeOpus4520251101V10
9993            | Self::AnthropicClaudeSonnet4520250929V10
9994            | Self::AuAnthropicClaudeHaiku4520251001V10
9995            | Self::AuAnthropicClaudeSonnet4520250929V10
9996            | Self::DeepseekR1V10
9997            | Self::DeepseekV3V10
9998            | Self::DeepseekV32
9999            | Self::EuAnthropicClaudeHaiku4520251001V10
10000            | Self::EuAnthropicClaudeOpus4520251101V10
10001            | Self::EuAnthropicClaudeSonnet4520250929V10
10002            | Self::GlobalAnthropicClaudeHaiku4520251001V10
10003            | Self::GlobalAnthropicClaudeOpus4520251101V10
10004            | Self::GlobalAnthropicClaudeSonnet4520250929V10
10005            | Self::JpAnthropicClaudeHaiku4520251001V10
10006            | Self::JpAnthropicClaudeSonnet4520250929V10
10007            | Self::MinimaxMinimaxM2
10008            | Self::MinimaxMinimaxM21
10009            | Self::MinimaxMinimaxM25
10010            | Self::MistralMagistralSmall2509
10011            | Self::MoonshotKimiK2Thinking
10012            | Self::MoonshotaiKimiK25
10013            | Self::NvidiaNemotronNano330b
10014            | Self::NvidiaNemotronSuper3120b
10015            | Self::OpenaiGptOss120b
10016            | Self::OpenaiGptOss120b10
10017            | Self::OpenaiGptOss20b
10018            | Self::OpenaiGptOss20b10
10019            | Self::QwenQwen332bV10
10020            | Self::QwenQwen3CoderNext
10021            | Self::UsAnthropicClaudeHaiku4520251001V10
10022            | Self::UsAnthropicClaudeOpus4120250805V10
10023            | Self::UsAnthropicClaudeOpus4520251101V10
10024            | Self::UsAnthropicClaudeSonnet4520250929V10
10025            | Self::UsDeepseekR1V10
10026            | Self::WriterPalmyraX4V10
10027            | Self::WriterPalmyraX5V10
10028            | Self::XaiGrok43
10029            | Self::ZaiGlm47
10030            | Self::ZaiGlm47Flash
10031            | Self::ZaiGlm5 => {
10032                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
10033            }
10034            Self::AnthropicClaudeOpus46V1
10035            | Self::AnthropicClaudeSonnet46
10036            | Self::AuAnthropicClaudeOpus46V1
10037            | Self::AuAnthropicClaudeSonnet46
10038            | Self::EuAnthropicClaudeOpus46V1
10039            | Self::EuAnthropicClaudeSonnet46
10040            | Self::GlobalAnthropicClaudeOpus46V1
10041            | Self::GlobalAnthropicClaudeSonnet46
10042            | Self::JpAnthropicClaudeSonnet46
10043            | Self::UsAnthropicClaudeOpus46V1
10044            | Self::UsAnthropicClaudeSonnet46 => {
10045                &[
10046                    ReasoningEffort::Low,
10047                    ReasoningEffort::Medium,
10048                    ReasoningEffort::High,
10049                    ReasoningEffort::Max,
10050                ]
10051            }
10052            Self::OpenaiGpt54 | Self::OpenaiGpt55 => {
10053                &[
10054                    ReasoningEffort::Low,
10055                    ReasoningEffort::Medium,
10056                    ReasoningEffort::High,
10057                    ReasoningEffort::Xhigh,
10058                ]
10059            }
10060            Self::AnthropicClaudeFable5
10061            | Self::AnthropicClaudeOpus47
10062            | Self::AnthropicClaudeOpus48
10063            | Self::AnthropicClaudeOpus5
10064            | Self::AnthropicClaudeSonnet5
10065            | Self::AuAnthropicClaudeOpus48
10066            | Self::AuAnthropicClaudeOpus5
10067            | Self::AuAnthropicClaudeSonnet5
10068            | Self::EuAnthropicClaudeFable5
10069            | Self::EuAnthropicClaudeOpus47
10070            | Self::EuAnthropicClaudeOpus48
10071            | Self::EuAnthropicClaudeOpus5
10072            | Self::EuAnthropicClaudeSonnet5
10073            | Self::GlobalAnthropicClaudeFable5
10074            | Self::GlobalAnthropicClaudeOpus47
10075            | Self::GlobalAnthropicClaudeOpus48
10076            | Self::GlobalAnthropicClaudeOpus5
10077            | Self::GlobalAnthropicClaudeSonnet5
10078            | Self::JpAnthropicClaudeOpus47
10079            | Self::JpAnthropicClaudeOpus48
10080            | Self::JpAnthropicClaudeOpus5
10081            | Self::JpAnthropicClaudeSonnet5
10082            | Self::OpenaiGpt56Luna
10083            | Self::OpenaiGpt56Sol
10084            | Self::OpenaiGpt56Terra
10085            | Self::UsAnthropicClaudeFable5
10086            | Self::UsAnthropicClaudeOpus47
10087            | Self::UsAnthropicClaudeOpus48
10088            | Self::UsAnthropicClaudeOpus5
10089            | Self::UsAnthropicClaudeSonnet5 => {
10090                &[
10091                    ReasoningEffort::Low,
10092                    ReasoningEffort::Medium,
10093                    ReasoningEffort::High,
10094                    ReasoningEffort::Xhigh,
10095                    ReasoningEffort::Max,
10096                ]
10097            }
10098        }
10099    }
10100    pub fn supports_reasoning(self) -> bool {
10101        !self.reasoning_levels().is_empty()
10102    }
10103    #[allow(clippy::too_many_lines)]
10104    pub fn supports_prompt_caching(self) -> bool {
10105        match self {
10106            Self::AmazonNova2LiteV10
10107            | Self::DeepseekR1V10
10108            | Self::DeepseekV3V10
10109            | Self::DeepseekV32
10110            | Self::GoogleGemma327bIt
10111            | Self::GoogleGemma34bIt
10112            | Self::MetaLlama3170bInstructV10
10113            | Self::MetaLlama318bInstructV10
10114            | Self::MetaLlama3370bInstructV10
10115            | Self::MetaLlama4Maverick17bInstructV10
10116            | Self::MetaLlama4Scout17bInstructV10
10117            | Self::MinimaxMinimaxM2
10118            | Self::MinimaxMinimaxM21
10119            | Self::MinimaxMinimaxM25
10120            | Self::MistralDevstral2123b
10121            | Self::MistralMagistralSmall2509
10122            | Self::MistralMinistral314bInstruct
10123            | Self::MistralMinistral33bInstruct
10124            | Self::MistralMinistral38bInstruct
10125            | Self::MistralMistralLarge3675bInstruct
10126            | Self::MistralPixtralLarge2502V10
10127            | Self::MistralVoxtralMini3b2507
10128            | Self::MistralVoxtralSmall24b2507
10129            | Self::MoonshotKimiK2Thinking
10130            | Self::MoonshotaiKimiK25
10131            | Self::NvidiaNemotronNano12bV2
10132            | Self::NvidiaNemotronNano330b
10133            | Self::NvidiaNemotronNano9bV2
10134            | Self::NvidiaNemotronSuper3120b
10135            | Self::OpenaiGptOss120b
10136            | Self::OpenaiGptOss120b10
10137            | Self::OpenaiGptOss20b
10138            | Self::OpenaiGptOss20b10
10139            | Self::OpenaiGptOssSafeguard120b
10140            | Self::OpenaiGptOssSafeguard20b
10141            | Self::QwenQwen3235bA22b2507V10
10142            | Self::QwenQwen332bV10
10143            | Self::QwenQwen3Coder30bA3bV10
10144            | Self::QwenQwen3Coder480bA35bV10
10145            | Self::QwenQwen3CoderNext
10146            | Self::QwenQwen3Next80bA3b
10147            | Self::QwenQwen3Vl235bA22b
10148            | Self::UsDeepseekR1V10
10149            | Self::UsMetaLlama4Maverick17bInstructV10
10150            | Self::UsMetaLlama4Scout17bInstructV10
10151            | Self::WriterPalmyraX4V10
10152            | Self::WriterPalmyraX5V10
10153            | Self::ZaiGlm47
10154            | Self::ZaiGlm47Flash
10155            | Self::ZaiGlm5 => false,
10156            Self::AmazonNovaLiteV10
10157            | Self::AmazonNovaMicroV10
10158            | Self::AmazonNovaProV10
10159            | Self::AnthropicClaudeFable5
10160            | Self::AnthropicClaudeHaiku4520251001V10
10161            | Self::AnthropicClaudeOpus4120250805V10
10162            | Self::AnthropicClaudeOpus4520251101V10
10163            | Self::AnthropicClaudeOpus46V1
10164            | Self::AnthropicClaudeOpus47
10165            | Self::AnthropicClaudeOpus48
10166            | Self::AnthropicClaudeOpus5
10167            | Self::AnthropicClaudeSonnet4520250929V10
10168            | Self::AnthropicClaudeSonnet46
10169            | Self::AnthropicClaudeSonnet5
10170            | Self::AuAnthropicClaudeHaiku4520251001V10
10171            | Self::AuAnthropicClaudeOpus46V1
10172            | Self::AuAnthropicClaudeOpus48
10173            | Self::AuAnthropicClaudeOpus5
10174            | Self::AuAnthropicClaudeSonnet4520250929V10
10175            | Self::AuAnthropicClaudeSonnet46
10176            | Self::AuAnthropicClaudeSonnet5
10177            | Self::EuAnthropicClaudeFable5
10178            | Self::EuAnthropicClaudeHaiku4520251001V10
10179            | Self::EuAnthropicClaudeOpus4520251101V10
10180            | Self::EuAnthropicClaudeOpus46V1
10181            | Self::EuAnthropicClaudeOpus47
10182            | Self::EuAnthropicClaudeOpus48
10183            | Self::EuAnthropicClaudeOpus5
10184            | Self::EuAnthropicClaudeSonnet4520250929V10
10185            | Self::EuAnthropicClaudeSonnet46
10186            | Self::EuAnthropicClaudeSonnet5
10187            | Self::GlobalAnthropicClaudeFable5
10188            | Self::GlobalAnthropicClaudeHaiku4520251001V10
10189            | Self::GlobalAnthropicClaudeOpus4520251101V10
10190            | Self::GlobalAnthropicClaudeOpus46V1
10191            | Self::GlobalAnthropicClaudeOpus47
10192            | Self::GlobalAnthropicClaudeOpus48
10193            | Self::GlobalAnthropicClaudeOpus5
10194            | Self::GlobalAnthropicClaudeSonnet4520250929V10
10195            | Self::GlobalAnthropicClaudeSonnet46
10196            | Self::GlobalAnthropicClaudeSonnet5
10197            | Self::JpAnthropicClaudeHaiku4520251001V10
10198            | Self::JpAnthropicClaudeOpus47
10199            | Self::JpAnthropicClaudeOpus48
10200            | Self::JpAnthropicClaudeOpus5
10201            | Self::JpAnthropicClaudeSonnet4520250929V10
10202            | Self::JpAnthropicClaudeSonnet46
10203            | Self::JpAnthropicClaudeSonnet5
10204            | Self::OpenaiGpt54
10205            | Self::OpenaiGpt55
10206            | Self::OpenaiGpt56Luna
10207            | Self::OpenaiGpt56Sol
10208            | Self::OpenaiGpt56Terra
10209            | Self::UsAnthropicClaudeFable5
10210            | Self::UsAnthropicClaudeHaiku4520251001V10
10211            | Self::UsAnthropicClaudeOpus4120250805V10
10212            | Self::UsAnthropicClaudeOpus4520251101V10
10213            | Self::UsAnthropicClaudeOpus46V1
10214            | Self::UsAnthropicClaudeOpus47
10215            | Self::UsAnthropicClaudeOpus48
10216            | Self::UsAnthropicClaudeOpus5
10217            | Self::UsAnthropicClaudeSonnet4520250929V10
10218            | Self::UsAnthropicClaudeSonnet46
10219            | Self::UsAnthropicClaudeSonnet5
10220            | Self::XaiGrok43 => true,
10221        }
10222    }
10223    #[allow(clippy::too_many_lines, clippy::match_same_arms, clippy::unreadable_literal)]
10224    pub fn pricing(self) -> Option<ModelPricing> {
10225        match self {
10226            Self::AmazonNova2LiteV10 => {
10227                Some(ModelPricing {
10228                    input_per_million: 0.33f64,
10229                    output_per_million: 2.75f64,
10230                    cache_read_per_million: None,
10231                    cache_write_per_million: None,
10232                })
10233            }
10234            Self::AmazonNovaLiteV10 => {
10235                Some(ModelPricing {
10236                    input_per_million: 0.06f64,
10237                    output_per_million: 0.24f64,
10238                    cache_read_per_million: Some(0.015f64),
10239                    cache_write_per_million: None,
10240                })
10241            }
10242            Self::AmazonNovaMicroV10 => {
10243                Some(ModelPricing {
10244                    input_per_million: 0.035f64,
10245                    output_per_million: 0.14f64,
10246                    cache_read_per_million: Some(0.00875f64),
10247                    cache_write_per_million: None,
10248                })
10249            }
10250            Self::AmazonNovaProV10 => {
10251                Some(ModelPricing {
10252                    input_per_million: 0.8f64,
10253                    output_per_million: 3.2f64,
10254                    cache_read_per_million: Some(0.2f64),
10255                    cache_write_per_million: None,
10256                })
10257            }
10258            Self::AnthropicClaudeFable5 => {
10259                Some(ModelPricing {
10260                    input_per_million: 10f64,
10261                    output_per_million: 50f64,
10262                    cache_read_per_million: Some(1f64),
10263                    cache_write_per_million: Some(12.5f64),
10264                })
10265            }
10266            Self::AnthropicClaudeHaiku4520251001V10 => {
10267                Some(ModelPricing {
10268                    input_per_million: 1f64,
10269                    output_per_million: 5f64,
10270                    cache_read_per_million: Some(0.1f64),
10271                    cache_write_per_million: Some(1.25f64),
10272                })
10273            }
10274            Self::AnthropicClaudeOpus4120250805V10 => {
10275                Some(ModelPricing {
10276                    input_per_million: 15f64,
10277                    output_per_million: 75f64,
10278                    cache_read_per_million: Some(1.5f64),
10279                    cache_write_per_million: Some(18.75f64),
10280                })
10281            }
10282            Self::AnthropicClaudeOpus4520251101V10 => {
10283                Some(ModelPricing {
10284                    input_per_million: 5f64,
10285                    output_per_million: 25f64,
10286                    cache_read_per_million: Some(0.5f64),
10287                    cache_write_per_million: Some(6.25f64),
10288                })
10289            }
10290            Self::AnthropicClaudeOpus46V1 => {
10291                Some(ModelPricing {
10292                    input_per_million: 5f64,
10293                    output_per_million: 25f64,
10294                    cache_read_per_million: Some(0.5f64),
10295                    cache_write_per_million: Some(6.25f64),
10296                })
10297            }
10298            Self::AnthropicClaudeOpus47 => {
10299                Some(ModelPricing {
10300                    input_per_million: 5f64,
10301                    output_per_million: 25f64,
10302                    cache_read_per_million: Some(0.5f64),
10303                    cache_write_per_million: Some(6.25f64),
10304                })
10305            }
10306            Self::AnthropicClaudeOpus48 => {
10307                Some(ModelPricing {
10308                    input_per_million: 5f64,
10309                    output_per_million: 25f64,
10310                    cache_read_per_million: Some(0.5f64),
10311                    cache_write_per_million: Some(6.25f64),
10312                })
10313            }
10314            Self::AnthropicClaudeOpus5 => {
10315                Some(ModelPricing {
10316                    input_per_million: 5f64,
10317                    output_per_million: 25f64,
10318                    cache_read_per_million: Some(0.5f64),
10319                    cache_write_per_million: Some(6.25f64),
10320                })
10321            }
10322            Self::AnthropicClaudeSonnet4520250929V10 => {
10323                Some(ModelPricing {
10324                    input_per_million: 3f64,
10325                    output_per_million: 15f64,
10326                    cache_read_per_million: Some(0.3f64),
10327                    cache_write_per_million: Some(3.75f64),
10328                })
10329            }
10330            Self::AnthropicClaudeSonnet46 => {
10331                Some(ModelPricing {
10332                    input_per_million: 3f64,
10333                    output_per_million: 15f64,
10334                    cache_read_per_million: Some(0.3f64),
10335                    cache_write_per_million: Some(3.75f64),
10336                })
10337            }
10338            Self::AnthropicClaudeSonnet5 => {
10339                Some(ModelPricing {
10340                    input_per_million: 2f64,
10341                    output_per_million: 10f64,
10342                    cache_read_per_million: Some(0.2f64),
10343                    cache_write_per_million: Some(2.5f64),
10344                })
10345            }
10346            Self::AuAnthropicClaudeHaiku4520251001V10 => {
10347                Some(ModelPricing {
10348                    input_per_million: 1f64,
10349                    output_per_million: 5f64,
10350                    cache_read_per_million: Some(0.1f64),
10351                    cache_write_per_million: Some(1.25f64),
10352                })
10353            }
10354            Self::AuAnthropicClaudeOpus46V1 => {
10355                Some(ModelPricing {
10356                    input_per_million: 16.5f64,
10357                    output_per_million: 82.5f64,
10358                    cache_read_per_million: Some(1.65f64),
10359                    cache_write_per_million: Some(20.625f64),
10360                })
10361            }
10362            Self::AuAnthropicClaudeOpus48 => {
10363                Some(ModelPricing {
10364                    input_per_million: 5f64,
10365                    output_per_million: 25f64,
10366                    cache_read_per_million: Some(0.5f64),
10367                    cache_write_per_million: Some(6.25f64),
10368                })
10369            }
10370            Self::AuAnthropicClaudeOpus5 => {
10371                Some(ModelPricing {
10372                    input_per_million: 5f64,
10373                    output_per_million: 25f64,
10374                    cache_read_per_million: Some(0.5f64),
10375                    cache_write_per_million: Some(6.25f64),
10376                })
10377            }
10378            Self::AuAnthropicClaudeSonnet4520250929V10 => {
10379                Some(ModelPricing {
10380                    input_per_million: 3f64,
10381                    output_per_million: 15f64,
10382                    cache_read_per_million: Some(0.3f64),
10383                    cache_write_per_million: Some(3.75f64),
10384                })
10385            }
10386            Self::AuAnthropicClaudeSonnet46 => {
10387                Some(ModelPricing {
10388                    input_per_million: 3.3f64,
10389                    output_per_million: 16.5f64,
10390                    cache_read_per_million: Some(0.33f64),
10391                    cache_write_per_million: Some(4.125f64),
10392                })
10393            }
10394            Self::AuAnthropicClaudeSonnet5 => {
10395                Some(ModelPricing {
10396                    input_per_million: 2f64,
10397                    output_per_million: 10f64,
10398                    cache_read_per_million: Some(0.2f64),
10399                    cache_write_per_million: Some(2.5f64),
10400                })
10401            }
10402            Self::DeepseekR1V10 => {
10403                Some(ModelPricing {
10404                    input_per_million: 1.35f64,
10405                    output_per_million: 5.4f64,
10406                    cache_read_per_million: None,
10407                    cache_write_per_million: None,
10408                })
10409            }
10410            Self::DeepseekV3V10 => {
10411                Some(ModelPricing {
10412                    input_per_million: 0.58f64,
10413                    output_per_million: 1.68f64,
10414                    cache_read_per_million: None,
10415                    cache_write_per_million: None,
10416                })
10417            }
10418            Self::DeepseekV32 => {
10419                Some(ModelPricing {
10420                    input_per_million: 0.62f64,
10421                    output_per_million: 1.85f64,
10422                    cache_read_per_million: None,
10423                    cache_write_per_million: None,
10424                })
10425            }
10426            Self::EuAnthropicClaudeFable5 => {
10427                Some(ModelPricing {
10428                    input_per_million: 11f64,
10429                    output_per_million: 55f64,
10430                    cache_read_per_million: Some(1.1f64),
10431                    cache_write_per_million: Some(13.75f64),
10432                })
10433            }
10434            Self::EuAnthropicClaudeHaiku4520251001V10 => {
10435                Some(ModelPricing {
10436                    input_per_million: 1.1f64,
10437                    output_per_million: 5.5f64,
10438                    cache_read_per_million: Some(0.11f64),
10439                    cache_write_per_million: Some(1.375f64),
10440                })
10441            }
10442            Self::EuAnthropicClaudeOpus4520251101V10 => {
10443                Some(ModelPricing {
10444                    input_per_million: 5.5f64,
10445                    output_per_million: 27.5f64,
10446                    cache_read_per_million: Some(0.55f64),
10447                    cache_write_per_million: Some(6.875f64),
10448                })
10449            }
10450            Self::EuAnthropicClaudeOpus46V1 => {
10451                Some(ModelPricing {
10452                    input_per_million: 5.5f64,
10453                    output_per_million: 27.5f64,
10454                    cache_read_per_million: Some(0.55f64),
10455                    cache_write_per_million: Some(6.875f64),
10456                })
10457            }
10458            Self::EuAnthropicClaudeOpus47 => {
10459                Some(ModelPricing {
10460                    input_per_million: 5.5f64,
10461                    output_per_million: 27.5f64,
10462                    cache_read_per_million: Some(0.55f64),
10463                    cache_write_per_million: Some(6.875f64),
10464                })
10465            }
10466            Self::EuAnthropicClaudeOpus48 => {
10467                Some(ModelPricing {
10468                    input_per_million: 5.5f64,
10469                    output_per_million: 27.5f64,
10470                    cache_read_per_million: Some(0.55f64),
10471                    cache_write_per_million: Some(6.875f64),
10472                })
10473            }
10474            Self::EuAnthropicClaudeOpus5 => {
10475                Some(ModelPricing {
10476                    input_per_million: 5.5f64,
10477                    output_per_million: 27.5f64,
10478                    cache_read_per_million: Some(0.55f64),
10479                    cache_write_per_million: Some(6.875f64),
10480                })
10481            }
10482            Self::EuAnthropicClaudeSonnet4520250929V10 => {
10483                Some(ModelPricing {
10484                    input_per_million: 3.3f64,
10485                    output_per_million: 16.5f64,
10486                    cache_read_per_million: Some(0.33f64),
10487                    cache_write_per_million: Some(4.125f64),
10488                })
10489            }
10490            Self::EuAnthropicClaudeSonnet46 => {
10491                Some(ModelPricing {
10492                    input_per_million: 3.3f64,
10493                    output_per_million: 16.5f64,
10494                    cache_read_per_million: Some(0.33f64),
10495                    cache_write_per_million: Some(4.125f64),
10496                })
10497            }
10498            Self::EuAnthropicClaudeSonnet5 => {
10499                Some(ModelPricing {
10500                    input_per_million: 2.2f64,
10501                    output_per_million: 11f64,
10502                    cache_read_per_million: Some(0.22f64),
10503                    cache_write_per_million: Some(2.75f64),
10504                })
10505            }
10506            Self::GlobalAnthropicClaudeFable5 => {
10507                Some(ModelPricing {
10508                    input_per_million: 10f64,
10509                    output_per_million: 50f64,
10510                    cache_read_per_million: Some(1f64),
10511                    cache_write_per_million: Some(12.5f64),
10512                })
10513            }
10514            Self::GlobalAnthropicClaudeHaiku4520251001V10 => {
10515                Some(ModelPricing {
10516                    input_per_million: 1f64,
10517                    output_per_million: 5f64,
10518                    cache_read_per_million: Some(0.1f64),
10519                    cache_write_per_million: Some(1.25f64),
10520                })
10521            }
10522            Self::GlobalAnthropicClaudeOpus4520251101V10 => {
10523                Some(ModelPricing {
10524                    input_per_million: 5f64,
10525                    output_per_million: 25f64,
10526                    cache_read_per_million: Some(0.5f64),
10527                    cache_write_per_million: Some(6.25f64),
10528                })
10529            }
10530            Self::GlobalAnthropicClaudeOpus46V1 => {
10531                Some(ModelPricing {
10532                    input_per_million: 5f64,
10533                    output_per_million: 25f64,
10534                    cache_read_per_million: Some(0.5f64),
10535                    cache_write_per_million: Some(6.25f64),
10536                })
10537            }
10538            Self::GlobalAnthropicClaudeOpus47 => {
10539                Some(ModelPricing {
10540                    input_per_million: 5f64,
10541                    output_per_million: 25f64,
10542                    cache_read_per_million: Some(0.5f64),
10543                    cache_write_per_million: Some(6.25f64),
10544                })
10545            }
10546            Self::GlobalAnthropicClaudeOpus48 => {
10547                Some(ModelPricing {
10548                    input_per_million: 5f64,
10549                    output_per_million: 25f64,
10550                    cache_read_per_million: Some(0.5f64),
10551                    cache_write_per_million: Some(6.25f64),
10552                })
10553            }
10554            Self::GlobalAnthropicClaudeOpus5 => {
10555                Some(ModelPricing {
10556                    input_per_million: 5f64,
10557                    output_per_million: 25f64,
10558                    cache_read_per_million: Some(0.5f64),
10559                    cache_write_per_million: Some(6.25f64),
10560                })
10561            }
10562            Self::GlobalAnthropicClaudeSonnet4520250929V10 => {
10563                Some(ModelPricing {
10564                    input_per_million: 3f64,
10565                    output_per_million: 15f64,
10566                    cache_read_per_million: Some(0.3f64),
10567                    cache_write_per_million: Some(3.75f64),
10568                })
10569            }
10570            Self::GlobalAnthropicClaudeSonnet46 => {
10571                Some(ModelPricing {
10572                    input_per_million: 3f64,
10573                    output_per_million: 15f64,
10574                    cache_read_per_million: Some(0.3f64),
10575                    cache_write_per_million: Some(3.75f64),
10576                })
10577            }
10578            Self::GlobalAnthropicClaudeSonnet5 => {
10579                Some(ModelPricing {
10580                    input_per_million: 2f64,
10581                    output_per_million: 10f64,
10582                    cache_read_per_million: Some(0.2f64),
10583                    cache_write_per_million: Some(2.5f64),
10584                })
10585            }
10586            Self::GoogleGemma327bIt => {
10587                Some(ModelPricing {
10588                    input_per_million: 0.12f64,
10589                    output_per_million: 0.2f64,
10590                    cache_read_per_million: None,
10591                    cache_write_per_million: None,
10592                })
10593            }
10594            Self::GoogleGemma34bIt => {
10595                Some(ModelPricing {
10596                    input_per_million: 0.04f64,
10597                    output_per_million: 0.08f64,
10598                    cache_read_per_million: None,
10599                    cache_write_per_million: None,
10600                })
10601            }
10602            Self::JpAnthropicClaudeHaiku4520251001V10 => {
10603                Some(ModelPricing {
10604                    input_per_million: 1f64,
10605                    output_per_million: 5f64,
10606                    cache_read_per_million: Some(0.1f64),
10607                    cache_write_per_million: Some(1.25f64),
10608                })
10609            }
10610            Self::JpAnthropicClaudeOpus47 => {
10611                Some(ModelPricing {
10612                    input_per_million: 5f64,
10613                    output_per_million: 25f64,
10614                    cache_read_per_million: Some(0.5f64),
10615                    cache_write_per_million: Some(6.25f64),
10616                })
10617            }
10618            Self::JpAnthropicClaudeOpus48 => {
10619                Some(ModelPricing {
10620                    input_per_million: 5f64,
10621                    output_per_million: 25f64,
10622                    cache_read_per_million: Some(0.5f64),
10623                    cache_write_per_million: Some(6.25f64),
10624                })
10625            }
10626            Self::JpAnthropicClaudeOpus5 => {
10627                Some(ModelPricing {
10628                    input_per_million: 5f64,
10629                    output_per_million: 25f64,
10630                    cache_read_per_million: Some(0.5f64),
10631                    cache_write_per_million: Some(6.25f64),
10632                })
10633            }
10634            Self::JpAnthropicClaudeSonnet4520250929V10 => {
10635                Some(ModelPricing {
10636                    input_per_million: 3f64,
10637                    output_per_million: 15f64,
10638                    cache_read_per_million: Some(0.3f64),
10639                    cache_write_per_million: Some(3.75f64),
10640                })
10641            }
10642            Self::JpAnthropicClaudeSonnet46 => {
10643                Some(ModelPricing {
10644                    input_per_million: 3f64,
10645                    output_per_million: 15f64,
10646                    cache_read_per_million: Some(0.3f64),
10647                    cache_write_per_million: Some(3.75f64),
10648                })
10649            }
10650            Self::JpAnthropicClaudeSonnet5 => {
10651                Some(ModelPricing {
10652                    input_per_million: 2f64,
10653                    output_per_million: 10f64,
10654                    cache_read_per_million: Some(0.2f64),
10655                    cache_write_per_million: Some(2.5f64),
10656                })
10657            }
10658            Self::MetaLlama3170bInstructV10 => {
10659                Some(ModelPricing {
10660                    input_per_million: 0.72f64,
10661                    output_per_million: 0.72f64,
10662                    cache_read_per_million: None,
10663                    cache_write_per_million: None,
10664                })
10665            }
10666            Self::MetaLlama318bInstructV10 => {
10667                Some(ModelPricing {
10668                    input_per_million: 0.22f64,
10669                    output_per_million: 0.22f64,
10670                    cache_read_per_million: None,
10671                    cache_write_per_million: None,
10672                })
10673            }
10674            Self::MetaLlama3370bInstructV10 => {
10675                Some(ModelPricing {
10676                    input_per_million: 0.72f64,
10677                    output_per_million: 0.72f64,
10678                    cache_read_per_million: None,
10679                    cache_write_per_million: None,
10680                })
10681            }
10682            Self::MetaLlama4Maverick17bInstructV10 => {
10683                Some(ModelPricing {
10684                    input_per_million: 0.24f64,
10685                    output_per_million: 0.97f64,
10686                    cache_read_per_million: None,
10687                    cache_write_per_million: None,
10688                })
10689            }
10690            Self::MetaLlama4Scout17bInstructV10 => {
10691                Some(ModelPricing {
10692                    input_per_million: 0.17f64,
10693                    output_per_million: 0.66f64,
10694                    cache_read_per_million: None,
10695                    cache_write_per_million: None,
10696                })
10697            }
10698            Self::MinimaxMinimaxM2 => {
10699                Some(ModelPricing {
10700                    input_per_million: 0.3f64,
10701                    output_per_million: 1.2f64,
10702                    cache_read_per_million: None,
10703                    cache_write_per_million: None,
10704                })
10705            }
10706            Self::MinimaxMinimaxM21 => {
10707                Some(ModelPricing {
10708                    input_per_million: 0.3f64,
10709                    output_per_million: 1.2f64,
10710                    cache_read_per_million: None,
10711                    cache_write_per_million: None,
10712                })
10713            }
10714            Self::MinimaxMinimaxM25 => {
10715                Some(ModelPricing {
10716                    input_per_million: 0.3f64,
10717                    output_per_million: 1.2f64,
10718                    cache_read_per_million: None,
10719                    cache_write_per_million: None,
10720                })
10721            }
10722            Self::MistralDevstral2123b => {
10723                Some(ModelPricing {
10724                    input_per_million: 0.4f64,
10725                    output_per_million: 2f64,
10726                    cache_read_per_million: None,
10727                    cache_write_per_million: None,
10728                })
10729            }
10730            Self::MistralMagistralSmall2509 => {
10731                Some(ModelPricing {
10732                    input_per_million: 0.5f64,
10733                    output_per_million: 1.5f64,
10734                    cache_read_per_million: None,
10735                    cache_write_per_million: None,
10736                })
10737            }
10738            Self::MistralMinistral314bInstruct => {
10739                Some(ModelPricing {
10740                    input_per_million: 0.2f64,
10741                    output_per_million: 0.2f64,
10742                    cache_read_per_million: None,
10743                    cache_write_per_million: None,
10744                })
10745            }
10746            Self::MistralMinistral33bInstruct => {
10747                Some(ModelPricing {
10748                    input_per_million: 0.1f64,
10749                    output_per_million: 0.1f64,
10750                    cache_read_per_million: None,
10751                    cache_write_per_million: None,
10752                })
10753            }
10754            Self::MistralMinistral38bInstruct => {
10755                Some(ModelPricing {
10756                    input_per_million: 0.15f64,
10757                    output_per_million: 0.15f64,
10758                    cache_read_per_million: None,
10759                    cache_write_per_million: None,
10760                })
10761            }
10762            Self::MistralMistralLarge3675bInstruct => {
10763                Some(ModelPricing {
10764                    input_per_million: 0.5f64,
10765                    output_per_million: 1.5f64,
10766                    cache_read_per_million: None,
10767                    cache_write_per_million: None,
10768                })
10769            }
10770            Self::MistralPixtralLarge2502V10 => {
10771                Some(ModelPricing {
10772                    input_per_million: 2f64,
10773                    output_per_million: 6f64,
10774                    cache_read_per_million: None,
10775                    cache_write_per_million: None,
10776                })
10777            }
10778            Self::MistralVoxtralMini3b2507 => {
10779                Some(ModelPricing {
10780                    input_per_million: 0.04f64,
10781                    output_per_million: 0.04f64,
10782                    cache_read_per_million: None,
10783                    cache_write_per_million: None,
10784                })
10785            }
10786            Self::MistralVoxtralSmall24b2507 => {
10787                Some(ModelPricing {
10788                    input_per_million: 0.15f64,
10789                    output_per_million: 0.35f64,
10790                    cache_read_per_million: None,
10791                    cache_write_per_million: None,
10792                })
10793            }
10794            Self::MoonshotKimiK2Thinking => {
10795                Some(ModelPricing {
10796                    input_per_million: 0.6f64,
10797                    output_per_million: 2.5f64,
10798                    cache_read_per_million: None,
10799                    cache_write_per_million: None,
10800                })
10801            }
10802            Self::MoonshotaiKimiK25 => {
10803                Some(ModelPricing {
10804                    input_per_million: 0.6f64,
10805                    output_per_million: 3f64,
10806                    cache_read_per_million: None,
10807                    cache_write_per_million: None,
10808                })
10809            }
10810            Self::NvidiaNemotronNano12bV2 => {
10811                Some(ModelPricing {
10812                    input_per_million: 0.2f64,
10813                    output_per_million: 0.6f64,
10814                    cache_read_per_million: None,
10815                    cache_write_per_million: None,
10816                })
10817            }
10818            Self::NvidiaNemotronNano330b => {
10819                Some(ModelPricing {
10820                    input_per_million: 0.06f64,
10821                    output_per_million: 0.24f64,
10822                    cache_read_per_million: None,
10823                    cache_write_per_million: None,
10824                })
10825            }
10826            Self::NvidiaNemotronNano9bV2 => {
10827                Some(ModelPricing {
10828                    input_per_million: 0.06f64,
10829                    output_per_million: 0.23f64,
10830                    cache_read_per_million: None,
10831                    cache_write_per_million: None,
10832                })
10833            }
10834            Self::NvidiaNemotronSuper3120b => {
10835                Some(ModelPricing {
10836                    input_per_million: 0.15f64,
10837                    output_per_million: 0.65f64,
10838                    cache_read_per_million: None,
10839                    cache_write_per_million: None,
10840                })
10841            }
10842            Self::OpenaiGpt54 => {
10843                Some(ModelPricing {
10844                    input_per_million: 2.75f64,
10845                    output_per_million: 16.5f64,
10846                    cache_read_per_million: Some(0.275f64),
10847                    cache_write_per_million: None,
10848                })
10849            }
10850            Self::OpenaiGpt55 => {
10851                Some(ModelPricing {
10852                    input_per_million: 5.5f64,
10853                    output_per_million: 33f64,
10854                    cache_read_per_million: Some(0.55f64),
10855                    cache_write_per_million: None,
10856                })
10857            }
10858            Self::OpenaiGpt56Luna => {
10859                Some(ModelPricing {
10860                    input_per_million: 0.22f64,
10861                    output_per_million: 1.32f64,
10862                    cache_read_per_million: Some(0.022f64),
10863                    cache_write_per_million: Some(0.275f64),
10864                })
10865            }
10866            Self::OpenaiGpt56Sol => {
10867                Some(ModelPricing {
10868                    input_per_million: 5.5f64,
10869                    output_per_million: 33f64,
10870                    cache_read_per_million: Some(0.55f64),
10871                    cache_write_per_million: Some(6.88f64),
10872                })
10873            }
10874            Self::OpenaiGpt56Terra => {
10875                Some(ModelPricing {
10876                    input_per_million: 2.2f64,
10877                    output_per_million: 13.2f64,
10878                    cache_read_per_million: Some(0.22f64),
10879                    cache_write_per_million: Some(2.75f64),
10880                })
10881            }
10882            Self::OpenaiGptOss120b => {
10883                Some(ModelPricing {
10884                    input_per_million: 0.15f64,
10885                    output_per_million: 0.6f64,
10886                    cache_read_per_million: None,
10887                    cache_write_per_million: None,
10888                })
10889            }
10890            Self::OpenaiGptOss120b10 => {
10891                Some(ModelPricing {
10892                    input_per_million: 0.15f64,
10893                    output_per_million: 0.6f64,
10894                    cache_read_per_million: None,
10895                    cache_write_per_million: None,
10896                })
10897            }
10898            Self::OpenaiGptOss20b => {
10899                Some(ModelPricing {
10900                    input_per_million: 0.07f64,
10901                    output_per_million: 0.3f64,
10902                    cache_read_per_million: None,
10903                    cache_write_per_million: None,
10904                })
10905            }
10906            Self::OpenaiGptOss20b10 => {
10907                Some(ModelPricing {
10908                    input_per_million: 0.07f64,
10909                    output_per_million: 0.3f64,
10910                    cache_read_per_million: None,
10911                    cache_write_per_million: None,
10912                })
10913            }
10914            Self::OpenaiGptOssSafeguard120b => {
10915                Some(ModelPricing {
10916                    input_per_million: 0.15f64,
10917                    output_per_million: 0.6f64,
10918                    cache_read_per_million: None,
10919                    cache_write_per_million: None,
10920                })
10921            }
10922            Self::OpenaiGptOssSafeguard20b => {
10923                Some(ModelPricing {
10924                    input_per_million: 0.07f64,
10925                    output_per_million: 0.2f64,
10926                    cache_read_per_million: None,
10927                    cache_write_per_million: None,
10928                })
10929            }
10930            Self::QwenQwen3235bA22b2507V10 => {
10931                Some(ModelPricing {
10932                    input_per_million: 0.22f64,
10933                    output_per_million: 0.88f64,
10934                    cache_read_per_million: None,
10935                    cache_write_per_million: None,
10936                })
10937            }
10938            Self::QwenQwen332bV10 => {
10939                Some(ModelPricing {
10940                    input_per_million: 0.15f64,
10941                    output_per_million: 0.6f64,
10942                    cache_read_per_million: None,
10943                    cache_write_per_million: None,
10944                })
10945            }
10946            Self::QwenQwen3Coder30bA3bV10 => {
10947                Some(ModelPricing {
10948                    input_per_million: 0.15f64,
10949                    output_per_million: 0.6f64,
10950                    cache_read_per_million: None,
10951                    cache_write_per_million: None,
10952                })
10953            }
10954            Self::QwenQwen3Coder480bA35bV10 => {
10955                Some(ModelPricing {
10956                    input_per_million: 0.22f64,
10957                    output_per_million: 1.8f64,
10958                    cache_read_per_million: None,
10959                    cache_write_per_million: None,
10960                })
10961            }
10962            Self::QwenQwen3CoderNext => {
10963                Some(ModelPricing {
10964                    input_per_million: 0.22f64,
10965                    output_per_million: 1.8f64,
10966                    cache_read_per_million: None,
10967                    cache_write_per_million: None,
10968                })
10969            }
10970            Self::QwenQwen3Next80bA3b => {
10971                Some(ModelPricing {
10972                    input_per_million: 0.14f64,
10973                    output_per_million: 1.4f64,
10974                    cache_read_per_million: None,
10975                    cache_write_per_million: None,
10976                })
10977            }
10978            Self::QwenQwen3Vl235bA22b => {
10979                Some(ModelPricing {
10980                    input_per_million: 0.3f64,
10981                    output_per_million: 1.5f64,
10982                    cache_read_per_million: None,
10983                    cache_write_per_million: None,
10984                })
10985            }
10986            Self::UsAnthropicClaudeFable5 => {
10987                Some(ModelPricing {
10988                    input_per_million: 10f64,
10989                    output_per_million: 50f64,
10990                    cache_read_per_million: Some(1f64),
10991                    cache_write_per_million: Some(12.5f64),
10992                })
10993            }
10994            Self::UsAnthropicClaudeHaiku4520251001V10 => {
10995                Some(ModelPricing {
10996                    input_per_million: 1f64,
10997                    output_per_million: 5f64,
10998                    cache_read_per_million: Some(0.1f64),
10999                    cache_write_per_million: Some(1.25f64),
11000                })
11001            }
11002            Self::UsAnthropicClaudeOpus4120250805V10 => {
11003                Some(ModelPricing {
11004                    input_per_million: 15f64,
11005                    output_per_million: 75f64,
11006                    cache_read_per_million: Some(1.5f64),
11007                    cache_write_per_million: Some(18.75f64),
11008                })
11009            }
11010            Self::UsAnthropicClaudeOpus4520251101V10 => {
11011                Some(ModelPricing {
11012                    input_per_million: 5f64,
11013                    output_per_million: 25f64,
11014                    cache_read_per_million: Some(0.5f64),
11015                    cache_write_per_million: Some(6.25f64),
11016                })
11017            }
11018            Self::UsAnthropicClaudeOpus46V1 => {
11019                Some(ModelPricing {
11020                    input_per_million: 5f64,
11021                    output_per_million: 25f64,
11022                    cache_read_per_million: Some(0.5f64),
11023                    cache_write_per_million: Some(6.25f64),
11024                })
11025            }
11026            Self::UsAnthropicClaudeOpus47 => {
11027                Some(ModelPricing {
11028                    input_per_million: 5f64,
11029                    output_per_million: 25f64,
11030                    cache_read_per_million: Some(0.5f64),
11031                    cache_write_per_million: Some(6.25f64),
11032                })
11033            }
11034            Self::UsAnthropicClaudeOpus48 => {
11035                Some(ModelPricing {
11036                    input_per_million: 5f64,
11037                    output_per_million: 25f64,
11038                    cache_read_per_million: Some(0.5f64),
11039                    cache_write_per_million: Some(6.25f64),
11040                })
11041            }
11042            Self::UsAnthropicClaudeOpus5 => {
11043                Some(ModelPricing {
11044                    input_per_million: 5f64,
11045                    output_per_million: 25f64,
11046                    cache_read_per_million: Some(0.5f64),
11047                    cache_write_per_million: Some(6.25f64),
11048                })
11049            }
11050            Self::UsAnthropicClaudeSonnet4520250929V10 => {
11051                Some(ModelPricing {
11052                    input_per_million: 3f64,
11053                    output_per_million: 15f64,
11054                    cache_read_per_million: Some(0.3f64),
11055                    cache_write_per_million: Some(3.75f64),
11056                })
11057            }
11058            Self::UsAnthropicClaudeSonnet46 => {
11059                Some(ModelPricing {
11060                    input_per_million: 3f64,
11061                    output_per_million: 15f64,
11062                    cache_read_per_million: Some(0.3f64),
11063                    cache_write_per_million: Some(3.75f64),
11064                })
11065            }
11066            Self::UsAnthropicClaudeSonnet5 => {
11067                Some(ModelPricing {
11068                    input_per_million: 2f64,
11069                    output_per_million: 10f64,
11070                    cache_read_per_million: Some(0.2f64),
11071                    cache_write_per_million: Some(2.5f64),
11072                })
11073            }
11074            Self::UsDeepseekR1V10 => {
11075                Some(ModelPricing {
11076                    input_per_million: 1.35f64,
11077                    output_per_million: 5.4f64,
11078                    cache_read_per_million: None,
11079                    cache_write_per_million: None,
11080                })
11081            }
11082            Self::UsMetaLlama4Maverick17bInstructV10 => {
11083                Some(ModelPricing {
11084                    input_per_million: 0.24f64,
11085                    output_per_million: 0.97f64,
11086                    cache_read_per_million: None,
11087                    cache_write_per_million: None,
11088                })
11089            }
11090            Self::UsMetaLlama4Scout17bInstructV10 => {
11091                Some(ModelPricing {
11092                    input_per_million: 0.17f64,
11093                    output_per_million: 0.66f64,
11094                    cache_read_per_million: None,
11095                    cache_write_per_million: None,
11096                })
11097            }
11098            Self::WriterPalmyraX4V10 => {
11099                Some(ModelPricing {
11100                    input_per_million: 2.5f64,
11101                    output_per_million: 10f64,
11102                    cache_read_per_million: None,
11103                    cache_write_per_million: None,
11104                })
11105            }
11106            Self::WriterPalmyraX5V10 => {
11107                Some(ModelPricing {
11108                    input_per_million: 0.6f64,
11109                    output_per_million: 6f64,
11110                    cache_read_per_million: None,
11111                    cache_write_per_million: None,
11112                })
11113            }
11114            Self::XaiGrok43 => {
11115                Some(ModelPricing {
11116                    input_per_million: 1.25f64,
11117                    output_per_million: 2.5f64,
11118                    cache_read_per_million: Some(0.2f64),
11119                    cache_write_per_million: None,
11120                })
11121            }
11122            Self::ZaiGlm47 => {
11123                Some(ModelPricing {
11124                    input_per_million: 0.6f64,
11125                    output_per_million: 2.2f64,
11126                    cache_read_per_million: None,
11127                    cache_write_per_million: None,
11128                })
11129            }
11130            Self::ZaiGlm47Flash => {
11131                Some(ModelPricing {
11132                    input_per_million: 0.07f64,
11133                    output_per_million: 0.4f64,
11134                    cache_read_per_million: None,
11135                    cache_write_per_million: None,
11136                })
11137            }
11138            Self::ZaiGlm5 => {
11139                Some(ModelPricing {
11140                    input_per_million: 1f64,
11141                    output_per_million: 3.2f64,
11142                    cache_read_per_million: None,
11143                    cache_write_per_million: None,
11144                })
11145            }
11146        }
11147    }
11148    #[allow(clippy::too_many_lines)]
11149    pub fn supports_image(self) -> bool {
11150        match self {
11151            Self::AmazonNovaMicroV10
11152            | Self::DeepseekR1V10
11153            | Self::DeepseekV3V10
11154            | Self::DeepseekV32
11155            | Self::MetaLlama3170bInstructV10
11156            | Self::MetaLlama318bInstructV10
11157            | Self::MetaLlama3370bInstructV10
11158            | Self::MinimaxMinimaxM2
11159            | Self::MinimaxMinimaxM21
11160            | Self::MinimaxMinimaxM25
11161            | Self::MistralDevstral2123b
11162            | Self::MistralMinistral314bInstruct
11163            | Self::MistralMinistral38bInstruct
11164            | Self::MistralVoxtralMini3b2507
11165            | Self::MistralVoxtralSmall24b2507
11166            | Self::MoonshotKimiK2Thinking
11167            | Self::NvidiaNemotronNano330b
11168            | Self::NvidiaNemotronNano9bV2
11169            | Self::NvidiaNemotronSuper3120b
11170            | Self::OpenaiGptOss120b
11171            | Self::OpenaiGptOss120b10
11172            | Self::OpenaiGptOss20b
11173            | Self::OpenaiGptOss20b10
11174            | Self::OpenaiGptOssSafeguard120b
11175            | Self::OpenaiGptOssSafeguard20b
11176            | Self::QwenQwen3235bA22b2507V10
11177            | Self::QwenQwen332bV10
11178            | Self::QwenQwen3Coder30bA3bV10
11179            | Self::QwenQwen3Coder480bA35bV10
11180            | Self::QwenQwen3CoderNext
11181            | Self::QwenQwen3Next80bA3b
11182            | Self::UsDeepseekR1V10
11183            | Self::WriterPalmyraX4V10
11184            | Self::WriterPalmyraX5V10
11185            | Self::ZaiGlm47
11186            | Self::ZaiGlm47Flash
11187            | Self::ZaiGlm5 => false,
11188            Self::AmazonNova2LiteV10
11189            | Self::AmazonNovaLiteV10
11190            | Self::AmazonNovaProV10
11191            | Self::AnthropicClaudeFable5
11192            | Self::AnthropicClaudeHaiku4520251001V10
11193            | Self::AnthropicClaudeOpus4120250805V10
11194            | Self::AnthropicClaudeOpus4520251101V10
11195            | Self::AnthropicClaudeOpus46V1
11196            | Self::AnthropicClaudeOpus47
11197            | Self::AnthropicClaudeOpus48
11198            | Self::AnthropicClaudeOpus5
11199            | Self::AnthropicClaudeSonnet4520250929V10
11200            | Self::AnthropicClaudeSonnet46
11201            | Self::AnthropicClaudeSonnet5
11202            | Self::AuAnthropicClaudeHaiku4520251001V10
11203            | Self::AuAnthropicClaudeOpus46V1
11204            | Self::AuAnthropicClaudeOpus48
11205            | Self::AuAnthropicClaudeOpus5
11206            | Self::AuAnthropicClaudeSonnet4520250929V10
11207            | Self::AuAnthropicClaudeSonnet46
11208            | Self::AuAnthropicClaudeSonnet5
11209            | Self::EuAnthropicClaudeFable5
11210            | Self::EuAnthropicClaudeHaiku4520251001V10
11211            | Self::EuAnthropicClaudeOpus4520251101V10
11212            | Self::EuAnthropicClaudeOpus46V1
11213            | Self::EuAnthropicClaudeOpus47
11214            | Self::EuAnthropicClaudeOpus48
11215            | Self::EuAnthropicClaudeOpus5
11216            | Self::EuAnthropicClaudeSonnet4520250929V10
11217            | Self::EuAnthropicClaudeSonnet46
11218            | Self::EuAnthropicClaudeSonnet5
11219            | Self::GlobalAnthropicClaudeFable5
11220            | Self::GlobalAnthropicClaudeHaiku4520251001V10
11221            | Self::GlobalAnthropicClaudeOpus4520251101V10
11222            | Self::GlobalAnthropicClaudeOpus46V1
11223            | Self::GlobalAnthropicClaudeOpus47
11224            | Self::GlobalAnthropicClaudeOpus48
11225            | Self::GlobalAnthropicClaudeOpus5
11226            | Self::GlobalAnthropicClaudeSonnet4520250929V10
11227            | Self::GlobalAnthropicClaudeSonnet46
11228            | Self::GlobalAnthropicClaudeSonnet5
11229            | Self::GoogleGemma327bIt
11230            | Self::GoogleGemma34bIt
11231            | Self::JpAnthropicClaudeHaiku4520251001V10
11232            | Self::JpAnthropicClaudeOpus47
11233            | Self::JpAnthropicClaudeOpus48
11234            | Self::JpAnthropicClaudeOpus5
11235            | Self::JpAnthropicClaudeSonnet4520250929V10
11236            | Self::JpAnthropicClaudeSonnet46
11237            | Self::JpAnthropicClaudeSonnet5
11238            | Self::MetaLlama4Maverick17bInstructV10
11239            | Self::MetaLlama4Scout17bInstructV10
11240            | Self::MistralMagistralSmall2509
11241            | Self::MistralMinistral33bInstruct
11242            | Self::MistralMistralLarge3675bInstruct
11243            | Self::MistralPixtralLarge2502V10
11244            | Self::MoonshotaiKimiK25
11245            | Self::NvidiaNemotronNano12bV2
11246            | Self::OpenaiGpt54
11247            | Self::OpenaiGpt55
11248            | Self::OpenaiGpt56Luna
11249            | Self::OpenaiGpt56Sol
11250            | Self::OpenaiGpt56Terra
11251            | Self::QwenQwen3Vl235bA22b
11252            | Self::UsAnthropicClaudeFable5
11253            | Self::UsAnthropicClaudeHaiku4520251001V10
11254            | Self::UsAnthropicClaudeOpus4120250805V10
11255            | Self::UsAnthropicClaudeOpus4520251101V10
11256            | Self::UsAnthropicClaudeOpus46V1
11257            | Self::UsAnthropicClaudeOpus47
11258            | Self::UsAnthropicClaudeOpus48
11259            | Self::UsAnthropicClaudeOpus5
11260            | Self::UsAnthropicClaudeSonnet4520250929V10
11261            | Self::UsAnthropicClaudeSonnet46
11262            | Self::UsAnthropicClaudeSonnet5
11263            | Self::UsMetaLlama4Maverick17bInstructV10
11264            | Self::UsMetaLlama4Scout17bInstructV10
11265            | Self::XaiGrok43 => true,
11266        }
11267    }
11268    #[allow(clippy::too_many_lines)]
11269    pub fn supports_audio(self) -> bool {
11270        match self {
11271            Self::AmazonNova2LiteV10
11272            | Self::AmazonNovaLiteV10
11273            | Self::AmazonNovaMicroV10
11274            | Self::AmazonNovaProV10
11275            | Self::AnthropicClaudeFable5
11276            | Self::AnthropicClaudeHaiku4520251001V10
11277            | Self::AnthropicClaudeOpus4120250805V10
11278            | Self::AnthropicClaudeOpus4520251101V10
11279            | Self::AnthropicClaudeOpus46V1
11280            | Self::AnthropicClaudeOpus47
11281            | Self::AnthropicClaudeOpus48
11282            | Self::AnthropicClaudeOpus5
11283            | Self::AnthropicClaudeSonnet4520250929V10
11284            | Self::AnthropicClaudeSonnet46
11285            | Self::AnthropicClaudeSonnet5
11286            | Self::AuAnthropicClaudeHaiku4520251001V10
11287            | Self::AuAnthropicClaudeOpus46V1
11288            | Self::AuAnthropicClaudeOpus48
11289            | Self::AuAnthropicClaudeOpus5
11290            | Self::AuAnthropicClaudeSonnet4520250929V10
11291            | Self::AuAnthropicClaudeSonnet46
11292            | Self::AuAnthropicClaudeSonnet5
11293            | Self::DeepseekR1V10
11294            | Self::DeepseekV3V10
11295            | Self::DeepseekV32
11296            | Self::EuAnthropicClaudeFable5
11297            | Self::EuAnthropicClaudeHaiku4520251001V10
11298            | Self::EuAnthropicClaudeOpus4520251101V10
11299            | Self::EuAnthropicClaudeOpus46V1
11300            | Self::EuAnthropicClaudeOpus47
11301            | Self::EuAnthropicClaudeOpus48
11302            | Self::EuAnthropicClaudeOpus5
11303            | Self::EuAnthropicClaudeSonnet4520250929V10
11304            | Self::EuAnthropicClaudeSonnet46
11305            | Self::EuAnthropicClaudeSonnet5
11306            | Self::GlobalAnthropicClaudeFable5
11307            | Self::GlobalAnthropicClaudeHaiku4520251001V10
11308            | Self::GlobalAnthropicClaudeOpus4520251101V10
11309            | Self::GlobalAnthropicClaudeOpus46V1
11310            | Self::GlobalAnthropicClaudeOpus47
11311            | Self::GlobalAnthropicClaudeOpus48
11312            | Self::GlobalAnthropicClaudeOpus5
11313            | Self::GlobalAnthropicClaudeSonnet4520250929V10
11314            | Self::GlobalAnthropicClaudeSonnet46
11315            | Self::GlobalAnthropicClaudeSonnet5
11316            | Self::GoogleGemma327bIt
11317            | Self::GoogleGemma34bIt
11318            | Self::JpAnthropicClaudeHaiku4520251001V10
11319            | Self::JpAnthropicClaudeOpus47
11320            | Self::JpAnthropicClaudeOpus48
11321            | Self::JpAnthropicClaudeOpus5
11322            | Self::JpAnthropicClaudeSonnet4520250929V10
11323            | Self::JpAnthropicClaudeSonnet46
11324            | Self::JpAnthropicClaudeSonnet5
11325            | Self::MetaLlama3170bInstructV10
11326            | Self::MetaLlama318bInstructV10
11327            | Self::MetaLlama3370bInstructV10
11328            | Self::MetaLlama4Maverick17bInstructV10
11329            | Self::MetaLlama4Scout17bInstructV10
11330            | Self::MinimaxMinimaxM2
11331            | Self::MinimaxMinimaxM21
11332            | Self::MinimaxMinimaxM25
11333            | Self::MistralDevstral2123b
11334            | Self::MistralMagistralSmall2509
11335            | Self::MistralMinistral314bInstruct
11336            | Self::MistralMinistral33bInstruct
11337            | Self::MistralMinistral38bInstruct
11338            | Self::MistralMistralLarge3675bInstruct
11339            | Self::MistralPixtralLarge2502V10
11340            | Self::MoonshotKimiK2Thinking
11341            | Self::MoonshotaiKimiK25
11342            | Self::NvidiaNemotronNano12bV2
11343            | Self::NvidiaNemotronNano330b
11344            | Self::NvidiaNemotronNano9bV2
11345            | Self::NvidiaNemotronSuper3120b
11346            | Self::OpenaiGpt54
11347            | Self::OpenaiGpt55
11348            | Self::OpenaiGpt56Luna
11349            | Self::OpenaiGpt56Sol
11350            | Self::OpenaiGpt56Terra
11351            | Self::OpenaiGptOss120b
11352            | Self::OpenaiGptOss120b10
11353            | Self::OpenaiGptOss20b
11354            | Self::OpenaiGptOss20b10
11355            | Self::OpenaiGptOssSafeguard120b
11356            | Self::OpenaiGptOssSafeguard20b
11357            | Self::QwenQwen3235bA22b2507V10
11358            | Self::QwenQwen332bV10
11359            | Self::QwenQwen3Coder30bA3bV10
11360            | Self::QwenQwen3Coder480bA35bV10
11361            | Self::QwenQwen3CoderNext
11362            | Self::QwenQwen3Next80bA3b
11363            | Self::QwenQwen3Vl235bA22b
11364            | Self::UsAnthropicClaudeFable5
11365            | Self::UsAnthropicClaudeHaiku4520251001V10
11366            | Self::UsAnthropicClaudeOpus4120250805V10
11367            | Self::UsAnthropicClaudeOpus4520251101V10
11368            | Self::UsAnthropicClaudeOpus46V1
11369            | Self::UsAnthropicClaudeOpus47
11370            | Self::UsAnthropicClaudeOpus48
11371            | Self::UsAnthropicClaudeOpus5
11372            | Self::UsAnthropicClaudeSonnet4520250929V10
11373            | Self::UsAnthropicClaudeSonnet46
11374            | Self::UsAnthropicClaudeSonnet5
11375            | Self::UsDeepseekR1V10
11376            | Self::UsMetaLlama4Maverick17bInstructV10
11377            | Self::UsMetaLlama4Scout17bInstructV10
11378            | Self::WriterPalmyraX4V10
11379            | Self::WriterPalmyraX5V10
11380            | Self::XaiGrok43
11381            | Self::ZaiGlm47
11382            | Self::ZaiGlm47Flash
11383            | Self::ZaiGlm5 => false,
11384            Self::MistralVoxtralMini3b2507 | Self::MistralVoxtralSmall24b2507 => true,
11385        }
11386    }
11387    #[allow(clippy::too_many_lines)]
11388    pub fn transport(self) -> Option<ModelTransport> {
11389        match self {
11390            Self::AmazonNova2LiteV10
11391            | Self::AmazonNovaLiteV10
11392            | Self::AmazonNovaMicroV10
11393            | Self::AmazonNovaProV10
11394            | Self::AnthropicClaudeFable5
11395            | Self::AnthropicClaudeHaiku4520251001V10
11396            | Self::AnthropicClaudeOpus4120250805V10
11397            | Self::AnthropicClaudeOpus4520251101V10
11398            | Self::AnthropicClaudeOpus46V1
11399            | Self::AnthropicClaudeOpus47
11400            | Self::AnthropicClaudeOpus48
11401            | Self::AnthropicClaudeOpus5
11402            | Self::AnthropicClaudeSonnet4520250929V10
11403            | Self::AnthropicClaudeSonnet46
11404            | Self::AnthropicClaudeSonnet5
11405            | Self::AuAnthropicClaudeHaiku4520251001V10
11406            | Self::AuAnthropicClaudeOpus46V1
11407            | Self::AuAnthropicClaudeOpus48
11408            | Self::AuAnthropicClaudeOpus5
11409            | Self::AuAnthropicClaudeSonnet4520250929V10
11410            | Self::AuAnthropicClaudeSonnet46
11411            | Self::AuAnthropicClaudeSonnet5
11412            | Self::DeepseekR1V10
11413            | Self::DeepseekV3V10
11414            | Self::DeepseekV32
11415            | Self::EuAnthropicClaudeFable5
11416            | Self::EuAnthropicClaudeHaiku4520251001V10
11417            | Self::EuAnthropicClaudeOpus4520251101V10
11418            | Self::EuAnthropicClaudeOpus46V1
11419            | Self::EuAnthropicClaudeOpus47
11420            | Self::EuAnthropicClaudeOpus48
11421            | Self::EuAnthropicClaudeOpus5
11422            | Self::EuAnthropicClaudeSonnet4520250929V10
11423            | Self::EuAnthropicClaudeSonnet46
11424            | Self::EuAnthropicClaudeSonnet5
11425            | Self::GlobalAnthropicClaudeFable5
11426            | Self::GlobalAnthropicClaudeHaiku4520251001V10
11427            | Self::GlobalAnthropicClaudeOpus4520251101V10
11428            | Self::GlobalAnthropicClaudeOpus46V1
11429            | Self::GlobalAnthropicClaudeOpus47
11430            | Self::GlobalAnthropicClaudeOpus48
11431            | Self::GlobalAnthropicClaudeOpus5
11432            | Self::GlobalAnthropicClaudeSonnet4520250929V10
11433            | Self::GlobalAnthropicClaudeSonnet46
11434            | Self::GlobalAnthropicClaudeSonnet5
11435            | Self::GoogleGemma327bIt
11436            | Self::GoogleGemma34bIt
11437            | Self::JpAnthropicClaudeHaiku4520251001V10
11438            | Self::JpAnthropicClaudeOpus47
11439            | Self::JpAnthropicClaudeOpus48
11440            | Self::JpAnthropicClaudeOpus5
11441            | Self::JpAnthropicClaudeSonnet4520250929V10
11442            | Self::JpAnthropicClaudeSonnet46
11443            | Self::JpAnthropicClaudeSonnet5
11444            | Self::MetaLlama3170bInstructV10
11445            | Self::MetaLlama318bInstructV10
11446            | Self::MetaLlama3370bInstructV10
11447            | Self::MetaLlama4Maverick17bInstructV10
11448            | Self::MetaLlama4Scout17bInstructV10
11449            | Self::MinimaxMinimaxM2
11450            | Self::MinimaxMinimaxM21
11451            | Self::MinimaxMinimaxM25
11452            | Self::MistralDevstral2123b
11453            | Self::MistralMagistralSmall2509
11454            | Self::MistralMinistral314bInstruct
11455            | Self::MistralMinistral33bInstruct
11456            | Self::MistralMinistral38bInstruct
11457            | Self::MistralMistralLarge3675bInstruct
11458            | Self::MistralPixtralLarge2502V10
11459            | Self::MistralVoxtralMini3b2507
11460            | Self::MistralVoxtralSmall24b2507
11461            | Self::MoonshotKimiK2Thinking
11462            | Self::MoonshotaiKimiK25
11463            | Self::NvidiaNemotronNano12bV2
11464            | Self::NvidiaNemotronNano330b
11465            | Self::NvidiaNemotronNano9bV2
11466            | Self::NvidiaNemotronSuper3120b
11467            | Self::OpenaiGptOss120b10
11468            | Self::OpenaiGptOss20b10
11469            | Self::OpenaiGptOssSafeguard120b
11470            | Self::OpenaiGptOssSafeguard20b
11471            | Self::QwenQwen3235bA22b2507V10
11472            | Self::QwenQwen332bV10
11473            | Self::QwenQwen3Coder30bA3bV10
11474            | Self::QwenQwen3Coder480bA35bV10
11475            | Self::QwenQwen3CoderNext
11476            | Self::QwenQwen3Next80bA3b
11477            | Self::QwenQwen3Vl235bA22b
11478            | Self::UsAnthropicClaudeFable5
11479            | Self::UsAnthropicClaudeHaiku4520251001V10
11480            | Self::UsAnthropicClaudeOpus4120250805V10
11481            | Self::UsAnthropicClaudeOpus4520251101V10
11482            | Self::UsAnthropicClaudeOpus46V1
11483            | Self::UsAnthropicClaudeOpus47
11484            | Self::UsAnthropicClaudeOpus48
11485            | Self::UsAnthropicClaudeOpus5
11486            | Self::UsAnthropicClaudeSonnet4520250929V10
11487            | Self::UsAnthropicClaudeSonnet46
11488            | Self::UsAnthropicClaudeSonnet5
11489            | Self::UsDeepseekR1V10
11490            | Self::UsMetaLlama4Maverick17bInstructV10
11491            | Self::UsMetaLlama4Scout17bInstructV10
11492            | Self::WriterPalmyraX4V10
11493            | Self::WriterPalmyraX5V10
11494            | Self::ZaiGlm47
11495            | Self::ZaiGlm47Flash
11496            | Self::ZaiGlm5 => None,
11497            Self::OpenaiGpt54
11498            | Self::OpenaiGpt55
11499            | Self::OpenaiGpt56Luna
11500            | Self::OpenaiGpt56Sol
11501            | Self::OpenaiGpt56Terra
11502            | Self::XaiGrok43 => {
11503                Some(ModelTransport::OpenAiResponses {
11504                    base_url_template: "https://bedrock-mantle.${AWS_REGION}.api.aws/openai/v1",
11505                })
11506            }
11507            Self::OpenaiGptOss120b | Self::OpenaiGptOss20b => {
11508                Some(ModelTransport::OpenAiResponses {
11509                    base_url_template: "https://bedrock-mantle.${AWS_REGION}.api.aws/v1",
11510                })
11511            }
11512        }
11513    }
11514    const ALL: &[BedrockFoundationModel] = &[
11515        Self::AmazonNova2LiteV10,
11516        Self::AmazonNovaLiteV10,
11517        Self::AmazonNovaMicroV10,
11518        Self::AmazonNovaProV10,
11519        Self::AnthropicClaudeFable5,
11520        Self::AnthropicClaudeHaiku4520251001V10,
11521        Self::AnthropicClaudeOpus4120250805V10,
11522        Self::AnthropicClaudeOpus4520251101V10,
11523        Self::AnthropicClaudeOpus46V1,
11524        Self::AnthropicClaudeOpus47,
11525        Self::AnthropicClaudeOpus48,
11526        Self::AnthropicClaudeOpus5,
11527        Self::AnthropicClaudeSonnet4520250929V10,
11528        Self::AnthropicClaudeSonnet46,
11529        Self::AnthropicClaudeSonnet5,
11530        Self::AuAnthropicClaudeHaiku4520251001V10,
11531        Self::AuAnthropicClaudeOpus46V1,
11532        Self::AuAnthropicClaudeOpus48,
11533        Self::AuAnthropicClaudeOpus5,
11534        Self::AuAnthropicClaudeSonnet4520250929V10,
11535        Self::AuAnthropicClaudeSonnet46,
11536        Self::AuAnthropicClaudeSonnet5,
11537        Self::DeepseekR1V10,
11538        Self::DeepseekV3V10,
11539        Self::DeepseekV32,
11540        Self::EuAnthropicClaudeFable5,
11541        Self::EuAnthropicClaudeHaiku4520251001V10,
11542        Self::EuAnthropicClaudeOpus4520251101V10,
11543        Self::EuAnthropicClaudeOpus46V1,
11544        Self::EuAnthropicClaudeOpus47,
11545        Self::EuAnthropicClaudeOpus48,
11546        Self::EuAnthropicClaudeOpus5,
11547        Self::EuAnthropicClaudeSonnet4520250929V10,
11548        Self::EuAnthropicClaudeSonnet46,
11549        Self::EuAnthropicClaudeSonnet5,
11550        Self::GlobalAnthropicClaudeFable5,
11551        Self::GlobalAnthropicClaudeHaiku4520251001V10,
11552        Self::GlobalAnthropicClaudeOpus4520251101V10,
11553        Self::GlobalAnthropicClaudeOpus46V1,
11554        Self::GlobalAnthropicClaudeOpus47,
11555        Self::GlobalAnthropicClaudeOpus48,
11556        Self::GlobalAnthropicClaudeOpus5,
11557        Self::GlobalAnthropicClaudeSonnet4520250929V10,
11558        Self::GlobalAnthropicClaudeSonnet46,
11559        Self::GlobalAnthropicClaudeSonnet5,
11560        Self::GoogleGemma327bIt,
11561        Self::GoogleGemma34bIt,
11562        Self::JpAnthropicClaudeHaiku4520251001V10,
11563        Self::JpAnthropicClaudeOpus47,
11564        Self::JpAnthropicClaudeOpus48,
11565        Self::JpAnthropicClaudeOpus5,
11566        Self::JpAnthropicClaudeSonnet4520250929V10,
11567        Self::JpAnthropicClaudeSonnet46,
11568        Self::JpAnthropicClaudeSonnet5,
11569        Self::MetaLlama3170bInstructV10,
11570        Self::MetaLlama318bInstructV10,
11571        Self::MetaLlama3370bInstructV10,
11572        Self::MetaLlama4Maverick17bInstructV10,
11573        Self::MetaLlama4Scout17bInstructV10,
11574        Self::MinimaxMinimaxM2,
11575        Self::MinimaxMinimaxM21,
11576        Self::MinimaxMinimaxM25,
11577        Self::MistralDevstral2123b,
11578        Self::MistralMagistralSmall2509,
11579        Self::MistralMinistral314bInstruct,
11580        Self::MistralMinistral33bInstruct,
11581        Self::MistralMinistral38bInstruct,
11582        Self::MistralMistralLarge3675bInstruct,
11583        Self::MistralPixtralLarge2502V10,
11584        Self::MistralVoxtralMini3b2507,
11585        Self::MistralVoxtralSmall24b2507,
11586        Self::MoonshotKimiK2Thinking,
11587        Self::MoonshotaiKimiK25,
11588        Self::NvidiaNemotronNano12bV2,
11589        Self::NvidiaNemotronNano330b,
11590        Self::NvidiaNemotronNano9bV2,
11591        Self::NvidiaNemotronSuper3120b,
11592        Self::OpenaiGpt54,
11593        Self::OpenaiGpt55,
11594        Self::OpenaiGpt56Luna,
11595        Self::OpenaiGpt56Sol,
11596        Self::OpenaiGpt56Terra,
11597        Self::OpenaiGptOss120b,
11598        Self::OpenaiGptOss120b10,
11599        Self::OpenaiGptOss20b,
11600        Self::OpenaiGptOss20b10,
11601        Self::OpenaiGptOssSafeguard120b,
11602        Self::OpenaiGptOssSafeguard20b,
11603        Self::QwenQwen3235bA22b2507V10,
11604        Self::QwenQwen332bV10,
11605        Self::QwenQwen3Coder30bA3bV10,
11606        Self::QwenQwen3Coder480bA35bV10,
11607        Self::QwenQwen3CoderNext,
11608        Self::QwenQwen3Next80bA3b,
11609        Self::QwenQwen3Vl235bA22b,
11610        Self::UsAnthropicClaudeFable5,
11611        Self::UsAnthropicClaudeHaiku4520251001V10,
11612        Self::UsAnthropicClaudeOpus4120250805V10,
11613        Self::UsAnthropicClaudeOpus4520251101V10,
11614        Self::UsAnthropicClaudeOpus46V1,
11615        Self::UsAnthropicClaudeOpus47,
11616        Self::UsAnthropicClaudeOpus48,
11617        Self::UsAnthropicClaudeOpus5,
11618        Self::UsAnthropicClaudeSonnet4520250929V10,
11619        Self::UsAnthropicClaudeSonnet46,
11620        Self::UsAnthropicClaudeSonnet5,
11621        Self::UsDeepseekR1V10,
11622        Self::UsMetaLlama4Maverick17bInstructV10,
11623        Self::UsMetaLlama4Scout17bInstructV10,
11624        Self::WriterPalmyraX4V10,
11625        Self::WriterPalmyraX5V10,
11626        Self::XaiGrok43,
11627        Self::ZaiGlm47,
11628        Self::ZaiGlm47Flash,
11629        Self::ZaiGlm5,
11630    ];
11631}
11632impl std::str::FromStr for BedrockFoundationModel {
11633    type Err = String;
11634    #[allow(clippy::too_many_lines)]
11635    fn from_str(s: &str) -> Result<Self, Self::Err> {
11636        match s {
11637            "amazon.nova-2-lite-v1:0" => Ok(Self::AmazonNova2LiteV10),
11638            "amazon.nova-lite-v1:0" => Ok(Self::AmazonNovaLiteV10),
11639            "amazon.nova-micro-v1:0" => Ok(Self::AmazonNovaMicroV10),
11640            "amazon.nova-pro-v1:0" => Ok(Self::AmazonNovaProV10),
11641            "anthropic.claude-fable-5" => Ok(Self::AnthropicClaudeFable5),
11642            "anthropic.claude-haiku-4-5-20251001-v1:0" => {
11643                Ok(Self::AnthropicClaudeHaiku4520251001V10)
11644            }
11645            "anthropic.claude-opus-4-1-20250805-v1:0" => {
11646                Ok(Self::AnthropicClaudeOpus4120250805V10)
11647            }
11648            "anthropic.claude-opus-4-5-20251101-v1:0" => {
11649                Ok(Self::AnthropicClaudeOpus4520251101V10)
11650            }
11651            "anthropic.claude-opus-4-6-v1" => Ok(Self::AnthropicClaudeOpus46V1),
11652            "anthropic.claude-opus-4-7" => Ok(Self::AnthropicClaudeOpus47),
11653            "anthropic.claude-opus-4-8" => Ok(Self::AnthropicClaudeOpus48),
11654            "anthropic.claude-opus-5" => Ok(Self::AnthropicClaudeOpus5),
11655            "anthropic.claude-sonnet-4-5-20250929-v1:0" => {
11656                Ok(Self::AnthropicClaudeSonnet4520250929V10)
11657            }
11658            "anthropic.claude-sonnet-4-6" => Ok(Self::AnthropicClaudeSonnet46),
11659            "anthropic.claude-sonnet-5" => Ok(Self::AnthropicClaudeSonnet5),
11660            "au.anthropic.claude-haiku-4-5-20251001-v1:0" => {
11661                Ok(Self::AuAnthropicClaudeHaiku4520251001V10)
11662            }
11663            "au.anthropic.claude-opus-4-6-v1" => Ok(Self::AuAnthropicClaudeOpus46V1),
11664            "au.anthropic.claude-opus-4-8" => Ok(Self::AuAnthropicClaudeOpus48),
11665            "au.anthropic.claude-opus-5" => Ok(Self::AuAnthropicClaudeOpus5),
11666            "au.anthropic.claude-sonnet-4-5-20250929-v1:0" => {
11667                Ok(Self::AuAnthropicClaudeSonnet4520250929V10)
11668            }
11669            "au.anthropic.claude-sonnet-4-6" => Ok(Self::AuAnthropicClaudeSonnet46),
11670            "au.anthropic.claude-sonnet-5" => Ok(Self::AuAnthropicClaudeSonnet5),
11671            "deepseek.r1-v1:0" => Ok(Self::DeepseekR1V10),
11672            "deepseek.v3-v1:0" => Ok(Self::DeepseekV3V10),
11673            "deepseek.v3.2" => Ok(Self::DeepseekV32),
11674            "eu.anthropic.claude-fable-5" => Ok(Self::EuAnthropicClaudeFable5),
11675            "eu.anthropic.claude-haiku-4-5-20251001-v1:0" => {
11676                Ok(Self::EuAnthropicClaudeHaiku4520251001V10)
11677            }
11678            "eu.anthropic.claude-opus-4-5-20251101-v1:0" => {
11679                Ok(Self::EuAnthropicClaudeOpus4520251101V10)
11680            }
11681            "eu.anthropic.claude-opus-4-6-v1" => Ok(Self::EuAnthropicClaudeOpus46V1),
11682            "eu.anthropic.claude-opus-4-7" => Ok(Self::EuAnthropicClaudeOpus47),
11683            "eu.anthropic.claude-opus-4-8" => Ok(Self::EuAnthropicClaudeOpus48),
11684            "eu.anthropic.claude-opus-5" => Ok(Self::EuAnthropicClaudeOpus5),
11685            "eu.anthropic.claude-sonnet-4-5-20250929-v1:0" => {
11686                Ok(Self::EuAnthropicClaudeSonnet4520250929V10)
11687            }
11688            "eu.anthropic.claude-sonnet-4-6" => Ok(Self::EuAnthropicClaudeSonnet46),
11689            "eu.anthropic.claude-sonnet-5" => Ok(Self::EuAnthropicClaudeSonnet5),
11690            "global.anthropic.claude-fable-5" => Ok(Self::GlobalAnthropicClaudeFable5),
11691            "global.anthropic.claude-haiku-4-5-20251001-v1:0" => {
11692                Ok(Self::GlobalAnthropicClaudeHaiku4520251001V10)
11693            }
11694            "global.anthropic.claude-opus-4-5-20251101-v1:0" => {
11695                Ok(Self::GlobalAnthropicClaudeOpus4520251101V10)
11696            }
11697            "global.anthropic.claude-opus-4-6-v1" => {
11698                Ok(Self::GlobalAnthropicClaudeOpus46V1)
11699            }
11700            "global.anthropic.claude-opus-4-7" => Ok(Self::GlobalAnthropicClaudeOpus47),
11701            "global.anthropic.claude-opus-4-8" => Ok(Self::GlobalAnthropicClaudeOpus48),
11702            "global.anthropic.claude-opus-5" => Ok(Self::GlobalAnthropicClaudeOpus5),
11703            "global.anthropic.claude-sonnet-4-5-20250929-v1:0" => {
11704                Ok(Self::GlobalAnthropicClaudeSonnet4520250929V10)
11705            }
11706            "global.anthropic.claude-sonnet-4-6" => {
11707                Ok(Self::GlobalAnthropicClaudeSonnet46)
11708            }
11709            "global.anthropic.claude-sonnet-5" => Ok(Self::GlobalAnthropicClaudeSonnet5),
11710            "google.gemma-3-27b-it" => Ok(Self::GoogleGemma327bIt),
11711            "google.gemma-3-4b-it" => Ok(Self::GoogleGemma34bIt),
11712            "jp.anthropic.claude-haiku-4-5-20251001-v1:0" => {
11713                Ok(Self::JpAnthropicClaudeHaiku4520251001V10)
11714            }
11715            "jp.anthropic.claude-opus-4-7" => Ok(Self::JpAnthropicClaudeOpus47),
11716            "jp.anthropic.claude-opus-4-8" => Ok(Self::JpAnthropicClaudeOpus48),
11717            "jp.anthropic.claude-opus-5" => Ok(Self::JpAnthropicClaudeOpus5),
11718            "jp.anthropic.claude-sonnet-4-5-20250929-v1:0" => {
11719                Ok(Self::JpAnthropicClaudeSonnet4520250929V10)
11720            }
11721            "jp.anthropic.claude-sonnet-4-6" => Ok(Self::JpAnthropicClaudeSonnet46),
11722            "jp.anthropic.claude-sonnet-5" => Ok(Self::JpAnthropicClaudeSonnet5),
11723            "meta.llama3-1-70b-instruct-v1:0" => Ok(Self::MetaLlama3170bInstructV10),
11724            "meta.llama3-1-8b-instruct-v1:0" => Ok(Self::MetaLlama318bInstructV10),
11725            "meta.llama3-3-70b-instruct-v1:0" => Ok(Self::MetaLlama3370bInstructV10),
11726            "meta.llama4-maverick-17b-instruct-v1:0" => {
11727                Ok(Self::MetaLlama4Maverick17bInstructV10)
11728            }
11729            "meta.llama4-scout-17b-instruct-v1:0" => {
11730                Ok(Self::MetaLlama4Scout17bInstructV10)
11731            }
11732            "minimax.minimax-m2" => Ok(Self::MinimaxMinimaxM2),
11733            "minimax.minimax-m2.1" => Ok(Self::MinimaxMinimaxM21),
11734            "minimax.minimax-m2.5" => Ok(Self::MinimaxMinimaxM25),
11735            "mistral.devstral-2-123b" => Ok(Self::MistralDevstral2123b),
11736            "mistral.magistral-small-2509" => Ok(Self::MistralMagistralSmall2509),
11737            "mistral.ministral-3-14b-instruct" => Ok(Self::MistralMinistral314bInstruct),
11738            "mistral.ministral-3-3b-instruct" => Ok(Self::MistralMinistral33bInstruct),
11739            "mistral.ministral-3-8b-instruct" => Ok(Self::MistralMinistral38bInstruct),
11740            "mistral.mistral-large-3-675b-instruct" => {
11741                Ok(Self::MistralMistralLarge3675bInstruct)
11742            }
11743            "mistral.pixtral-large-2502-v1:0" => Ok(Self::MistralPixtralLarge2502V10),
11744            "mistral.voxtral-mini-3b-2507" => Ok(Self::MistralVoxtralMini3b2507),
11745            "mistral.voxtral-small-24b-2507" => Ok(Self::MistralVoxtralSmall24b2507),
11746            "moonshot.kimi-k2-thinking" => Ok(Self::MoonshotKimiK2Thinking),
11747            "moonshotai.kimi-k2.5" => Ok(Self::MoonshotaiKimiK25),
11748            "nvidia.nemotron-nano-12b-v2" => Ok(Self::NvidiaNemotronNano12bV2),
11749            "nvidia.nemotron-nano-3-30b" => Ok(Self::NvidiaNemotronNano330b),
11750            "nvidia.nemotron-nano-9b-v2" => Ok(Self::NvidiaNemotronNano9bV2),
11751            "nvidia.nemotron-super-3-120b" => Ok(Self::NvidiaNemotronSuper3120b),
11752            "openai.gpt-5.4" => Ok(Self::OpenaiGpt54),
11753            "openai.gpt-5.5" => Ok(Self::OpenaiGpt55),
11754            "openai.gpt-5.6-luna" => Ok(Self::OpenaiGpt56Luna),
11755            "openai.gpt-5.6-sol" => Ok(Self::OpenaiGpt56Sol),
11756            "openai.gpt-5.6-terra" => Ok(Self::OpenaiGpt56Terra),
11757            "openai.gpt-oss-120b" => Ok(Self::OpenaiGptOss120b),
11758            "openai.gpt-oss-120b-1:0" => Ok(Self::OpenaiGptOss120b10),
11759            "openai.gpt-oss-20b" => Ok(Self::OpenaiGptOss20b),
11760            "openai.gpt-oss-20b-1:0" => Ok(Self::OpenaiGptOss20b10),
11761            "openai.gpt-oss-safeguard-120b" => Ok(Self::OpenaiGptOssSafeguard120b),
11762            "openai.gpt-oss-safeguard-20b" => Ok(Self::OpenaiGptOssSafeguard20b),
11763            "qwen.qwen3-235b-a22b-2507-v1:0" => Ok(Self::QwenQwen3235bA22b2507V10),
11764            "qwen.qwen3-32b-v1:0" => Ok(Self::QwenQwen332bV10),
11765            "qwen.qwen3-coder-30b-a3b-v1:0" => Ok(Self::QwenQwen3Coder30bA3bV10),
11766            "qwen.qwen3-coder-480b-a35b-v1:0" => Ok(Self::QwenQwen3Coder480bA35bV10),
11767            "qwen.qwen3-coder-next" => Ok(Self::QwenQwen3CoderNext),
11768            "qwen.qwen3-next-80b-a3b" => Ok(Self::QwenQwen3Next80bA3b),
11769            "qwen.qwen3-vl-235b-a22b" => Ok(Self::QwenQwen3Vl235bA22b),
11770            "us.anthropic.claude-fable-5" => Ok(Self::UsAnthropicClaudeFable5),
11771            "us.anthropic.claude-haiku-4-5-20251001-v1:0" => {
11772                Ok(Self::UsAnthropicClaudeHaiku4520251001V10)
11773            }
11774            "us.anthropic.claude-opus-4-1-20250805-v1:0" => {
11775                Ok(Self::UsAnthropicClaudeOpus4120250805V10)
11776            }
11777            "us.anthropic.claude-opus-4-5-20251101-v1:0" => {
11778                Ok(Self::UsAnthropicClaudeOpus4520251101V10)
11779            }
11780            "us.anthropic.claude-opus-4-6-v1" => Ok(Self::UsAnthropicClaudeOpus46V1),
11781            "us.anthropic.claude-opus-4-7" => Ok(Self::UsAnthropicClaudeOpus47),
11782            "us.anthropic.claude-opus-4-8" => Ok(Self::UsAnthropicClaudeOpus48),
11783            "us.anthropic.claude-opus-5" => Ok(Self::UsAnthropicClaudeOpus5),
11784            "us.anthropic.claude-sonnet-4-5-20250929-v1:0" => {
11785                Ok(Self::UsAnthropicClaudeSonnet4520250929V10)
11786            }
11787            "us.anthropic.claude-sonnet-4-6" => Ok(Self::UsAnthropicClaudeSonnet46),
11788            "us.anthropic.claude-sonnet-5" => Ok(Self::UsAnthropicClaudeSonnet5),
11789            "us.deepseek.r1-v1:0" => Ok(Self::UsDeepseekR1V10),
11790            "us.meta.llama4-maverick-17b-instruct-v1:0" => {
11791                Ok(Self::UsMetaLlama4Maverick17bInstructV10)
11792            }
11793            "us.meta.llama4-scout-17b-instruct-v1:0" => {
11794                Ok(Self::UsMetaLlama4Scout17bInstructV10)
11795            }
11796            "writer.palmyra-x4-v1:0" => Ok(Self::WriterPalmyraX4V10),
11797            "writer.palmyra-x5-v1:0" => Ok(Self::WriterPalmyraX5V10),
11798            "xai.grok-4.3" => Ok(Self::XaiGrok43),
11799            "zai.glm-4.7" => Ok(Self::ZaiGlm47),
11800            "zai.glm-4.7-flash" => Ok(Self::ZaiGlm47Flash),
11801            "zai.glm-5" => Ok(Self::ZaiGlm5),
11802            _ => Err(format!("Unknown bedrock model: '{s}'")),
11803        }
11804    }
11805}
11806/// A model from a specific provider
11807#[derive(Debug, Clone, PartialEq, Eq, Hash)]
11808pub enum LlmModel {
11809    Anthropic(AnthropicModel),
11810    AzureFoundry(AzureFoundryModel),
11811    Codex(CodexModel),
11812    DeepSeek(DeepSeekModel),
11813    Fireworks(FireworksModel),
11814    Gemini(GeminiModel),
11815    Moonshot(MoonshotModel),
11816    Openai(OpenaiModel),
11817    OpenRouter(OpenRouterModel),
11818    ZAi(ZAiModel),
11819    Bedrock(BedrockModel),
11820    Ollama(String),
11821    LlamaCpp(String),
11822}
11823impl From<AnthropicModel> for LlmModel {
11824    fn from(m: AnthropicModel) -> Self {
11825        LlmModel::Anthropic(m)
11826    }
11827}
11828impl From<AzureFoundryModel> for LlmModel {
11829    fn from(m: AzureFoundryModel) -> Self {
11830        LlmModel::AzureFoundry(m)
11831    }
11832}
11833impl From<CodexModel> for LlmModel {
11834    fn from(m: CodexModel) -> Self {
11835        LlmModel::Codex(m)
11836    }
11837}
11838impl From<DeepSeekModel> for LlmModel {
11839    fn from(m: DeepSeekModel) -> Self {
11840        LlmModel::DeepSeek(m)
11841    }
11842}
11843impl From<FireworksModel> for LlmModel {
11844    fn from(m: FireworksModel) -> Self {
11845        LlmModel::Fireworks(m)
11846    }
11847}
11848impl From<GeminiModel> for LlmModel {
11849    fn from(m: GeminiModel) -> Self {
11850        LlmModel::Gemini(m)
11851    }
11852}
11853impl From<MoonshotModel> for LlmModel {
11854    fn from(m: MoonshotModel) -> Self {
11855        LlmModel::Moonshot(m)
11856    }
11857}
11858impl From<OpenaiModel> for LlmModel {
11859    fn from(m: OpenaiModel) -> Self {
11860        LlmModel::Openai(m)
11861    }
11862}
11863impl From<OpenRouterModel> for LlmModel {
11864    fn from(m: OpenRouterModel) -> Self {
11865        LlmModel::OpenRouter(m)
11866    }
11867}
11868impl From<ZAiModel> for LlmModel {
11869    fn from(m: ZAiModel) -> Self {
11870        LlmModel::ZAi(m)
11871    }
11872}
11873impl From<BedrockModel> for LlmModel {
11874    fn from(m: BedrockModel) -> Self {
11875        LlmModel::Bedrock(m)
11876    }
11877}
11878impl LlmModel {
11879    /// Raw model ID (e.g. `claude-opus-4-6`, `llama3.2`)
11880    pub fn model_id(&self) -> Cow<'static, str> {
11881        match self {
11882            Self::Anthropic(m) => Cow::Borrowed(m.model_id()),
11883            Self::AzureFoundry(m) => Cow::Borrowed(m.model_id()),
11884            Self::Codex(m) => Cow::Borrowed(m.model_id()),
11885            Self::DeepSeek(m) => Cow::Borrowed(m.model_id()),
11886            Self::Fireworks(m) => Cow::Borrowed(m.model_id()),
11887            Self::Gemini(m) => Cow::Borrowed(m.model_id()),
11888            Self::Moonshot(m) => Cow::Borrowed(m.model_id()),
11889            Self::Openai(m) => Cow::Borrowed(m.model_id()),
11890            Self::OpenRouter(m) => Cow::Borrowed(m.model_id()),
11891            Self::ZAi(m) => Cow::Borrowed(m.model_id()),
11892            Self::Bedrock(m) => m.model_id(),
11893            Self::Ollama(s) | Self::LlamaCpp(s) => Cow::Owned(s.clone()),
11894        }
11895    }
11896    /// Human-readable display name (e.g. `Claude Opus 4.6`)
11897    pub fn display_name(&self) -> Cow<'static, str> {
11898        match self {
11899            Self::Anthropic(m) => Cow::Borrowed(m.display_name()),
11900            Self::AzureFoundry(m) => Cow::Borrowed(m.display_name()),
11901            Self::Codex(m) => Cow::Borrowed(m.display_name()),
11902            Self::DeepSeek(m) => Cow::Borrowed(m.display_name()),
11903            Self::Fireworks(m) => Cow::Borrowed(m.display_name()),
11904            Self::Gemini(m) => Cow::Borrowed(m.display_name()),
11905            Self::Moonshot(m) => Cow::Borrowed(m.display_name()),
11906            Self::Openai(m) => Cow::Borrowed(m.display_name()),
11907            Self::OpenRouter(m) => Cow::Borrowed(m.display_name()),
11908            Self::ZAi(m) => Cow::Borrowed(m.display_name()),
11909            Self::Bedrock(m) => m.display_name(),
11910            Self::Ollama(s) => Cow::Owned(format!("Ollama {s}")),
11911            Self::LlamaCpp(s) => Cow::Owned(format!("LlamaCpp {s}")),
11912        }
11913    }
11914    /// Provider identifier (e.g. `anthropic`)
11915    pub fn provider(&self) -> &'static str {
11916        match self {
11917            Self::Anthropic(_) => "anthropic",
11918            Self::AzureFoundry(_) => "azure-foundry",
11919            Self::Codex(_) => "codex",
11920            Self::DeepSeek(_) => "deepseek",
11921            Self::Fireworks(_) => "fireworks",
11922            Self::Gemini(_) => "gemini",
11923            Self::Moonshot(_) => "moonshot",
11924            Self::Openai(_) => "openai",
11925            Self::OpenRouter(_) => "openrouter",
11926            Self::ZAi(_) => "zai",
11927            Self::Bedrock(_) => "bedrock",
11928            Self::Ollama(_) => "ollama",
11929            Self::LlamaCpp(_) => "llamacpp",
11930        }
11931    }
11932    /// Typed provider identifier.
11933    pub fn provider_enum(&self) -> Provider {
11934        match self {
11935            Self::Anthropic(_) => Provider::Anthropic,
11936            Self::AzureFoundry(_) => Provider::AzureFoundry,
11937            Self::Codex(_) => Provider::Codex,
11938            Self::DeepSeek(_) => Provider::DeepSeek,
11939            Self::Fireworks(_) => Provider::Fireworks,
11940            Self::Gemini(_) => Provider::Gemini,
11941            Self::Moonshot(_) => Provider::Moonshot,
11942            Self::Openai(_) => Provider::Openai,
11943            Self::OpenRouter(_) => Provider::OpenRouter,
11944            Self::ZAi(_) => Provider::ZAi,
11945            Self::Bedrock(_) => Provider::Bedrock,
11946            Self::Ollama(_) => Provider::Ollama,
11947            Self::LlamaCpp(_) => Provider::LlamaCpp,
11948        }
11949    }
11950    /// Human-readable provider name (e.g. `AWS Bedrock`)
11951    pub fn provider_display_name(&self) -> &'static str {
11952        match self {
11953            Self::Anthropic(_) => "Anthropic",
11954            Self::AzureFoundry(_) => "Microsoft Foundry",
11955            Self::Codex(_) => "Codex",
11956            Self::DeepSeek(_) => "DeepSeek",
11957            Self::Fireworks(_) => "Fireworks AI",
11958            Self::Gemini(_) => "Gemini",
11959            Self::Moonshot(_) => "Moonshot",
11960            Self::Openai(_) => "OpenAI",
11961            Self::OpenRouter(_) => "OpenRouter",
11962            Self::ZAi(_) => "ZAI",
11963            Self::Bedrock(_) => "AWS Bedrock",
11964            Self::Ollama(_) => "Ollama",
11965            Self::LlamaCpp(_) => "LlamaCpp",
11966        }
11967    }
11968    /// Context window size in tokens (None for dynamic providers)
11969    pub fn context_window(&self) -> Option<u32> {
11970        match self {
11971            Self::Anthropic(m) => Some(m.context_window()),
11972            Self::AzureFoundry(m) => Some(m.context_window()),
11973            Self::Codex(m) => Some(m.context_window()),
11974            Self::DeepSeek(m) => Some(m.context_window()),
11975            Self::Fireworks(m) => Some(m.context_window()),
11976            Self::Gemini(m) => Some(m.context_window()),
11977            Self::Moonshot(m) => Some(m.context_window()),
11978            Self::Openai(m) => Some(m.context_window()),
11979            Self::OpenRouter(m) => Some(m.context_window()),
11980            Self::ZAi(m) => Some(m.context_window()),
11981            Self::Bedrock(m) => m.context_window(),
11982            Self::Ollama(_) | Self::LlamaCpp(_) => None,
11983        }
11984    }
11985    /// Required env var for this model's provider (None for local providers)
11986    pub fn required_env_var(&self) -> Option<&'static str> {
11987        match self {
11988            Self::Anthropic(_) => Some("ANTHROPIC_API_KEY"),
11989            Self::AzureFoundry(_) => Some("AZURE_OPENAI_API_KEY"),
11990            Self::DeepSeek(_) => Some("DEEPSEEK_API_KEY"),
11991            Self::Fireworks(_) => Some("FIREWORKS_API_KEY"),
11992            Self::Gemini(_) => Some("GEMINI_API_KEY"),
11993            Self::Moonshot(_) => Some("MOONSHOT_API_KEY"),
11994            Self::Openai(_) => Some("OPENAI_API_KEY"),
11995            Self::OpenRouter(_) => Some("OPENROUTER_API_KEY"),
11996            Self::ZAi(_) => Some("ZAI_API_KEY"),
11997            Self::Codex(_) | Self::Bedrock(_) | Self::Ollama(_) | Self::LlamaCpp(_) => {
11998                None
11999            }
12000        }
12001    }
12002    /// All provider API key env var names (deduplicated, static)
12003    pub const ALL_REQUIRED_ENV_VARS: &[&str] = &[
12004        "ANTHROPIC_API_KEY",
12005        "AZURE_OPENAI_API_KEY",
12006        "DEEPSEEK_API_KEY",
12007        "FIREWORKS_API_KEY",
12008        "GEMINI_API_KEY",
12009        "MOONSHOT_API_KEY",
12010        "OPENAI_API_KEY",
12011        "OPENROUTER_API_KEY",
12012        "ZAI_API_KEY",
12013    ];
12014    /// OAuth provider ID if this model requires OAuth login (e.g. `"codex"`)
12015    pub fn oauth_provider_id(&self) -> Option<&'static str> {
12016        match self {
12017            Self::Codex(_) => Some("codex"),
12018            Self::Anthropic(_)
12019            | Self::AzureFoundry(_)
12020            | Self::DeepSeek(_)
12021            | Self::Fireworks(_)
12022            | Self::Gemini(_)
12023            | Self::Moonshot(_)
12024            | Self::Openai(_)
12025            | Self::OpenRouter(_)
12026            | Self::ZAi(_)
12027            | Self::Bedrock(_)
12028            | Self::Ollama(_)
12029            | Self::LlamaCpp(_) => None,
12030        }
12031    }
12032    /// Reasoning levels supported by this model (empty if not a reasoning model)
12033    pub fn reasoning_levels(&self) -> &'static [ReasoningEffort] {
12034        match self {
12035            Self::Anthropic(m) => m.reasoning_levels(),
12036            Self::AzureFoundry(m) => m.reasoning_levels(),
12037            Self::Codex(m) => m.reasoning_levels(),
12038            Self::DeepSeek(m) => m.reasoning_levels(),
12039            Self::Fireworks(m) => m.reasoning_levels(),
12040            Self::Gemini(m) => m.reasoning_levels(),
12041            Self::Moonshot(m) => m.reasoning_levels(),
12042            Self::Openai(m) => m.reasoning_levels(),
12043            Self::OpenRouter(m) => m.reasoning_levels(),
12044            Self::ZAi(m) => m.reasoning_levels(),
12045            Self::Bedrock(m) => m.reasoning_levels(),
12046            Self::Ollama(_) | Self::LlamaCpp(_) => &[],
12047        }
12048    }
12049    /// Whether this model supports reasoning/extended thinking
12050    pub fn supports_reasoning(&self) -> bool {
12051        !self.reasoning_levels().is_empty()
12052    }
12053    /// Whether this model supports provider-side prompt caching
12054    pub fn supports_prompt_caching(&self) -> bool {
12055        match self {
12056            Self::Anthropic(m) => m.supports_prompt_caching(),
12057            Self::AzureFoundry(m) => m.supports_prompt_caching(),
12058            Self::Codex(m) => m.supports_prompt_caching(),
12059            Self::DeepSeek(m) => m.supports_prompt_caching(),
12060            Self::Fireworks(m) => m.supports_prompt_caching(),
12061            Self::Gemini(m) => m.supports_prompt_caching(),
12062            Self::Moonshot(m) => m.supports_prompt_caching(),
12063            Self::Openai(m) => m.supports_prompt_caching(),
12064            Self::OpenRouter(m) => m.supports_prompt_caching(),
12065            Self::ZAi(m) => m.supports_prompt_caching(),
12066            Self::Bedrock(m) => m.supports_prompt_caching(),
12067            Self::Ollama(_) | Self::LlamaCpp(_) => false,
12068        }
12069    }
12070    pub fn pricing(&self) -> Option<ModelPricing> {
12071        match self {
12072            Self::Anthropic(m) => m.pricing(),
12073            Self::AzureFoundry(m) => m.pricing(),
12074            Self::Codex(m) => m.pricing(),
12075            Self::DeepSeek(m) => m.pricing(),
12076            Self::Fireworks(m) => m.pricing(),
12077            Self::Gemini(m) => m.pricing(),
12078            Self::Moonshot(m) => m.pricing(),
12079            Self::Openai(m) => m.pricing(),
12080            Self::OpenRouter(m) => m.pricing(),
12081            Self::ZAi(m) => m.pricing(),
12082            Self::Bedrock(m) => m.pricing(),
12083            Self::Ollama(_) | Self::LlamaCpp(_) => None,
12084        }
12085    }
12086    /// Whether this model supports image input
12087    pub fn supports_image(&self) -> bool {
12088        match self {
12089            Self::Anthropic(m) => m.supports_image(),
12090            Self::AzureFoundry(m) => m.supports_image(),
12091            Self::Codex(m) => m.supports_image(),
12092            Self::DeepSeek(m) => m.supports_image(),
12093            Self::Fireworks(m) => m.supports_image(),
12094            Self::Gemini(m) => m.supports_image(),
12095            Self::Moonshot(m) => m.supports_image(),
12096            Self::Openai(m) => m.supports_image(),
12097            Self::OpenRouter(m) => m.supports_image(),
12098            Self::ZAi(m) => m.supports_image(),
12099            Self::Bedrock(m) => m.supports_image(),
12100            Self::Ollama(_) | Self::LlamaCpp(_) => false,
12101        }
12102    }
12103    /// Whether this model supports audio input
12104    pub fn supports_audio(&self) -> bool {
12105        match self {
12106            Self::Anthropic(m) => m.supports_audio(),
12107            Self::AzureFoundry(m) => m.supports_audio(),
12108            Self::Codex(m) => m.supports_audio(),
12109            Self::DeepSeek(m) => m.supports_audio(),
12110            Self::Fireworks(m) => m.supports_audio(),
12111            Self::Gemini(m) => m.supports_audio(),
12112            Self::Moonshot(m) => m.supports_audio(),
12113            Self::Openai(m) => m.supports_audio(),
12114            Self::OpenRouter(m) => m.supports_audio(),
12115            Self::ZAi(m) => m.supports_audio(),
12116            Self::Bedrock(m) => m.supports_audio(),
12117            Self::Ollama(_) | Self::LlamaCpp(_) => false,
12118        }
12119    }
12120    /// Per-model transport override, when the model does not use its
12121    /// provider's default endpoint and wire protocol.
12122    pub fn transport(&self) -> Option<ModelTransport> {
12123        match self {
12124            Self::Anthropic(m) => m.transport(),
12125            Self::AzureFoundry(m) => m.transport(),
12126            Self::Codex(m) => m.transport(),
12127            Self::DeepSeek(m) => m.transport(),
12128            Self::Fireworks(m) => m.transport(),
12129            Self::Gemini(m) => m.transport(),
12130            Self::Moonshot(m) => m.transport(),
12131            Self::Openai(m) => m.transport(),
12132            Self::OpenRouter(m) => m.transport(),
12133            Self::ZAi(m) => m.transport(),
12134            Self::Bedrock(m) => m.transport(),
12135            Self::Ollama(_) | Self::LlamaCpp(_) => None,
12136        }
12137    }
12138    /// All catalog models (excludes dynamic providers)
12139    pub fn all() -> &'static [LlmModel] {
12140        static ALL: LazyLock<Vec<LlmModel>> = LazyLock::new(|| {
12141            let mut v = Vec::new();
12142            v.extend(AnthropicModel::ALL.iter().copied().map(LlmModel::Anthropic));
12143            v.extend(AzureFoundryModel::ALL.iter().copied().map(LlmModel::AzureFoundry));
12144            v.extend(CodexModel::ALL.iter().copied().map(LlmModel::Codex));
12145            v.extend(DeepSeekModel::ALL.iter().copied().map(LlmModel::DeepSeek));
12146            v.extend(FireworksModel::ALL.iter().copied().map(LlmModel::Fireworks));
12147            v.extend(GeminiModel::ALL.iter().copied().map(LlmModel::Gemini));
12148            v.extend(MoonshotModel::ALL.iter().copied().map(LlmModel::Moonshot));
12149            v.extend(OpenaiModel::ALL.iter().copied().map(LlmModel::Openai));
12150            v.extend(OpenRouterModel::ALL.iter().copied().map(LlmModel::OpenRouter));
12151            v.extend(ZAiModel::ALL.iter().copied().map(LlmModel::ZAi));
12152            v.extend(
12153                BedrockFoundationModel::ALL
12154                    .iter()
12155                    .copied()
12156                    .map(BedrockModel::Foundation)
12157                    .map(LlmModel::Bedrock),
12158            );
12159            v
12160        });
12161        &ALL
12162    }
12163}
12164impl std::fmt::Display for LlmModel {
12165    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12166        write!(f, "{}:{}", self.provider(), self.model_id())
12167    }
12168}
12169impl std::str::FromStr for LlmModel {
12170    type Err = String;
12171    /// Parse a `provider:model` string into an `LlmModel`
12172    fn from_str(s: &str) -> Result<Self, Self::Err> {
12173        let (provider_str, model_str) = s.split_once(':').unwrap_or((s, ""));
12174        match provider_str {
12175            "anthropic" => model_str.parse::<AnthropicModel>().map(Self::Anthropic),
12176            "azure-foundry" => {
12177                model_str.parse::<AzureFoundryModel>().map(Self::AzureFoundry)
12178            }
12179            "codex" => model_str.parse::<CodexModel>().map(Self::Codex),
12180            "deepseek" => model_str.parse::<DeepSeekModel>().map(Self::DeepSeek),
12181            "fireworks" => model_str.parse::<FireworksModel>().map(Self::Fireworks),
12182            "gemini" => model_str.parse::<GeminiModel>().map(Self::Gemini),
12183            "moonshot" => model_str.parse::<MoonshotModel>().map(Self::Moonshot),
12184            "openai" => model_str.parse::<OpenaiModel>().map(Self::Openai),
12185            "openrouter" => model_str.parse::<OpenRouterModel>().map(Self::OpenRouter),
12186            "zai" => model_str.parse::<ZAiModel>().map(Self::ZAi),
12187            "bedrock" => model_str.parse::<BedrockModel>().map(Self::Bedrock),
12188            "ollama" => Ok(Self::Ollama(model_str.to_string())),
12189            "llamacpp" => Ok(Self::LlamaCpp(model_str.to_string())),
12190            _ => Err(format!("Unknown provider: '{provider_str}'")),
12191        }
12192    }
12193}