Skip to main content

llm/opt/rustwide/target/x86_64-unknown-linux-gnu/debug/build/aether-llm-a20199553b2b4159/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    ClaudeSonnet45,
189    ClaudeSonnet4520250929,
190    ClaudeSonnet46,
191    ClaudeSonnet5,
192}
193#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
194pub enum AzureFoundryModel {
195    ClaudeFable5,
196    ClaudeHaiku45,
197    ClaudeOpus41,
198    ClaudeOpus45,
199    ClaudeOpus46,
200    ClaudeOpus48,
201    ClaudeSonnet45,
202    ClaudeSonnet46,
203    ClaudeSonnet5,
204    Codestral2501,
205    CodexMini,
206    CohereCommandA,
207    CohereCommandR082024,
208    CohereCommandRPlus082024,
209    DeepseekR10528,
210    DeepseekV30324,
211    DeepseekV31,
212    DeepseekV32,
213    Gpt4,
214    Gpt432k,
215    Gpt4Turbo,
216    Gpt4TurboVision,
217    Gpt41,
218    Gpt41Mini,
219    Gpt41Nano,
220    Gpt4o,
221    Gpt4oMini,
222    Gpt5,
223    Gpt5Codex,
224    Gpt5Mini,
225    Gpt5Nano,
226    Gpt5Pro,
227    Gpt51,
228    Gpt51Chat,
229    Gpt51Codex,
230    Gpt51CodexMax,
231    Gpt51CodexMini,
232    Gpt52,
233    Gpt52Chat,
234    Gpt52Codex,
235    Gpt53Chat,
236    Gpt53Codex,
237    Gpt54,
238    Gpt54Mini,
239    Gpt54Nano,
240    Gpt54Pro,
241    Gpt55,
242    Gpt56Luna,
243    Gpt56Sol,
244    Gpt56Terra,
245    Grok41FastNonReasoning,
246    Grok41FastReasoning,
247    Grok420NonReasoning,
248    Grok420Reasoning,
249    Grok4FastReasoning,
250    KimiK2Thinking,
251    KimiK25,
252    KimiK26,
253    Llama3211bVisionInstruct,
254    Llama3290bVisionInstruct,
255    Llama3370bInstruct,
256    Llama4Maverick17b128eInstructFp8,
257    Llama4Scout17b16eInstruct,
258    MetaLlama31405bInstruct,
259    MetaLlama3170bInstruct,
260    MetaLlama318bInstruct,
261    Ministral3b,
262    MistralLarge2411,
263    MistralMedium2505,
264    MistralNemo,
265    MistralSmall2503,
266    ModelRouter,
267    O1,
268    O1Mini,
269    O3,
270    O3Mini,
271    O4Mini,
272    Phi4Mini,
273    Phi4MiniReasoning,
274}
275#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
276pub enum CodexModel {
277    Gpt52,
278    Gpt54,
279    Gpt54Mini,
280    Gpt55,
281    Gpt56Luna,
282    Gpt56Sol,
283    Gpt56Terra,
284}
285#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
286pub enum DeepSeekModel {
287    DeepseekChat,
288    DeepseekReasoner,
289    DeepseekV4Flash,
290    DeepseekV4Pro,
291}
292#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
293pub enum FireworksModel {
294    AccountsFireworksModelsDeepseekV4Flash,
295    AccountsFireworksModelsDeepseekV4Pro,
296    AccountsFireworksModelsGlm5p1,
297    AccountsFireworksModelsGlm5p2,
298    AccountsFireworksModelsGptOss120b,
299    AccountsFireworksModelsGptOss20b,
300    AccountsFireworksModelsKimiK2p6,
301    AccountsFireworksModelsKimiK2p7Code,
302    AccountsFireworksModelsMinimaxM2p7,
303    AccountsFireworksModelsMinimaxM3,
304    AccountsFireworksModelsQwen3p7Plus,
305    AccountsFireworksRoutersGlm5p1Fast,
306    AccountsFireworksRoutersGlm5p2Fast,
307    AccountsFireworksRoutersKimiK2p6Fast,
308    AccountsFireworksRoutersKimiK2p6Turbo,
309    AccountsFireworksRoutersKimiK2p7CodeFast,
310}
311#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
312pub enum GeminiModel {
313    Gemini20Flash,
314    Gemini20FlashLite,
315    Gemini25Flash,
316    Gemini25FlashLite,
317    Gemini25Pro,
318    Gemini3FlashPreview,
319    Gemini3ProPreview,
320    Gemini31FlashLite,
321    Gemini31FlashLitePreview,
322    Gemini31ProPreview,
323    Gemini31ProPreviewCustomtools,
324    Gemini35Flash,
325    Gemma426bA4bIt,
326    Gemma431bIt,
327}
328#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
329pub enum MoonshotModel {
330    KimiK20711Preview,
331    KimiK20905Preview,
332    KimiK2Thinking,
333    KimiK2ThinkingTurbo,
334    KimiK2TurboPreview,
335    KimiK25,
336    KimiK26,
337    KimiK27Code,
338    KimiK27CodeHighspeed,
339    KimiK3,
340}
341#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
342pub enum OpenaiModel {
343    Gpt4,
344    Gpt4Turbo,
345    Gpt41,
346    Gpt41Mini,
347    Gpt41Nano,
348    Gpt4o,
349    Gpt4o20240513,
350    Gpt4o20240806,
351    Gpt4o20241120,
352    Gpt4oMini,
353    Gpt5,
354    Gpt5Codex,
355    Gpt5Mini,
356    Gpt5Nano,
357    Gpt5Pro,
358    Gpt51,
359    Gpt51Codex,
360    Gpt51CodexMax,
361    Gpt51CodexMini,
362    Gpt52,
363    Gpt52Codex,
364    Gpt52Pro,
365    Gpt53Codex,
366    Gpt53CodexSpark,
367    Gpt54,
368    Gpt54Mini,
369    Gpt54Nano,
370    Gpt54Pro,
371    Gpt55,
372    Gpt55Pro,
373    Gpt56,
374    Gpt56Luna,
375    Gpt56Sol,
376    Gpt56Terra,
377    GptRealtime21,
378    O1,
379    O1Pro,
380    O3,
381    O3DeepResearch,
382    O3Mini,
383    O3Pro,
384    O4Mini,
385    O4MiniDeepResearch,
386}
387#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
388pub enum OpenRouterModel {
389    Ai21JambaLarge17,
390    AionLabsAion20,
391    AionLabsAion30,
392    AionLabsAion30Mini,
393    AmazonNova2LiteV1,
394    AmazonNovaLiteV1,
395    AmazonNovaMicroV1,
396    AmazonNovaPremierV1,
397    AmazonNovaProV1,
398    AnthropicClaude3Haiku,
399    AnthropicClaudeFable5,
400    AnthropicClaudeHaiku45,
401    AnthropicClaudeOpus4,
402    AnthropicClaudeOpus41,
403    AnthropicClaudeOpus45,
404    AnthropicClaudeOpus46,
405    AnthropicClaudeOpus47,
406    AnthropicClaudeOpus47Fast,
407    AnthropicClaudeOpus48,
408    AnthropicClaudeOpus48Fast,
409    AnthropicClaudeSonnet4,
410    AnthropicClaudeSonnet45,
411    AnthropicClaudeSonnet46,
412    AnthropicClaudeSonnet5,
413    ArceeAiTrinityLargeThinking,
414    ArceeAiVirtuosoLarge,
415    BytedanceSeedSeed16,
416    BytedanceSeedSeed16Flash,
417    BytedanceSeedSeed20Lite,
418    BytedanceSeedSeed20Mini,
419    CohereCommandR082024,
420    CohereCommandRPlus082024,
421    CohereNorthMiniCodeFree,
422    DeepseekDeepseekChat,
423    DeepseekDeepseekChatV30324,
424    DeepseekDeepseekChatV31,
425    DeepseekDeepseekR1,
426    DeepseekDeepseekR10528,
427    DeepseekDeepseekV31Terminus,
428    DeepseekDeepseekV32,
429    DeepseekDeepseekV32Exp,
430    DeepseekDeepseekV4Flash,
431    DeepseekDeepseekV4Pro,
432    GoogleGemini25Flash,
433    GoogleGemini25FlashLite,
434    GoogleGemini25Pro,
435    GoogleGemini25ProPreview,
436    GoogleGemini25ProPreview0506,
437    GoogleGemini3FlashPreview,
438    GoogleGemini3ProImage,
439    GoogleGemini31FlashLite,
440    GoogleGemini31FlashLitePreview,
441    GoogleGemini31ProPreview,
442    GoogleGemini31ProPreviewCustomtools,
443    GoogleGemini35Flash,
444    GoogleGemma312bIt,
445    GoogleGemma327bIt,
446    GoogleGemma426bA4bIt,
447    GoogleGemma426bA4bItFree,
448    GoogleGemma431bIt,
449    GoogleGemma431bItFree,
450    IbmGraniteGranite418b,
451    InceptionMercury2,
452    InclusionaiLing261t,
453    InclusionaiLing26Flash,
454    InclusionaiRing261t,
455    KwaipilotKatCoderAirV25,
456    KwaipilotKatCoderProV2,
457    KwaipilotKatCoderProV25,
458    MetaLlamaLlama3170bInstruct,
459    MetaLlamaLlama318bInstruct,
460    MetaLlamaLlama3370bInstruct,
461    MetaLlamaLlama4Maverick,
462    MetaLlamaLlama4Scout,
463    MetaMuseSpark11,
464    MinimaxMinimaxM1,
465    MinimaxMinimaxM2,
466    MinimaxMinimaxM21,
467    MinimaxMinimaxM25,
468    MinimaxMinimaxM27,
469    MinimaxMinimaxM3,
470    MistralaiCodestral2508,
471    MistralaiDevstral2512,
472    MistralaiMinistral14b2512,
473    MistralaiMinistral3b2512,
474    MistralaiMinistral8b2512,
475    MistralaiMistralLarge,
476    MistralaiMistralLarge2407,
477    MistralaiMistralLarge2512,
478    MistralaiMistralMedium3,
479    MistralaiMistralMedium35,
480    MistralaiMistralMedium31,
481    MistralaiMistralNemo,
482    MistralaiMistralSaba,
483    MistralaiMistralSmall2603,
484    MistralaiMistralSmall3224bInstruct,
485    MistralaiMixtral8x22bInstruct,
486    MistralaiVoxtralSmall24b2507,
487    MoonshotaiKimiK2,
488    MoonshotaiKimiK20905,
489    MoonshotaiKimiK2Thinking,
490    MoonshotaiKimiK25,
491    MoonshotaiKimiK26,
492    MoonshotaiKimiK27Code,
493    MoonshotaiKimiK3,
494    NexAgiNexN2Mini,
495    NexAgiNexN2Pro,
496    NvidiaNemotron3Nano30bA3b,
497    NvidiaNemotron3Nano30bA3bFree,
498    NvidiaNemotron3NanoOmni30bA3bReasoningFree,
499    NvidiaNemotron3Super120bA12b,
500    NvidiaNemotron3Super120bA12bFree,
501    NvidiaNemotron3Ultra550bA55b,
502    NvidiaNemotron3Ultra550bA55bFree,
503    NvidiaNemotronNano12bV2VlFree,
504    NvidiaNemotronNano9bV2Free,
505    OpenaiGpt35Turbo,
506    OpenaiGpt35Turbo0613,
507    OpenaiGpt35Turbo16k,
508    OpenaiGpt4,
509    OpenaiGpt4Turbo,
510    OpenaiGpt4TurboPreview,
511    OpenaiGpt41,
512    OpenaiGpt41Mini,
513    OpenaiGpt41Nano,
514    OpenaiGpt4o,
515    OpenaiGpt4o20240513,
516    OpenaiGpt4o20240806,
517    OpenaiGpt4o20241120,
518    OpenaiGpt4oMini,
519    OpenaiGpt4oMini20240718,
520    OpenaiGpt5,
521    OpenaiGpt5Codex,
522    OpenaiGpt5Mini,
523    OpenaiGpt5Nano,
524    OpenaiGpt5Pro,
525    OpenaiGpt51,
526    OpenaiGpt51Chat,
527    OpenaiGpt51Codex,
528    OpenaiGpt51CodexMax,
529    OpenaiGpt51CodexMini,
530    OpenaiGpt52,
531    OpenaiGpt52Chat,
532    OpenaiGpt52Codex,
533    OpenaiGpt52Pro,
534    OpenaiGpt53Chat,
535    OpenaiGpt53Codex,
536    OpenaiGpt54,
537    OpenaiGpt54Mini,
538    OpenaiGpt54Nano,
539    OpenaiGpt54Pro,
540    OpenaiGpt55,
541    OpenaiGpt55Pro,
542    OpenaiGpt56Luna,
543    OpenaiGpt56LunaPro,
544    OpenaiGpt56Sol,
545    OpenaiGpt56SolPro,
546    OpenaiGpt56Terra,
547    OpenaiGpt56TerraPro,
548    OpenaiGptAudio,
549    OpenaiGptAudioMini,
550    OpenaiGptOss120b,
551    OpenaiGptOss20b,
552    OpenaiGptOss20bFree,
553    OpenaiGptOssSafeguard20b,
554    OpenaiO1,
555    OpenaiO3,
556    OpenaiO3DeepResearch,
557    OpenaiO3Mini,
558    OpenaiO3MiniHigh,
559    OpenaiO3Pro,
560    OpenaiO4Mini,
561    OpenaiO4MiniDeepResearch,
562    OpenaiO4MiniHigh,
563    OpenrouterAuto,
564    OpenrouterFree,
565    PoolsideLagunaM1,
566    PoolsideLagunaM1Free,
567    PoolsideLagunaXs21,
568    PoolsideLagunaXs21Free,
569    QwenQwen2572bInstruct,
570    QwenQwen257bInstruct,
571    QwenQwenPlus,
572    QwenQwenPlus20250728,
573    QwenQwenPlus20250728Thinking,
574    QwenQwen314b,
575    QwenQwen3235bA22b,
576    QwenQwen3235bA22b2507,
577    QwenQwen3235bA22bThinking2507,
578    QwenQwen330bA3b,
579    QwenQwen330bA3bInstruct2507,
580    QwenQwen330bA3bThinking2507,
581    QwenQwen332b,
582    QwenQwen38b,
583    QwenQwen3Coder,
584    QwenQwen3Coder30bA3bInstruct,
585    QwenQwen3CoderFlash,
586    QwenQwen3CoderNext,
587    QwenQwen3CoderPlus,
588    QwenQwen3Max,
589    QwenQwen3MaxThinking,
590    QwenQwen3Next80bA3bInstruct,
591    QwenQwen3Next80bA3bThinking,
592    QwenQwen3Vl235bA22bInstruct,
593    QwenQwen3Vl235bA22bThinking,
594    QwenQwen3Vl30bA3bInstruct,
595    QwenQwen3Vl30bA3bThinking,
596    QwenQwen3Vl32bInstruct,
597    QwenQwen3Vl8bInstruct,
598    QwenQwen3Vl8bThinking,
599    QwenQwen35122bA10b,
600    QwenQwen3527b,
601    QwenQwen3535bA3b,
602    QwenQwen35397bA17b,
603    QwenQwen359b,
604    QwenQwen35Flash0223,
605    QwenQwen35Plus0215,
606    QwenQwen35Plus20260420,
607    QwenQwen3627b,
608    QwenQwen3635bA3b,
609    QwenQwen36Flash,
610    QwenQwen36MaxPreview,
611    QwenQwen36Plus,
612    QwenQwen37Max,
613    QwenQwen37Plus,
614    RekaaiRekaEdge,
615    RelaceRelaceSearch,
616    SakanaFuguUltra,
617    Sao10kL31Euryale70b,
618    StepfunStep35Flash,
619    StepfunStep37Flash,
620    TencentHy3,
621    TencentHy3Preview,
622    TencentHy3Free,
623    ThedrummerUnslopnemo12b,
624    ThinkingmachinesInkling,
625    UpstageSolarPro3,
626    XAiGrok420,
627    XAiGrok43,
628    XAiGrok45,
629    XAiGrokBuild01,
630    XiaomiMimoV25,
631    XiaomiMimoV25Pro,
632    ZAiGlm45,
633    ZAiGlm45Air,
634    ZAiGlm45v,
635    ZAiGlm46,
636    ZAiGlm46v,
637    ZAiGlm47,
638    ZAiGlm47Flash,
639    ZAiGlm5,
640    ZAiGlm5Turbo,
641    ZAiGlm51,
642    ZAiGlm52,
643    ZAiGlm5vTurbo,
644}
645#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
646pub enum ZAiModel {
647    Glm45,
648    Glm45Air,
649    Glm45Flash,
650    Glm45v,
651    Glm46,
652    Glm46v,
653    Glm47,
654    Glm47Flash,
655    Glm47Flashx,
656    Glm5,
657    Glm5Turbo,
658    Glm51,
659    Glm52,
660    Glm5vTurbo,
661}
662#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
663pub enum BedrockFoundationModel {
664    AmazonNova2LiteV10,
665    AmazonNovaLiteV10,
666    AmazonNovaMicroV10,
667    AmazonNovaProV10,
668    AnthropicClaudeFable5,
669    AnthropicClaudeHaiku4520251001V10,
670    AnthropicClaudeOpus4120250805V10,
671    AnthropicClaudeOpus4520251101V10,
672    AnthropicClaudeOpus46V1,
673    AnthropicClaudeOpus47,
674    AnthropicClaudeOpus48,
675    AnthropicClaudeSonnet4520250929V10,
676    AnthropicClaudeSonnet46,
677    AnthropicClaudeSonnet5,
678    AuAnthropicClaudeHaiku4520251001V10,
679    AuAnthropicClaudeOpus46V1,
680    AuAnthropicClaudeOpus48,
681    AuAnthropicClaudeSonnet4520250929V10,
682    AuAnthropicClaudeSonnet46,
683    AuAnthropicClaudeSonnet5,
684    DeepseekR1V10,
685    DeepseekV3V10,
686    DeepseekV32,
687    EuAnthropicClaudeFable5,
688    EuAnthropicClaudeHaiku4520251001V10,
689    EuAnthropicClaudeOpus4520251101V10,
690    EuAnthropicClaudeOpus46V1,
691    EuAnthropicClaudeOpus47,
692    EuAnthropicClaudeOpus48,
693    EuAnthropicClaudeSonnet4520250929V10,
694    EuAnthropicClaudeSonnet46,
695    EuAnthropicClaudeSonnet5,
696    GlobalAnthropicClaudeFable5,
697    GlobalAnthropicClaudeHaiku4520251001V10,
698    GlobalAnthropicClaudeOpus4520251101V10,
699    GlobalAnthropicClaudeOpus46V1,
700    GlobalAnthropicClaudeOpus47,
701    GlobalAnthropicClaudeOpus48,
702    GlobalAnthropicClaudeSonnet4520250929V10,
703    GlobalAnthropicClaudeSonnet46,
704    GlobalAnthropicClaudeSonnet5,
705    GoogleGemma327bIt,
706    GoogleGemma34bIt,
707    JpAnthropicClaudeHaiku4520251001V10,
708    JpAnthropicClaudeOpus47,
709    JpAnthropicClaudeOpus48,
710    JpAnthropicClaudeSonnet4520250929V10,
711    JpAnthropicClaudeSonnet46,
712    JpAnthropicClaudeSonnet5,
713    MetaLlama3170bInstructV10,
714    MetaLlama318bInstructV10,
715    MetaLlama3370bInstructV10,
716    MetaLlama4Maverick17bInstructV10,
717    MetaLlama4Scout17bInstructV10,
718    MinimaxMinimaxM2,
719    MinimaxMinimaxM21,
720    MinimaxMinimaxM25,
721    MistralDevstral2123b,
722    MistralMagistralSmall2509,
723    MistralMinistral314bInstruct,
724    MistralMinistral33bInstruct,
725    MistralMinistral38bInstruct,
726    MistralMistralLarge3675bInstruct,
727    MistralPixtralLarge2502V10,
728    MistralVoxtralMini3b2507,
729    MistralVoxtralSmall24b2507,
730    MoonshotKimiK2Thinking,
731    MoonshotaiKimiK25,
732    NvidiaNemotronNano12bV2,
733    NvidiaNemotronNano330b,
734    NvidiaNemotronNano9bV2,
735    NvidiaNemotronSuper3120b,
736    OpenaiGpt54,
737    OpenaiGpt55,
738    OpenaiGpt56Luna,
739    OpenaiGpt56Sol,
740    OpenaiGpt56Terra,
741    OpenaiGptOss120b,
742    OpenaiGptOss120b10,
743    OpenaiGptOss20b,
744    OpenaiGptOss20b10,
745    OpenaiGptOssSafeguard120b,
746    OpenaiGptOssSafeguard20b,
747    QwenQwen3235bA22b2507V10,
748    QwenQwen332bV10,
749    QwenQwen3Coder30bA3bV10,
750    QwenQwen3Coder480bA35bV10,
751    QwenQwen3CoderNext,
752    QwenQwen3Next80bA3b,
753    QwenQwen3Vl235bA22b,
754    UsAnthropicClaudeFable5,
755    UsAnthropicClaudeHaiku4520251001V10,
756    UsAnthropicClaudeOpus4120250805V10,
757    UsAnthropicClaudeOpus4520251101V10,
758    UsAnthropicClaudeOpus46V1,
759    UsAnthropicClaudeOpus47,
760    UsAnthropicClaudeOpus48,
761    UsAnthropicClaudeSonnet4520250929V10,
762    UsAnthropicClaudeSonnet46,
763    UsAnthropicClaudeSonnet5,
764    UsDeepseekR1V10,
765    UsMetaLlama4Maverick17bInstructV10,
766    UsMetaLlama4Scout17bInstructV10,
767    WriterPalmyraX4V10,
768    WriterPalmyraX5V10,
769    XaiGrok43,
770    ZaiGlm47,
771    ZaiGlm47Flash,
772    ZaiGlm5,
773}
774impl AnthropicModel {
775    #[allow(clippy::too_many_lines)]
776    fn model_id(self) -> &'static str {
777        match self {
778            Self::ClaudeFable5 => "claude-fable-5",
779            Self::ClaudeHaiku45 => "claude-haiku-4-5",
780            Self::ClaudeHaiku4520251001 => "claude-haiku-4-5-20251001",
781            Self::ClaudeOpus41 => "claude-opus-4-1",
782            Self::ClaudeOpus4120250805 => "claude-opus-4-1-20250805",
783            Self::ClaudeOpus45 => "claude-opus-4-5",
784            Self::ClaudeOpus4520251101 => "claude-opus-4-5-20251101",
785            Self::ClaudeOpus46 => "claude-opus-4-6",
786            Self::ClaudeOpus47 => "claude-opus-4-7",
787            Self::ClaudeOpus48 => "claude-opus-4-8",
788            Self::ClaudeSonnet45 => "claude-sonnet-4-5",
789            Self::ClaudeSonnet4520250929 => "claude-sonnet-4-5-20250929",
790            Self::ClaudeSonnet46 => "claude-sonnet-4-6",
791            Self::ClaudeSonnet5 => "claude-sonnet-5",
792        }
793    }
794    #[allow(clippy::too_many_lines)]
795    fn display_name(self) -> &'static str {
796        match self {
797            Self::ClaudeFable5 => "Claude Fable 5",
798            Self::ClaudeHaiku4520251001 => "Claude Haiku 4.5",
799            Self::ClaudeHaiku45 => "Claude Haiku 4.5 (latest)",
800            Self::ClaudeOpus4120250805 => "Claude Opus 4.1",
801            Self::ClaudeOpus41 => "Claude Opus 4.1 (latest)",
802            Self::ClaudeOpus4520251101 => "Claude Opus 4.5",
803            Self::ClaudeOpus45 => "Claude Opus 4.5 (latest)",
804            Self::ClaudeOpus46 => "Claude Opus 4.6",
805            Self::ClaudeOpus47 => "Claude Opus 4.7",
806            Self::ClaudeOpus48 => "Claude Opus 4.8",
807            Self::ClaudeSonnet4520250929 => "Claude Sonnet 4.5",
808            Self::ClaudeSonnet45 => "Claude Sonnet 4.5 (latest)",
809            Self::ClaudeSonnet46 => "Claude Sonnet 4.6",
810            Self::ClaudeSonnet5 => "Claude Sonnet 5",
811        }
812    }
813    #[allow(clippy::too_many_lines)]
814    fn context_window(self) -> u32 {
815        match self {
816            Self::ClaudeHaiku45
817            | Self::ClaudeHaiku4520251001
818            | Self::ClaudeOpus41
819            | Self::ClaudeOpus4120250805
820            | Self::ClaudeOpus45
821            | Self::ClaudeOpus4520251101 => 200_000,
822            Self::ClaudeFable5
823            | Self::ClaudeOpus46
824            | Self::ClaudeOpus47
825            | Self::ClaudeOpus48
826            | Self::ClaudeSonnet45
827            | Self::ClaudeSonnet4520250929
828            | Self::ClaudeSonnet46
829            | Self::ClaudeSonnet5 => 1_000_000,
830        }
831    }
832    #[allow(clippy::too_many_lines)]
833    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
834        match self {
835            Self::ClaudeHaiku45
836            | Self::ClaudeHaiku4520251001
837            | Self::ClaudeOpus41
838            | Self::ClaudeOpus4120250805
839            | Self::ClaudeOpus45
840            | Self::ClaudeOpus4520251101
841            | Self::ClaudeSonnet45
842            | Self::ClaudeSonnet4520250929 => {
843                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
844            }
845            Self::ClaudeOpus46 | Self::ClaudeSonnet46 => {
846                &[
847                    ReasoningEffort::Low,
848                    ReasoningEffort::Medium,
849                    ReasoningEffort::High,
850                    ReasoningEffort::Max,
851                ]
852            }
853            Self::ClaudeFable5
854            | Self::ClaudeOpus47
855            | Self::ClaudeOpus48
856            | Self::ClaudeSonnet5 => {
857                &[
858                    ReasoningEffort::Low,
859                    ReasoningEffort::Medium,
860                    ReasoningEffort::High,
861                    ReasoningEffort::Xhigh,
862                    ReasoningEffort::Max,
863                ]
864            }
865        }
866    }
867    pub fn supports_reasoning(self) -> bool {
868        !self.reasoning_levels().is_empty()
869    }
870    #[allow(clippy::too_many_lines)]
871    pub fn supports_prompt_caching(self) -> bool {
872        match self {
873            Self::ClaudeFable5
874            | Self::ClaudeHaiku45
875            | Self::ClaudeHaiku4520251001
876            | Self::ClaudeOpus41
877            | Self::ClaudeOpus4120250805
878            | Self::ClaudeOpus45
879            | Self::ClaudeOpus4520251101
880            | Self::ClaudeOpus46
881            | Self::ClaudeOpus47
882            | Self::ClaudeOpus48
883            | Self::ClaudeSonnet45
884            | Self::ClaudeSonnet4520250929
885            | Self::ClaudeSonnet46
886            | Self::ClaudeSonnet5 => true,
887        }
888    }
889    #[allow(clippy::too_many_lines)]
890    pub fn supports_image(self) -> bool {
891        match self {
892            Self::ClaudeFable5
893            | Self::ClaudeHaiku45
894            | Self::ClaudeHaiku4520251001
895            | Self::ClaudeOpus41
896            | Self::ClaudeOpus4120250805
897            | Self::ClaudeOpus45
898            | Self::ClaudeOpus4520251101
899            | Self::ClaudeOpus46
900            | Self::ClaudeOpus47
901            | Self::ClaudeOpus48
902            | Self::ClaudeSonnet45
903            | Self::ClaudeSonnet4520250929
904            | Self::ClaudeSonnet46
905            | Self::ClaudeSonnet5 => true,
906        }
907    }
908    #[allow(clippy::too_many_lines)]
909    pub fn supports_audio(self) -> bool {
910        match self {
911            Self::ClaudeFable5
912            | Self::ClaudeHaiku45
913            | Self::ClaudeHaiku4520251001
914            | Self::ClaudeOpus41
915            | Self::ClaudeOpus4120250805
916            | Self::ClaudeOpus45
917            | Self::ClaudeOpus4520251101
918            | Self::ClaudeOpus46
919            | Self::ClaudeOpus47
920            | Self::ClaudeOpus48
921            | Self::ClaudeSonnet45
922            | Self::ClaudeSonnet4520250929
923            | Self::ClaudeSonnet46
924            | Self::ClaudeSonnet5 => false,
925        }
926    }
927    const ALL: &[AnthropicModel] = &[
928        Self::ClaudeFable5,
929        Self::ClaudeHaiku45,
930        Self::ClaudeHaiku4520251001,
931        Self::ClaudeOpus41,
932        Self::ClaudeOpus4120250805,
933        Self::ClaudeOpus45,
934        Self::ClaudeOpus4520251101,
935        Self::ClaudeOpus46,
936        Self::ClaudeOpus47,
937        Self::ClaudeOpus48,
938        Self::ClaudeSonnet45,
939        Self::ClaudeSonnet4520250929,
940        Self::ClaudeSonnet46,
941        Self::ClaudeSonnet5,
942    ];
943}
944impl std::str::FromStr for AnthropicModel {
945    type Err = String;
946    #[allow(clippy::too_many_lines)]
947    fn from_str(s: &str) -> Result<Self, Self::Err> {
948        match s {
949            "claude-fable-5" => Ok(Self::ClaudeFable5),
950            "claude-haiku-4-5" => Ok(Self::ClaudeHaiku45),
951            "claude-haiku-4-5-20251001" => Ok(Self::ClaudeHaiku4520251001),
952            "claude-opus-4-1" => Ok(Self::ClaudeOpus41),
953            "claude-opus-4-1-20250805" => Ok(Self::ClaudeOpus4120250805),
954            "claude-opus-4-5" => Ok(Self::ClaudeOpus45),
955            "claude-opus-4-5-20251101" => Ok(Self::ClaudeOpus4520251101),
956            "claude-opus-4-6" => Ok(Self::ClaudeOpus46),
957            "claude-opus-4-7" => Ok(Self::ClaudeOpus47),
958            "claude-opus-4-8" => Ok(Self::ClaudeOpus48),
959            "claude-sonnet-4-5" => Ok(Self::ClaudeSonnet45),
960            "claude-sonnet-4-5-20250929" => Ok(Self::ClaudeSonnet4520250929),
961            "claude-sonnet-4-6" => Ok(Self::ClaudeSonnet46),
962            "claude-sonnet-5" => Ok(Self::ClaudeSonnet5),
963            _ => Err(format!("Unknown anthropic model: '{s}'")),
964        }
965    }
966}
967impl AzureFoundryModel {
968    #[allow(clippy::too_many_lines)]
969    fn model_id(self) -> &'static str {
970        match self {
971            Self::ClaudeFable5 => "claude-fable-5",
972            Self::ClaudeHaiku45 => "claude-haiku-4-5",
973            Self::ClaudeOpus41 => "claude-opus-4-1",
974            Self::ClaudeOpus45 => "claude-opus-4-5",
975            Self::ClaudeOpus46 => "claude-opus-4-6",
976            Self::ClaudeOpus48 => "claude-opus-4-8",
977            Self::ClaudeSonnet45 => "claude-sonnet-4-5",
978            Self::ClaudeSonnet46 => "claude-sonnet-4-6",
979            Self::ClaudeSonnet5 => "claude-sonnet-5",
980            Self::Codestral2501 => "codestral-2501",
981            Self::CodexMini => "codex-mini",
982            Self::CohereCommandA => "cohere-command-a",
983            Self::CohereCommandR082024 => "cohere-command-r-08-2024",
984            Self::CohereCommandRPlus082024 => "cohere-command-r-plus-08-2024",
985            Self::DeepseekR10528 => "deepseek-r1-0528",
986            Self::DeepseekV30324 => "deepseek-v3-0324",
987            Self::DeepseekV31 => "deepseek-v3.1",
988            Self::DeepseekV32 => "deepseek-v3.2",
989            Self::Gpt4 => "gpt-4",
990            Self::Gpt432k => "gpt-4-32k",
991            Self::Gpt4Turbo => "gpt-4-turbo",
992            Self::Gpt4TurboVision => "gpt-4-turbo-vision",
993            Self::Gpt41 => "gpt-4.1",
994            Self::Gpt41Mini => "gpt-4.1-mini",
995            Self::Gpt41Nano => "gpt-4.1-nano",
996            Self::Gpt4o => "gpt-4o",
997            Self::Gpt4oMini => "gpt-4o-mini",
998            Self::Gpt5 => "gpt-5",
999            Self::Gpt5Codex => "gpt-5-codex",
1000            Self::Gpt5Mini => "gpt-5-mini",
1001            Self::Gpt5Nano => "gpt-5-nano",
1002            Self::Gpt5Pro => "gpt-5-pro",
1003            Self::Gpt51 => "gpt-5.1",
1004            Self::Gpt51Chat => "gpt-5.1-chat",
1005            Self::Gpt51Codex => "gpt-5.1-codex",
1006            Self::Gpt51CodexMax => "gpt-5.1-codex-max",
1007            Self::Gpt51CodexMini => "gpt-5.1-codex-mini",
1008            Self::Gpt52 => "gpt-5.2",
1009            Self::Gpt52Chat => "gpt-5.2-chat",
1010            Self::Gpt52Codex => "gpt-5.2-codex",
1011            Self::Gpt53Chat => "gpt-5.3-chat",
1012            Self::Gpt53Codex => "gpt-5.3-codex",
1013            Self::Gpt54 => "gpt-5.4",
1014            Self::Gpt54Mini => "gpt-5.4-mini",
1015            Self::Gpt54Nano => "gpt-5.4-nano",
1016            Self::Gpt54Pro => "gpt-5.4-pro",
1017            Self::Gpt55 => "gpt-5.5",
1018            Self::Gpt56Luna => "gpt-5.6-luna",
1019            Self::Gpt56Sol => "gpt-5.6-sol",
1020            Self::Gpt56Terra => "gpt-5.6-terra",
1021            Self::Grok41FastNonReasoning => "grok-4-1-fast-non-reasoning",
1022            Self::Grok41FastReasoning => "grok-4-1-fast-reasoning",
1023            Self::Grok420NonReasoning => "grok-4-20-non-reasoning",
1024            Self::Grok420Reasoning => "grok-4-20-reasoning",
1025            Self::Grok4FastReasoning => "grok-4-fast-reasoning",
1026            Self::KimiK2Thinking => "kimi-k2-thinking",
1027            Self::KimiK25 => "kimi-k2.5",
1028            Self::KimiK26 => "kimi-k2.6",
1029            Self::Llama3211bVisionInstruct => "llama-3.2-11b-vision-instruct",
1030            Self::Llama3290bVisionInstruct => "llama-3.2-90b-vision-instruct",
1031            Self::Llama3370bInstruct => "llama-3.3-70b-instruct",
1032            Self::Llama4Maverick17b128eInstructFp8 => {
1033                "llama-4-maverick-17b-128e-instruct-fp8"
1034            }
1035            Self::Llama4Scout17b16eInstruct => "llama-4-scout-17b-16e-instruct",
1036            Self::MetaLlama31405bInstruct => "meta-llama-3.1-405b-instruct",
1037            Self::MetaLlama3170bInstruct => "meta-llama-3.1-70b-instruct",
1038            Self::MetaLlama318bInstruct => "meta-llama-3.1-8b-instruct",
1039            Self::Ministral3b => "ministral-3b",
1040            Self::MistralLarge2411 => "mistral-large-2411",
1041            Self::MistralMedium2505 => "mistral-medium-2505",
1042            Self::MistralNemo => "mistral-nemo",
1043            Self::MistralSmall2503 => "mistral-small-2503",
1044            Self::ModelRouter => "model-router",
1045            Self::O1 => "o1",
1046            Self::O1Mini => "o1-mini",
1047            Self::O3 => "o3",
1048            Self::O3Mini => "o3-mini",
1049            Self::O4Mini => "o4-mini",
1050            Self::Phi4Mini => "phi-4-mini",
1051            Self::Phi4MiniReasoning => "phi-4-mini-reasoning",
1052        }
1053    }
1054    #[allow(clippy::too_many_lines)]
1055    fn display_name(self) -> &'static str {
1056        match self {
1057            Self::ClaudeFable5 => "Claude Fable 5",
1058            Self::ClaudeHaiku45 => "Claude Haiku 4.5",
1059            Self::ClaudeOpus41 => "Claude Opus 4.1",
1060            Self::ClaudeOpus45 => "Claude Opus 4.5",
1061            Self::ClaudeOpus46 => "Claude Opus 4.6",
1062            Self::ClaudeOpus48 => "Claude Opus 4.8",
1063            Self::ClaudeSonnet45 => "Claude Sonnet 4.5",
1064            Self::ClaudeSonnet46 => "Claude Sonnet 4.6",
1065            Self::ClaudeSonnet5 => "Claude Sonnet 5",
1066            Self::Codestral2501 => "Codestral 25.01",
1067            Self::CodexMini => "Codex Mini",
1068            Self::CohereCommandA => "Command A",
1069            Self::CohereCommandR082024 => "Command R",
1070            Self::CohereCommandRPlus082024 => "Command R+",
1071            Self::DeepseekR10528 => "DeepSeek-R1-0528",
1072            Self::DeepseekV30324 => "DeepSeek-V3-0324",
1073            Self::DeepseekV31 => "DeepSeek-V3.1",
1074            Self::DeepseekV32 => "DeepSeek-V3.2",
1075            Self::Gpt4 => "GPT-4",
1076            Self::Gpt432k => "GPT-4 32K",
1077            Self::Gpt4Turbo => "GPT-4 Turbo",
1078            Self::Gpt4TurboVision => "GPT-4 Turbo Vision",
1079            Self::Gpt41 => "GPT-4.1",
1080            Self::Gpt41Mini => "GPT-4.1 mini",
1081            Self::Gpt41Nano => "GPT-4.1 nano",
1082            Self::Gpt4o => "GPT-4o",
1083            Self::Gpt4oMini => "GPT-4o mini",
1084            Self::Gpt5 => "GPT-5",
1085            Self::Gpt5Mini => "GPT-5 Mini",
1086            Self::Gpt5Nano => "GPT-5 Nano",
1087            Self::Gpt5Pro => "GPT-5 Pro",
1088            Self::Gpt5Codex => "GPT-5-Codex",
1089            Self::Gpt51 => "GPT-5.1",
1090            Self::Gpt51Chat => "GPT-5.1 Chat",
1091            Self::Gpt51Codex => "GPT-5.1 Codex",
1092            Self::Gpt51CodexMax => "GPT-5.1 Codex Max",
1093            Self::Gpt51CodexMini => "GPT-5.1 Codex Mini",
1094            Self::Gpt52 => "GPT-5.2",
1095            Self::Gpt52Chat => "GPT-5.2 Chat",
1096            Self::Gpt52Codex => "GPT-5.2 Codex",
1097            Self::Gpt53Chat => "GPT-5.3 Chat",
1098            Self::Gpt53Codex => "GPT-5.3 Codex",
1099            Self::Gpt54 => "GPT-5.4",
1100            Self::Gpt54Mini => "GPT-5.4 Mini",
1101            Self::Gpt54Nano => "GPT-5.4 Nano",
1102            Self::Gpt54Pro => "GPT-5.4 Pro",
1103            Self::Gpt55 => "GPT-5.5",
1104            Self::Gpt56Luna => "GPT-5.6 Luna",
1105            Self::Gpt56Sol => "GPT-5.6 Sol",
1106            Self::Gpt56Terra => "GPT-5.6 Terra",
1107            Self::Grok4FastReasoning => "Grok 4 Fast (Reasoning)",
1108            Self::Grok41FastNonReasoning => "Grok 4.1 Fast (Non-Reasoning)",
1109            Self::Grok41FastReasoning => "Grok 4.1 Fast (Reasoning)",
1110            Self::Grok420NonReasoning => "Grok 4.20 (Non-Reasoning)",
1111            Self::Grok420Reasoning => "Grok 4.20 (Reasoning)",
1112            Self::KimiK2Thinking => "Kimi K2 Thinking",
1113            Self::KimiK25 => "Kimi K2.5",
1114            Self::KimiK26 => "Kimi K2.6",
1115            Self::Llama4Maverick17b128eInstructFp8 => {
1116                "Llama 4 Maverick 17B 128E Instruct FP8"
1117            }
1118            Self::Llama4Scout17b16eInstruct => "Llama 4 Scout 17B 16E Instruct",
1119            Self::Llama3211bVisionInstruct => "Llama-3.2-11B-Vision-Instruct",
1120            Self::Llama3290bVisionInstruct => "Llama-3.2-90B-Vision-Instruct",
1121            Self::Llama3370bInstruct => "Llama-3.3-70B-Instruct",
1122            Self::MetaLlama31405bInstruct => "Meta-Llama-3.1-405B-Instruct",
1123            Self::MetaLlama3170bInstruct => "Meta-Llama-3.1-70B-Instruct",
1124            Self::MetaLlama318bInstruct => "Meta-Llama-3.1-8B-Instruct",
1125            Self::Ministral3b => "Ministral 3B",
1126            Self::MistralLarge2411 => "Mistral Large 24.11",
1127            Self::MistralMedium2505 => "Mistral Medium 3",
1128            Self::MistralNemo => "Mistral Nemo",
1129            Self::MistralSmall2503 => "Mistral Small 3.1",
1130            Self::ModelRouter => "Model Router",
1131            Self::Phi4Mini => "Phi-4-mini",
1132            Self::Phi4MiniReasoning => "Phi-4-mini-reasoning",
1133            Self::O1 => "o1",
1134            Self::O1Mini => "o1-mini",
1135            Self::O3 => "o3",
1136            Self::O3Mini => "o3-mini",
1137            Self::O4Mini => "o4-mini",
1138        }
1139    }
1140    #[allow(clippy::too_many_lines)]
1141    fn context_window(self) -> u32 {
1142        match self {
1143            Self::Gpt4 => 8192,
1144            Self::Gpt432k => 32_768,
1145            Self::CohereCommandR082024
1146            | Self::CohereCommandRPlus082024
1147            | Self::DeepseekV32
1148            | Self::Gpt4Turbo
1149            | Self::Gpt4TurboVision
1150            | Self::Gpt4o
1151            | Self::Gpt4oMini
1152            | Self::Gpt51Chat
1153            | Self::Gpt52Chat
1154            | Self::Gpt53Chat
1155            | Self::Grok41FastNonReasoning
1156            | Self::Grok41FastReasoning
1157            | Self::Llama3211bVisionInstruct
1158            | Self::Llama3290bVisionInstruct
1159            | Self::Llama3370bInstruct
1160            | Self::Llama4Scout17b16eInstruct
1161            | Self::MetaLlama31405bInstruct
1162            | Self::MetaLlama3170bInstruct
1163            | Self::MetaLlama318bInstruct
1164            | Self::Ministral3b
1165            | Self::MistralLarge2411
1166            | Self::MistralMedium2505
1167            | Self::MistralNemo
1168            | Self::MistralSmall2503
1169            | Self::O1Mini
1170            | Self::Phi4Mini
1171            | Self::Phi4MiniReasoning => 128_000,
1172            Self::CohereCommandA | Self::DeepseekV30324 | Self::DeepseekV31 => 131_072,
1173            Self::DeepseekR10528 => 163_840,
1174            Self::ClaudeHaiku45
1175            | Self::ClaudeOpus41
1176            | Self::ClaudeOpus45
1177            | Self::ClaudeSonnet45
1178            | Self::CodexMini
1179            | Self::ModelRouter
1180            | Self::O1
1181            | Self::O3
1182            | Self::O3Mini
1183            | Self::O4Mini => 200_000,
1184            Self::Codestral2501 => 256_000,
1185            Self::Grok420NonReasoning | Self::Grok420Reasoning => 262_000,
1186            Self::KimiK2Thinking | Self::KimiK25 | Self::KimiK26 => 262_144,
1187            Self::Gpt5
1188            | Self::Gpt5Codex
1189            | Self::Gpt5Mini
1190            | Self::Gpt5Nano
1191            | Self::Gpt5Pro
1192            | Self::Gpt51
1193            | Self::Gpt51Codex
1194            | Self::Gpt51CodexMax
1195            | Self::Gpt51CodexMini
1196            | Self::Gpt52
1197            | Self::Gpt52Codex
1198            | Self::Gpt53Codex
1199            | Self::Gpt54Mini
1200            | Self::Gpt54Nano => 400_000,
1201            Self::ClaudeFable5
1202            | Self::ClaudeOpus46
1203            | Self::ClaudeOpus48
1204            | Self::ClaudeSonnet46
1205            | Self::ClaudeSonnet5
1206            | Self::Llama4Maverick17b128eInstructFp8 => 1_000_000,
1207            Self::Gpt41 | Self::Gpt41Mini | Self::Gpt41Nano => 1_047_576,
1208            Self::Gpt54
1209            | Self::Gpt54Pro
1210            | Self::Gpt55
1211            | Self::Gpt56Luna
1212            | Self::Gpt56Sol
1213            | Self::Gpt56Terra => 1_050_000,
1214            Self::Grok4FastReasoning => 2_000_000,
1215        }
1216    }
1217    #[allow(clippy::too_many_lines)]
1218    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
1219        match self {
1220            Self::Codestral2501
1221            | Self::CohereCommandR082024
1222            | Self::CohereCommandRPlus082024
1223            | Self::DeepseekV30324
1224            | Self::Gpt4
1225            | Self::Gpt432k
1226            | Self::Gpt4Turbo
1227            | Self::Gpt4TurboVision
1228            | Self::Gpt41
1229            | Self::Gpt41Mini
1230            | Self::Gpt41Nano
1231            | Self::Gpt4o
1232            | Self::Gpt4oMini
1233            | Self::Grok41FastNonReasoning
1234            | Self::Grok420NonReasoning
1235            | Self::Llama3211bVisionInstruct
1236            | Self::Llama3290bVisionInstruct
1237            | Self::Llama3370bInstruct
1238            | Self::Llama4Maverick17b128eInstructFp8
1239            | Self::Llama4Scout17b16eInstruct
1240            | Self::MetaLlama31405bInstruct
1241            | Self::MetaLlama3170bInstruct
1242            | Self::MetaLlama318bInstruct
1243            | Self::Ministral3b
1244            | Self::MistralLarge2411
1245            | Self::MistralMedium2505
1246            | Self::MistralNemo
1247            | Self::MistralSmall2503
1248            | Self::ModelRouter
1249            | Self::Phi4Mini => &[],
1250            Self::Gpt5Pro => &[ReasoningEffort::High],
1251            Self::ClaudeHaiku45
1252            | Self::ClaudeOpus41
1253            | Self::ClaudeOpus45
1254            | Self::ClaudeSonnet45
1255            | Self::CodexMini
1256            | Self::CohereCommandA
1257            | Self::DeepseekR10528
1258            | Self::DeepseekV31
1259            | Self::DeepseekV32
1260            | Self::Gpt5Codex
1261            | Self::Gpt51
1262            | Self::Gpt51Codex
1263            | Self::Gpt51CodexMini
1264            | Self::Grok41FastReasoning
1265            | Self::Grok420Reasoning
1266            | Self::Grok4FastReasoning
1267            | Self::KimiK2Thinking
1268            | Self::KimiK25
1269            | Self::KimiK26
1270            | Self::O1
1271            | Self::O1Mini
1272            | Self::O3
1273            | Self::O3Mini
1274            | Self::O4Mini
1275            | Self::Phi4MiniReasoning => {
1276                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
1277            }
1278            Self::ClaudeOpus46 | Self::ClaudeSonnet46 => {
1279                &[
1280                    ReasoningEffort::Low,
1281                    ReasoningEffort::Medium,
1282                    ReasoningEffort::High,
1283                    ReasoningEffort::Max,
1284                ]
1285            }
1286            Self::Gpt51CodexMax
1287            | Self::Gpt52
1288            | Self::Gpt52Codex
1289            | Self::Gpt53Codex
1290            | Self::Gpt54
1291            | Self::Gpt54Mini
1292            | Self::Gpt54Nano
1293            | Self::Gpt55 => {
1294                &[
1295                    ReasoningEffort::Low,
1296                    ReasoningEffort::Medium,
1297                    ReasoningEffort::High,
1298                    ReasoningEffort::Xhigh,
1299                ]
1300            }
1301            Self::ClaudeFable5
1302            | Self::ClaudeOpus48
1303            | Self::ClaudeSonnet5
1304            | Self::Gpt56Luna
1305            | Self::Gpt56Sol
1306            | Self::Gpt56Terra => {
1307                &[
1308                    ReasoningEffort::Low,
1309                    ReasoningEffort::Medium,
1310                    ReasoningEffort::High,
1311                    ReasoningEffort::Xhigh,
1312                    ReasoningEffort::Max,
1313                ]
1314            }
1315            Self::Gpt51Chat | Self::Gpt52Chat | Self::Gpt53Chat => {
1316                &[ReasoningEffort::Medium]
1317            }
1318            Self::Gpt54Pro => {
1319                &[ReasoningEffort::Medium, ReasoningEffort::High, ReasoningEffort::Xhigh]
1320            }
1321            Self::Gpt5 | Self::Gpt5Mini | Self::Gpt5Nano => {
1322                &[
1323                    ReasoningEffort::Minimal,
1324                    ReasoningEffort::Low,
1325                    ReasoningEffort::Medium,
1326                    ReasoningEffort::High,
1327                ]
1328            }
1329        }
1330    }
1331    pub fn supports_reasoning(self) -> bool {
1332        !self.reasoning_levels().is_empty()
1333    }
1334    #[allow(clippy::too_many_lines)]
1335    pub fn supports_prompt_caching(self) -> bool {
1336        match self {
1337            Self::Codestral2501
1338            | Self::CohereCommandA
1339            | Self::CohereCommandR082024
1340            | Self::CohereCommandRPlus082024
1341            | Self::DeepseekR10528
1342            | Self::DeepseekV30324
1343            | Self::DeepseekV31
1344            | Self::DeepseekV32
1345            | Self::Gpt4
1346            | Self::Gpt432k
1347            | Self::Gpt4Turbo
1348            | Self::Gpt4TurboVision
1349            | Self::Gpt5Pro
1350            | Self::Gpt54Pro
1351            | Self::Grok420NonReasoning
1352            | Self::Grok420Reasoning
1353            | Self::KimiK25
1354            | Self::KimiK26
1355            | Self::Llama3211bVisionInstruct
1356            | Self::Llama3290bVisionInstruct
1357            | Self::Llama3370bInstruct
1358            | Self::Llama4Maverick17b128eInstructFp8
1359            | Self::Llama4Scout17b16eInstruct
1360            | Self::MetaLlama31405bInstruct
1361            | Self::MetaLlama3170bInstruct
1362            | Self::MetaLlama318bInstruct
1363            | Self::Ministral3b
1364            | Self::MistralLarge2411
1365            | Self::MistralMedium2505
1366            | Self::MistralNemo
1367            | Self::MistralSmall2503
1368            | Self::ModelRouter
1369            | Self::Phi4Mini
1370            | Self::Phi4MiniReasoning => false,
1371            Self::ClaudeFable5
1372            | Self::ClaudeHaiku45
1373            | Self::ClaudeOpus41
1374            | Self::ClaudeOpus45
1375            | Self::ClaudeOpus46
1376            | Self::ClaudeOpus48
1377            | Self::ClaudeSonnet45
1378            | Self::ClaudeSonnet46
1379            | Self::ClaudeSonnet5
1380            | Self::CodexMini
1381            | Self::Gpt41
1382            | Self::Gpt41Mini
1383            | Self::Gpt41Nano
1384            | Self::Gpt4o
1385            | Self::Gpt4oMini
1386            | Self::Gpt5
1387            | Self::Gpt5Codex
1388            | Self::Gpt5Mini
1389            | Self::Gpt5Nano
1390            | Self::Gpt51
1391            | Self::Gpt51Chat
1392            | Self::Gpt51Codex
1393            | Self::Gpt51CodexMax
1394            | Self::Gpt51CodexMini
1395            | Self::Gpt52
1396            | Self::Gpt52Chat
1397            | Self::Gpt52Codex
1398            | Self::Gpt53Chat
1399            | Self::Gpt53Codex
1400            | Self::Gpt54
1401            | Self::Gpt54Mini
1402            | Self::Gpt54Nano
1403            | Self::Gpt55
1404            | Self::Gpt56Luna
1405            | Self::Gpt56Sol
1406            | Self::Gpt56Terra
1407            | Self::Grok41FastNonReasoning
1408            | Self::Grok41FastReasoning
1409            | Self::Grok4FastReasoning
1410            | Self::KimiK2Thinking
1411            | Self::O1
1412            | Self::O1Mini
1413            | Self::O3
1414            | Self::O3Mini
1415            | Self::O4Mini => true,
1416        }
1417    }
1418    #[allow(clippy::too_many_lines)]
1419    pub fn supports_image(self) -> bool {
1420        match self {
1421            Self::Codestral2501
1422            | Self::CodexMini
1423            | Self::CohereCommandA
1424            | Self::CohereCommandR082024
1425            | Self::CohereCommandRPlus082024
1426            | Self::DeepseekR10528
1427            | Self::DeepseekV30324
1428            | Self::DeepseekV31
1429            | Self::DeepseekV32
1430            | Self::Gpt4
1431            | Self::Gpt432k
1432            | Self::Grok420NonReasoning
1433            | Self::Grok420Reasoning
1434            | Self::KimiK2Thinking
1435            | Self::Llama3370bInstruct
1436            | Self::MetaLlama31405bInstruct
1437            | Self::MetaLlama3170bInstruct
1438            | Self::MetaLlama318bInstruct
1439            | Self::Ministral3b
1440            | Self::MistralLarge2411
1441            | Self::MistralNemo
1442            | Self::O1Mini
1443            | Self::O3Mini
1444            | Self::Phi4Mini
1445            | Self::Phi4MiniReasoning => false,
1446            Self::ClaudeFable5
1447            | Self::ClaudeHaiku45
1448            | Self::ClaudeOpus41
1449            | Self::ClaudeOpus45
1450            | Self::ClaudeOpus46
1451            | Self::ClaudeOpus48
1452            | Self::ClaudeSonnet45
1453            | Self::ClaudeSonnet46
1454            | Self::ClaudeSonnet5
1455            | Self::Gpt4Turbo
1456            | Self::Gpt4TurboVision
1457            | Self::Gpt41
1458            | Self::Gpt41Mini
1459            | Self::Gpt41Nano
1460            | Self::Gpt4o
1461            | Self::Gpt4oMini
1462            | Self::Gpt5
1463            | Self::Gpt5Codex
1464            | Self::Gpt5Mini
1465            | Self::Gpt5Nano
1466            | Self::Gpt5Pro
1467            | Self::Gpt51
1468            | Self::Gpt51Chat
1469            | Self::Gpt51Codex
1470            | Self::Gpt51CodexMax
1471            | Self::Gpt51CodexMini
1472            | Self::Gpt52
1473            | Self::Gpt52Chat
1474            | Self::Gpt52Codex
1475            | Self::Gpt53Chat
1476            | Self::Gpt53Codex
1477            | Self::Gpt54
1478            | Self::Gpt54Mini
1479            | Self::Gpt54Nano
1480            | Self::Gpt54Pro
1481            | Self::Gpt55
1482            | Self::Gpt56Luna
1483            | Self::Gpt56Sol
1484            | Self::Gpt56Terra
1485            | Self::Grok41FastNonReasoning
1486            | Self::Grok41FastReasoning
1487            | Self::Grok4FastReasoning
1488            | Self::KimiK25
1489            | Self::KimiK26
1490            | Self::Llama3211bVisionInstruct
1491            | Self::Llama3290bVisionInstruct
1492            | Self::Llama4Maverick17b128eInstructFp8
1493            | Self::Llama4Scout17b16eInstruct
1494            | Self::MistralMedium2505
1495            | Self::MistralSmall2503
1496            | Self::ModelRouter
1497            | Self::O1
1498            | Self::O3
1499            | Self::O4Mini => true,
1500        }
1501    }
1502    #[allow(clippy::too_many_lines)]
1503    pub fn supports_audio(self) -> bool {
1504        match self {
1505            Self::ClaudeFable5
1506            | Self::ClaudeHaiku45
1507            | Self::ClaudeOpus41
1508            | Self::ClaudeOpus45
1509            | Self::ClaudeOpus46
1510            | Self::ClaudeOpus48
1511            | Self::ClaudeSonnet45
1512            | Self::ClaudeSonnet46
1513            | Self::ClaudeSonnet5
1514            | Self::Codestral2501
1515            | Self::CodexMini
1516            | Self::CohereCommandA
1517            | Self::CohereCommandR082024
1518            | Self::CohereCommandRPlus082024
1519            | Self::DeepseekR10528
1520            | Self::DeepseekV30324
1521            | Self::DeepseekV31
1522            | Self::DeepseekV32
1523            | Self::Gpt4
1524            | Self::Gpt432k
1525            | Self::Gpt4Turbo
1526            | Self::Gpt4TurboVision
1527            | Self::Gpt41
1528            | Self::Gpt41Mini
1529            | Self::Gpt41Nano
1530            | Self::Gpt4o
1531            | Self::Gpt4oMini
1532            | Self::Gpt5
1533            | Self::Gpt5Codex
1534            | Self::Gpt5Mini
1535            | Self::Gpt5Nano
1536            | Self::Gpt5Pro
1537            | Self::Gpt51CodexMax
1538            | Self::Gpt51CodexMini
1539            | Self::Gpt52
1540            | Self::Gpt52Chat
1541            | Self::Gpt52Codex
1542            | Self::Gpt53Chat
1543            | Self::Gpt53Codex
1544            | Self::Gpt54
1545            | Self::Gpt54Mini
1546            | Self::Gpt54Nano
1547            | Self::Gpt54Pro
1548            | Self::Gpt55
1549            | Self::Gpt56Luna
1550            | Self::Gpt56Sol
1551            | Self::Gpt56Terra
1552            | Self::Grok41FastNonReasoning
1553            | Self::Grok41FastReasoning
1554            | Self::Grok420NonReasoning
1555            | Self::Grok420Reasoning
1556            | Self::Grok4FastReasoning
1557            | Self::KimiK2Thinking
1558            | Self::KimiK25
1559            | Self::KimiK26
1560            | Self::Llama3211bVisionInstruct
1561            | Self::Llama3290bVisionInstruct
1562            | Self::Llama3370bInstruct
1563            | Self::Llama4Maverick17b128eInstructFp8
1564            | Self::Llama4Scout17b16eInstruct
1565            | Self::MetaLlama31405bInstruct
1566            | Self::MetaLlama3170bInstruct
1567            | Self::MetaLlama318bInstruct
1568            | Self::Ministral3b
1569            | Self::MistralLarge2411
1570            | Self::MistralMedium2505
1571            | Self::MistralNemo
1572            | Self::MistralSmall2503
1573            | Self::ModelRouter
1574            | Self::O1
1575            | Self::O1Mini
1576            | Self::O3
1577            | Self::O3Mini
1578            | Self::O4Mini
1579            | Self::Phi4Mini
1580            | Self::Phi4MiniReasoning => false,
1581            Self::Gpt51 | Self::Gpt51Chat | Self::Gpt51Codex => true,
1582        }
1583    }
1584    const ALL: &[AzureFoundryModel] = &[
1585        Self::ClaudeFable5,
1586        Self::ClaudeHaiku45,
1587        Self::ClaudeOpus41,
1588        Self::ClaudeOpus45,
1589        Self::ClaudeOpus46,
1590        Self::ClaudeOpus48,
1591        Self::ClaudeSonnet45,
1592        Self::ClaudeSonnet46,
1593        Self::ClaudeSonnet5,
1594        Self::Codestral2501,
1595        Self::CodexMini,
1596        Self::CohereCommandA,
1597        Self::CohereCommandR082024,
1598        Self::CohereCommandRPlus082024,
1599        Self::DeepseekR10528,
1600        Self::DeepseekV30324,
1601        Self::DeepseekV31,
1602        Self::DeepseekV32,
1603        Self::Gpt4,
1604        Self::Gpt432k,
1605        Self::Gpt4Turbo,
1606        Self::Gpt4TurboVision,
1607        Self::Gpt41,
1608        Self::Gpt41Mini,
1609        Self::Gpt41Nano,
1610        Self::Gpt4o,
1611        Self::Gpt4oMini,
1612        Self::Gpt5,
1613        Self::Gpt5Codex,
1614        Self::Gpt5Mini,
1615        Self::Gpt5Nano,
1616        Self::Gpt5Pro,
1617        Self::Gpt51,
1618        Self::Gpt51Chat,
1619        Self::Gpt51Codex,
1620        Self::Gpt51CodexMax,
1621        Self::Gpt51CodexMini,
1622        Self::Gpt52,
1623        Self::Gpt52Chat,
1624        Self::Gpt52Codex,
1625        Self::Gpt53Chat,
1626        Self::Gpt53Codex,
1627        Self::Gpt54,
1628        Self::Gpt54Mini,
1629        Self::Gpt54Nano,
1630        Self::Gpt54Pro,
1631        Self::Gpt55,
1632        Self::Gpt56Luna,
1633        Self::Gpt56Sol,
1634        Self::Gpt56Terra,
1635        Self::Grok41FastNonReasoning,
1636        Self::Grok41FastReasoning,
1637        Self::Grok420NonReasoning,
1638        Self::Grok420Reasoning,
1639        Self::Grok4FastReasoning,
1640        Self::KimiK2Thinking,
1641        Self::KimiK25,
1642        Self::KimiK26,
1643        Self::Llama3211bVisionInstruct,
1644        Self::Llama3290bVisionInstruct,
1645        Self::Llama3370bInstruct,
1646        Self::Llama4Maverick17b128eInstructFp8,
1647        Self::Llama4Scout17b16eInstruct,
1648        Self::MetaLlama31405bInstruct,
1649        Self::MetaLlama3170bInstruct,
1650        Self::MetaLlama318bInstruct,
1651        Self::Ministral3b,
1652        Self::MistralLarge2411,
1653        Self::MistralMedium2505,
1654        Self::MistralNemo,
1655        Self::MistralSmall2503,
1656        Self::ModelRouter,
1657        Self::O1,
1658        Self::O1Mini,
1659        Self::O3,
1660        Self::O3Mini,
1661        Self::O4Mini,
1662        Self::Phi4Mini,
1663        Self::Phi4MiniReasoning,
1664    ];
1665}
1666impl std::str::FromStr for AzureFoundryModel {
1667    type Err = String;
1668    #[allow(clippy::too_many_lines)]
1669    fn from_str(s: &str) -> Result<Self, Self::Err> {
1670        match s {
1671            "claude-fable-5" => Ok(Self::ClaudeFable5),
1672            "claude-haiku-4-5" => Ok(Self::ClaudeHaiku45),
1673            "claude-opus-4-1" => Ok(Self::ClaudeOpus41),
1674            "claude-opus-4-5" => Ok(Self::ClaudeOpus45),
1675            "claude-opus-4-6" => Ok(Self::ClaudeOpus46),
1676            "claude-opus-4-8" => Ok(Self::ClaudeOpus48),
1677            "claude-sonnet-4-5" => Ok(Self::ClaudeSonnet45),
1678            "claude-sonnet-4-6" => Ok(Self::ClaudeSonnet46),
1679            "claude-sonnet-5" => Ok(Self::ClaudeSonnet5),
1680            "codestral-2501" => Ok(Self::Codestral2501),
1681            "codex-mini" => Ok(Self::CodexMini),
1682            "cohere-command-a" => Ok(Self::CohereCommandA),
1683            "cohere-command-r-08-2024" => Ok(Self::CohereCommandR082024),
1684            "cohere-command-r-plus-08-2024" => Ok(Self::CohereCommandRPlus082024),
1685            "deepseek-r1-0528" => Ok(Self::DeepseekR10528),
1686            "deepseek-v3-0324" => Ok(Self::DeepseekV30324),
1687            "deepseek-v3.1" => Ok(Self::DeepseekV31),
1688            "deepseek-v3.2" => Ok(Self::DeepseekV32),
1689            "gpt-4" => Ok(Self::Gpt4),
1690            "gpt-4-32k" => Ok(Self::Gpt432k),
1691            "gpt-4-turbo" => Ok(Self::Gpt4Turbo),
1692            "gpt-4-turbo-vision" => Ok(Self::Gpt4TurboVision),
1693            "gpt-4.1" => Ok(Self::Gpt41),
1694            "gpt-4.1-mini" => Ok(Self::Gpt41Mini),
1695            "gpt-4.1-nano" => Ok(Self::Gpt41Nano),
1696            "gpt-4o" => Ok(Self::Gpt4o),
1697            "gpt-4o-mini" => Ok(Self::Gpt4oMini),
1698            "gpt-5" => Ok(Self::Gpt5),
1699            "gpt-5-codex" => Ok(Self::Gpt5Codex),
1700            "gpt-5-mini" => Ok(Self::Gpt5Mini),
1701            "gpt-5-nano" => Ok(Self::Gpt5Nano),
1702            "gpt-5-pro" => Ok(Self::Gpt5Pro),
1703            "gpt-5.1" => Ok(Self::Gpt51),
1704            "gpt-5.1-chat" => Ok(Self::Gpt51Chat),
1705            "gpt-5.1-codex" => Ok(Self::Gpt51Codex),
1706            "gpt-5.1-codex-max" => Ok(Self::Gpt51CodexMax),
1707            "gpt-5.1-codex-mini" => Ok(Self::Gpt51CodexMini),
1708            "gpt-5.2" => Ok(Self::Gpt52),
1709            "gpt-5.2-chat" => Ok(Self::Gpt52Chat),
1710            "gpt-5.2-codex" => Ok(Self::Gpt52Codex),
1711            "gpt-5.3-chat" => Ok(Self::Gpt53Chat),
1712            "gpt-5.3-codex" => Ok(Self::Gpt53Codex),
1713            "gpt-5.4" => Ok(Self::Gpt54),
1714            "gpt-5.4-mini" => Ok(Self::Gpt54Mini),
1715            "gpt-5.4-nano" => Ok(Self::Gpt54Nano),
1716            "gpt-5.4-pro" => Ok(Self::Gpt54Pro),
1717            "gpt-5.5" => Ok(Self::Gpt55),
1718            "gpt-5.6-luna" => Ok(Self::Gpt56Luna),
1719            "gpt-5.6-sol" => Ok(Self::Gpt56Sol),
1720            "gpt-5.6-terra" => Ok(Self::Gpt56Terra),
1721            "grok-4-1-fast-non-reasoning" => Ok(Self::Grok41FastNonReasoning),
1722            "grok-4-1-fast-reasoning" => Ok(Self::Grok41FastReasoning),
1723            "grok-4-20-non-reasoning" => Ok(Self::Grok420NonReasoning),
1724            "grok-4-20-reasoning" => Ok(Self::Grok420Reasoning),
1725            "grok-4-fast-reasoning" => Ok(Self::Grok4FastReasoning),
1726            "kimi-k2-thinking" => Ok(Self::KimiK2Thinking),
1727            "kimi-k2.5" => Ok(Self::KimiK25),
1728            "kimi-k2.6" => Ok(Self::KimiK26),
1729            "llama-3.2-11b-vision-instruct" => Ok(Self::Llama3211bVisionInstruct),
1730            "llama-3.2-90b-vision-instruct" => Ok(Self::Llama3290bVisionInstruct),
1731            "llama-3.3-70b-instruct" => Ok(Self::Llama3370bInstruct),
1732            "llama-4-maverick-17b-128e-instruct-fp8" => {
1733                Ok(Self::Llama4Maverick17b128eInstructFp8)
1734            }
1735            "llama-4-scout-17b-16e-instruct" => Ok(Self::Llama4Scout17b16eInstruct),
1736            "meta-llama-3.1-405b-instruct" => Ok(Self::MetaLlama31405bInstruct),
1737            "meta-llama-3.1-70b-instruct" => Ok(Self::MetaLlama3170bInstruct),
1738            "meta-llama-3.1-8b-instruct" => Ok(Self::MetaLlama318bInstruct),
1739            "ministral-3b" => Ok(Self::Ministral3b),
1740            "mistral-large-2411" => Ok(Self::MistralLarge2411),
1741            "mistral-medium-2505" => Ok(Self::MistralMedium2505),
1742            "mistral-nemo" => Ok(Self::MistralNemo),
1743            "mistral-small-2503" => Ok(Self::MistralSmall2503),
1744            "model-router" => Ok(Self::ModelRouter),
1745            "o1" => Ok(Self::O1),
1746            "o1-mini" => Ok(Self::O1Mini),
1747            "o3" => Ok(Self::O3),
1748            "o3-mini" => Ok(Self::O3Mini),
1749            "o4-mini" => Ok(Self::O4Mini),
1750            "phi-4-mini" => Ok(Self::Phi4Mini),
1751            "phi-4-mini-reasoning" => Ok(Self::Phi4MiniReasoning),
1752            _ => Err(format!("Unknown azure-foundry model: '{s}'")),
1753        }
1754    }
1755}
1756impl CodexModel {
1757    #[allow(clippy::too_many_lines)]
1758    fn model_id(self) -> &'static str {
1759        match self {
1760            Self::Gpt52 => "gpt-5.2",
1761            Self::Gpt54 => "gpt-5.4",
1762            Self::Gpt54Mini => "gpt-5.4-mini",
1763            Self::Gpt55 => "gpt-5.5",
1764            Self::Gpt56Luna => "gpt-5.6-luna",
1765            Self::Gpt56Sol => "gpt-5.6-sol",
1766            Self::Gpt56Terra => "gpt-5.6-terra",
1767        }
1768    }
1769    #[allow(clippy::too_many_lines)]
1770    fn display_name(self) -> &'static str {
1771        match self {
1772            Self::Gpt52 => "GPT-5.2",
1773            Self::Gpt54 => "GPT-5.4",
1774            Self::Gpt54Mini => "GPT-5.4 mini",
1775            Self::Gpt55 => "GPT-5.5",
1776            Self::Gpt56Luna => "GPT-5.6 Luna",
1777            Self::Gpt56Sol => "GPT-5.6 Sol",
1778            Self::Gpt56Terra => "GPT-5.6 Terra",
1779        }
1780    }
1781    #[allow(clippy::too_many_lines)]
1782    fn context_window(self) -> u32 {
1783        match self {
1784            Self::Gpt52 | Self::Gpt54 | Self::Gpt54Mini | Self::Gpt55 => 272_000,
1785            Self::Gpt56Luna | Self::Gpt56Sol | Self::Gpt56Terra => 372_000,
1786        }
1787    }
1788    #[allow(clippy::too_many_lines)]
1789    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
1790        match self {
1791            Self::Gpt52 | Self::Gpt54 | Self::Gpt54Mini | Self::Gpt55 => {
1792                &[
1793                    ReasoningEffort::Low,
1794                    ReasoningEffort::Medium,
1795                    ReasoningEffort::High,
1796                    ReasoningEffort::Xhigh,
1797                ]
1798            }
1799            Self::Gpt56Luna | Self::Gpt56Sol | Self::Gpt56Terra => {
1800                &[
1801                    ReasoningEffort::Low,
1802                    ReasoningEffort::Medium,
1803                    ReasoningEffort::High,
1804                    ReasoningEffort::Xhigh,
1805                    ReasoningEffort::Max,
1806                ]
1807            }
1808        }
1809    }
1810    pub fn supports_reasoning(self) -> bool {
1811        !self.reasoning_levels().is_empty()
1812    }
1813    #[allow(clippy::too_many_lines)]
1814    pub fn supports_prompt_caching(self) -> bool {
1815        match self {
1816            Self::Gpt52
1817            | Self::Gpt54
1818            | Self::Gpt54Mini
1819            | Self::Gpt55
1820            | Self::Gpt56Luna
1821            | Self::Gpt56Sol
1822            | Self::Gpt56Terra => true,
1823        }
1824    }
1825    #[allow(clippy::too_many_lines)]
1826    pub fn supports_image(self) -> bool {
1827        match self {
1828            Self::Gpt52
1829            | Self::Gpt54
1830            | Self::Gpt54Mini
1831            | Self::Gpt55
1832            | Self::Gpt56Luna
1833            | Self::Gpt56Sol
1834            | Self::Gpt56Terra => true,
1835        }
1836    }
1837    #[allow(clippy::too_many_lines)]
1838    pub fn supports_audio(self) -> bool {
1839        match self {
1840            Self::Gpt52
1841            | Self::Gpt54
1842            | Self::Gpt54Mini
1843            | Self::Gpt55
1844            | Self::Gpt56Luna
1845            | Self::Gpt56Sol
1846            | Self::Gpt56Terra => false,
1847        }
1848    }
1849    const ALL: &[CodexModel] = &[
1850        Self::Gpt52,
1851        Self::Gpt54,
1852        Self::Gpt54Mini,
1853        Self::Gpt55,
1854        Self::Gpt56Luna,
1855        Self::Gpt56Sol,
1856        Self::Gpt56Terra,
1857    ];
1858}
1859impl std::str::FromStr for CodexModel {
1860    type Err = String;
1861    #[allow(clippy::too_many_lines)]
1862    fn from_str(s: &str) -> Result<Self, Self::Err> {
1863        match s {
1864            "gpt-5.2" => Ok(Self::Gpt52),
1865            "gpt-5.4" => Ok(Self::Gpt54),
1866            "gpt-5.4-mini" => Ok(Self::Gpt54Mini),
1867            "gpt-5.5" => Ok(Self::Gpt55),
1868            "gpt-5.6-luna" => Ok(Self::Gpt56Luna),
1869            "gpt-5.6-sol" => Ok(Self::Gpt56Sol),
1870            "gpt-5.6-terra" => Ok(Self::Gpt56Terra),
1871            _ => Err(format!("Unknown codex model: '{s}'")),
1872        }
1873    }
1874}
1875impl DeepSeekModel {
1876    #[allow(clippy::too_many_lines)]
1877    fn model_id(self) -> &'static str {
1878        match self {
1879            Self::DeepseekChat => "deepseek-chat",
1880            Self::DeepseekReasoner => "deepseek-reasoner",
1881            Self::DeepseekV4Flash => "deepseek-v4-flash",
1882            Self::DeepseekV4Pro => "deepseek-v4-pro",
1883        }
1884    }
1885    #[allow(clippy::too_many_lines)]
1886    fn display_name(self) -> &'static str {
1887        match self {
1888            Self::DeepseekChat => "DeepSeek Chat",
1889            Self::DeepseekReasoner => "DeepSeek Reasoner",
1890            Self::DeepseekV4Flash => "DeepSeek V4 Flash",
1891            Self::DeepseekV4Pro => "DeepSeek V4 Pro",
1892        }
1893    }
1894    #[allow(clippy::too_many_lines)]
1895    fn context_window(self) -> u32 {
1896        match self {
1897            Self::DeepseekChat
1898            | Self::DeepseekReasoner
1899            | Self::DeepseekV4Flash
1900            | Self::DeepseekV4Pro => 1_000_000,
1901        }
1902    }
1903    #[allow(clippy::too_many_lines)]
1904    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
1905        match self {
1906            Self::DeepseekChat => &[],
1907            Self::DeepseekV4Flash | Self::DeepseekV4Pro => {
1908                &[ReasoningEffort::High, ReasoningEffort::Max]
1909            }
1910            Self::DeepseekReasoner => {
1911                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
1912            }
1913        }
1914    }
1915    pub fn supports_reasoning(self) -> bool {
1916        !self.reasoning_levels().is_empty()
1917    }
1918    #[allow(clippy::too_many_lines)]
1919    pub fn supports_prompt_caching(self) -> bool {
1920        match self {
1921            Self::DeepseekChat
1922            | Self::DeepseekReasoner
1923            | Self::DeepseekV4Flash
1924            | Self::DeepseekV4Pro => true,
1925        }
1926    }
1927    #[allow(clippy::too_many_lines)]
1928    pub fn supports_image(self) -> bool {
1929        match self {
1930            Self::DeepseekChat
1931            | Self::DeepseekReasoner
1932            | Self::DeepseekV4Flash
1933            | Self::DeepseekV4Pro => false,
1934        }
1935    }
1936    #[allow(clippy::too_many_lines)]
1937    pub fn supports_audio(self) -> bool {
1938        match self {
1939            Self::DeepseekChat
1940            | Self::DeepseekReasoner
1941            | Self::DeepseekV4Flash
1942            | Self::DeepseekV4Pro => false,
1943        }
1944    }
1945    const ALL: &[DeepSeekModel] = &[
1946        Self::DeepseekChat,
1947        Self::DeepseekReasoner,
1948        Self::DeepseekV4Flash,
1949        Self::DeepseekV4Pro,
1950    ];
1951}
1952impl std::str::FromStr for DeepSeekModel {
1953    type Err = String;
1954    #[allow(clippy::too_many_lines)]
1955    fn from_str(s: &str) -> Result<Self, Self::Err> {
1956        match s {
1957            "deepseek-chat" => Ok(Self::DeepseekChat),
1958            "deepseek-reasoner" => Ok(Self::DeepseekReasoner),
1959            "deepseek-v4-flash" => Ok(Self::DeepseekV4Flash),
1960            "deepseek-v4-pro" => Ok(Self::DeepseekV4Pro),
1961            _ => Err(format!("Unknown deepseek model: '{s}'")),
1962        }
1963    }
1964}
1965impl FireworksModel {
1966    #[allow(clippy::too_many_lines)]
1967    fn model_id(self) -> &'static str {
1968        match self {
1969            Self::AccountsFireworksModelsDeepseekV4Flash => {
1970                "accounts/fireworks/models/deepseek-v4-flash"
1971            }
1972            Self::AccountsFireworksModelsDeepseekV4Pro => {
1973                "accounts/fireworks/models/deepseek-v4-pro"
1974            }
1975            Self::AccountsFireworksModelsGlm5p1 => "accounts/fireworks/models/glm-5p1",
1976            Self::AccountsFireworksModelsGlm5p2 => "accounts/fireworks/models/glm-5p2",
1977            Self::AccountsFireworksModelsGptOss120b => {
1978                "accounts/fireworks/models/gpt-oss-120b"
1979            }
1980            Self::AccountsFireworksModelsGptOss20b => {
1981                "accounts/fireworks/models/gpt-oss-20b"
1982            }
1983            Self::AccountsFireworksModelsKimiK2p6 => {
1984                "accounts/fireworks/models/kimi-k2p6"
1985            }
1986            Self::AccountsFireworksModelsKimiK2p7Code => {
1987                "accounts/fireworks/models/kimi-k2p7-code"
1988            }
1989            Self::AccountsFireworksModelsMinimaxM2p7 => {
1990                "accounts/fireworks/models/minimax-m2p7"
1991            }
1992            Self::AccountsFireworksModelsMinimaxM3 => {
1993                "accounts/fireworks/models/minimax-m3"
1994            }
1995            Self::AccountsFireworksModelsQwen3p7Plus => {
1996                "accounts/fireworks/models/qwen3p7-plus"
1997            }
1998            Self::AccountsFireworksRoutersGlm5p1Fast => {
1999                "accounts/fireworks/routers/glm-5p1-fast"
2000            }
2001            Self::AccountsFireworksRoutersGlm5p2Fast => {
2002                "accounts/fireworks/routers/glm-5p2-fast"
2003            }
2004            Self::AccountsFireworksRoutersKimiK2p6Fast => {
2005                "accounts/fireworks/routers/kimi-k2p6-fast"
2006            }
2007            Self::AccountsFireworksRoutersKimiK2p6Turbo => {
2008                "accounts/fireworks/routers/kimi-k2p6-turbo"
2009            }
2010            Self::AccountsFireworksRoutersKimiK2p7CodeFast => {
2011                "accounts/fireworks/routers/kimi-k2p7-code-fast"
2012            }
2013        }
2014    }
2015    #[allow(clippy::too_many_lines)]
2016    fn display_name(self) -> &'static str {
2017        match self {
2018            Self::AccountsFireworksModelsDeepseekV4Flash => "DeepSeek V4 Flash",
2019            Self::AccountsFireworksModelsDeepseekV4Pro => "DeepSeek V4 Pro",
2020            Self::AccountsFireworksModelsGlm5p1 => "GLM 5.1",
2021            Self::AccountsFireworksRoutersGlm5p1Fast => "GLM 5.1 Fast",
2022            Self::AccountsFireworksModelsGlm5p2 => "GLM 5.2",
2023            Self::AccountsFireworksRoutersGlm5p2Fast => "GLM 5.2 Fast",
2024            Self::AccountsFireworksModelsGptOss120b => "GPT OSS 120B",
2025            Self::AccountsFireworksModelsGptOss20b => "GPT OSS 20B",
2026            Self::AccountsFireworksModelsKimiK2p6 => "Kimi K2.6",
2027            Self::AccountsFireworksRoutersKimiK2p6Fast => "Kimi K2.6 Fast",
2028            Self::AccountsFireworksRoutersKimiK2p6Turbo => "Kimi K2.6 Turbo",
2029            Self::AccountsFireworksModelsKimiK2p7Code => "Kimi K2.7 Code",
2030            Self::AccountsFireworksRoutersKimiK2p7CodeFast => "Kimi K2.7 Code Fast",
2031            Self::AccountsFireworksModelsMinimaxM2p7 => "MiniMax-M2.7",
2032            Self::AccountsFireworksModelsMinimaxM3 => "MiniMax-M3",
2033            Self::AccountsFireworksModelsQwen3p7Plus => "Qwen 3.7 Plus",
2034        }
2035    }
2036    #[allow(clippy::too_many_lines)]
2037    fn context_window(self) -> u32 {
2038        match self {
2039            Self::AccountsFireworksModelsGptOss120b
2040            | Self::AccountsFireworksModelsGptOss20b => 131_072,
2041            Self::AccountsFireworksModelsMinimaxM2p7 => 196_608,
2042            Self::AccountsFireworksModelsGlm5p1
2043            | Self::AccountsFireworksRoutersGlm5p1Fast => 202_800,
2044            Self::AccountsFireworksModelsKimiK2p6
2045            | Self::AccountsFireworksModelsKimiK2p7Code
2046            | Self::AccountsFireworksRoutersKimiK2p6Fast
2047            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2048            | Self::AccountsFireworksRoutersKimiK2p7CodeFast => 262_000,
2049            Self::AccountsFireworksModelsQwen3p7Plus => 262_144,
2050            Self::AccountsFireworksModelsMinimaxM3 => 512_000,
2051            Self::AccountsFireworksModelsDeepseekV4Flash
2052            | Self::AccountsFireworksModelsDeepseekV4Pro => 1_000_000,
2053            Self::AccountsFireworksModelsGlm5p2
2054            | Self::AccountsFireworksRoutersGlm5p2Fast => 1_048_575,
2055        }
2056    }
2057    #[allow(clippy::too_many_lines)]
2058    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
2059        match self {
2060            Self::AccountsFireworksModelsDeepseekV4Flash
2061            | Self::AccountsFireworksModelsDeepseekV4Pro
2062            | Self::AccountsFireworksModelsGlm5p2
2063            | Self::AccountsFireworksRoutersGlm5p2Fast => {
2064                &[ReasoningEffort::High, ReasoningEffort::Max]
2065            }
2066            Self::AccountsFireworksModelsGlm5p1
2067            | Self::AccountsFireworksModelsGptOss120b
2068            | Self::AccountsFireworksModelsGptOss20b
2069            | Self::AccountsFireworksModelsKimiK2p6
2070            | Self::AccountsFireworksModelsKimiK2p7Code
2071            | Self::AccountsFireworksModelsMinimaxM2p7
2072            | Self::AccountsFireworksModelsMinimaxM3
2073            | Self::AccountsFireworksModelsQwen3p7Plus
2074            | Self::AccountsFireworksRoutersGlm5p1Fast
2075            | Self::AccountsFireworksRoutersKimiK2p6Fast
2076            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2077            | Self::AccountsFireworksRoutersKimiK2p7CodeFast => {
2078                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
2079            }
2080        }
2081    }
2082    pub fn supports_reasoning(self) -> bool {
2083        !self.reasoning_levels().is_empty()
2084    }
2085    #[allow(clippy::too_many_lines)]
2086    pub fn supports_prompt_caching(self) -> bool {
2087        match self {
2088            Self::AccountsFireworksModelsDeepseekV4Flash
2089            | Self::AccountsFireworksModelsDeepseekV4Pro
2090            | Self::AccountsFireworksModelsGlm5p1
2091            | Self::AccountsFireworksModelsGlm5p2
2092            | Self::AccountsFireworksModelsGptOss120b
2093            | Self::AccountsFireworksModelsGptOss20b
2094            | Self::AccountsFireworksModelsKimiK2p6
2095            | Self::AccountsFireworksModelsKimiK2p7Code
2096            | Self::AccountsFireworksModelsMinimaxM2p7
2097            | Self::AccountsFireworksModelsMinimaxM3
2098            | Self::AccountsFireworksModelsQwen3p7Plus
2099            | Self::AccountsFireworksRoutersGlm5p1Fast
2100            | Self::AccountsFireworksRoutersGlm5p2Fast
2101            | Self::AccountsFireworksRoutersKimiK2p6Fast
2102            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2103            | Self::AccountsFireworksRoutersKimiK2p7CodeFast => true,
2104        }
2105    }
2106    #[allow(clippy::too_many_lines)]
2107    pub fn supports_image(self) -> bool {
2108        match self {
2109            Self::AccountsFireworksModelsDeepseekV4Flash
2110            | Self::AccountsFireworksModelsDeepseekV4Pro
2111            | Self::AccountsFireworksModelsGlm5p1
2112            | Self::AccountsFireworksModelsGlm5p2
2113            | Self::AccountsFireworksModelsGptOss120b
2114            | Self::AccountsFireworksModelsGptOss20b
2115            | Self::AccountsFireworksModelsMinimaxM2p7
2116            | Self::AccountsFireworksModelsMinimaxM3
2117            | Self::AccountsFireworksRoutersGlm5p1Fast
2118            | Self::AccountsFireworksRoutersGlm5p2Fast => false,
2119            Self::AccountsFireworksModelsKimiK2p6
2120            | Self::AccountsFireworksModelsKimiK2p7Code
2121            | Self::AccountsFireworksModelsQwen3p7Plus
2122            | Self::AccountsFireworksRoutersKimiK2p6Fast
2123            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2124            | Self::AccountsFireworksRoutersKimiK2p7CodeFast => true,
2125        }
2126    }
2127    #[allow(clippy::too_many_lines)]
2128    pub fn supports_audio(self) -> bool {
2129        match self {
2130            Self::AccountsFireworksModelsDeepseekV4Flash
2131            | Self::AccountsFireworksModelsDeepseekV4Pro
2132            | Self::AccountsFireworksModelsGlm5p1
2133            | Self::AccountsFireworksModelsGlm5p2
2134            | Self::AccountsFireworksModelsGptOss120b
2135            | Self::AccountsFireworksModelsGptOss20b
2136            | Self::AccountsFireworksModelsKimiK2p6
2137            | Self::AccountsFireworksModelsKimiK2p7Code
2138            | Self::AccountsFireworksModelsMinimaxM2p7
2139            | Self::AccountsFireworksModelsMinimaxM3
2140            | Self::AccountsFireworksModelsQwen3p7Plus
2141            | Self::AccountsFireworksRoutersGlm5p1Fast
2142            | Self::AccountsFireworksRoutersGlm5p2Fast
2143            | Self::AccountsFireworksRoutersKimiK2p6Fast
2144            | Self::AccountsFireworksRoutersKimiK2p6Turbo
2145            | Self::AccountsFireworksRoutersKimiK2p7CodeFast => false,
2146        }
2147    }
2148    const ALL: &[FireworksModel] = &[
2149        Self::AccountsFireworksModelsDeepseekV4Flash,
2150        Self::AccountsFireworksModelsDeepseekV4Pro,
2151        Self::AccountsFireworksModelsGlm5p1,
2152        Self::AccountsFireworksModelsGlm5p2,
2153        Self::AccountsFireworksModelsGptOss120b,
2154        Self::AccountsFireworksModelsGptOss20b,
2155        Self::AccountsFireworksModelsKimiK2p6,
2156        Self::AccountsFireworksModelsKimiK2p7Code,
2157        Self::AccountsFireworksModelsMinimaxM2p7,
2158        Self::AccountsFireworksModelsMinimaxM3,
2159        Self::AccountsFireworksModelsQwen3p7Plus,
2160        Self::AccountsFireworksRoutersGlm5p1Fast,
2161        Self::AccountsFireworksRoutersGlm5p2Fast,
2162        Self::AccountsFireworksRoutersKimiK2p6Fast,
2163        Self::AccountsFireworksRoutersKimiK2p6Turbo,
2164        Self::AccountsFireworksRoutersKimiK2p7CodeFast,
2165    ];
2166}
2167impl std::str::FromStr for FireworksModel {
2168    type Err = String;
2169    #[allow(clippy::too_many_lines)]
2170    fn from_str(s: &str) -> Result<Self, Self::Err> {
2171        match s {
2172            "accounts/fireworks/models/deepseek-v4-flash" => {
2173                Ok(Self::AccountsFireworksModelsDeepseekV4Flash)
2174            }
2175            "accounts/fireworks/models/deepseek-v4-pro" => {
2176                Ok(Self::AccountsFireworksModelsDeepseekV4Pro)
2177            }
2178            "accounts/fireworks/models/glm-5p1" => {
2179                Ok(Self::AccountsFireworksModelsGlm5p1)
2180            }
2181            "accounts/fireworks/models/glm-5p2" => {
2182                Ok(Self::AccountsFireworksModelsGlm5p2)
2183            }
2184            "accounts/fireworks/models/gpt-oss-120b" => {
2185                Ok(Self::AccountsFireworksModelsGptOss120b)
2186            }
2187            "accounts/fireworks/models/gpt-oss-20b" => {
2188                Ok(Self::AccountsFireworksModelsGptOss20b)
2189            }
2190            "accounts/fireworks/models/kimi-k2p6" => {
2191                Ok(Self::AccountsFireworksModelsKimiK2p6)
2192            }
2193            "accounts/fireworks/models/kimi-k2p7-code" => {
2194                Ok(Self::AccountsFireworksModelsKimiK2p7Code)
2195            }
2196            "accounts/fireworks/models/minimax-m2p7" => {
2197                Ok(Self::AccountsFireworksModelsMinimaxM2p7)
2198            }
2199            "accounts/fireworks/models/minimax-m3" => {
2200                Ok(Self::AccountsFireworksModelsMinimaxM3)
2201            }
2202            "accounts/fireworks/models/qwen3p7-plus" => {
2203                Ok(Self::AccountsFireworksModelsQwen3p7Plus)
2204            }
2205            "accounts/fireworks/routers/glm-5p1-fast" => {
2206                Ok(Self::AccountsFireworksRoutersGlm5p1Fast)
2207            }
2208            "accounts/fireworks/routers/glm-5p2-fast" => {
2209                Ok(Self::AccountsFireworksRoutersGlm5p2Fast)
2210            }
2211            "accounts/fireworks/routers/kimi-k2p6-fast" => {
2212                Ok(Self::AccountsFireworksRoutersKimiK2p6Fast)
2213            }
2214            "accounts/fireworks/routers/kimi-k2p6-turbo" => {
2215                Ok(Self::AccountsFireworksRoutersKimiK2p6Turbo)
2216            }
2217            "accounts/fireworks/routers/kimi-k2p7-code-fast" => {
2218                Ok(Self::AccountsFireworksRoutersKimiK2p7CodeFast)
2219            }
2220            _ => Err(format!("Unknown fireworks model: '{s}'")),
2221        }
2222    }
2223}
2224impl GeminiModel {
2225    #[allow(clippy::too_many_lines)]
2226    fn model_id(self) -> &'static str {
2227        match self {
2228            Self::Gemini20Flash => "gemini-2.0-flash",
2229            Self::Gemini20FlashLite => "gemini-2.0-flash-lite",
2230            Self::Gemini25Flash => "gemini-2.5-flash",
2231            Self::Gemini25FlashLite => "gemini-2.5-flash-lite",
2232            Self::Gemini25Pro => "gemini-2.5-pro",
2233            Self::Gemini3FlashPreview => "gemini-3-flash-preview",
2234            Self::Gemini3ProPreview => "gemini-3-pro-preview",
2235            Self::Gemini31FlashLite => "gemini-3.1-flash-lite",
2236            Self::Gemini31FlashLitePreview => "gemini-3.1-flash-lite-preview",
2237            Self::Gemini31ProPreview => "gemini-3.1-pro-preview",
2238            Self::Gemini31ProPreviewCustomtools => "gemini-3.1-pro-preview-customtools",
2239            Self::Gemini35Flash => "gemini-3.5-flash",
2240            Self::Gemma426bA4bIt => "gemma-4-26b-a4b-it",
2241            Self::Gemma431bIt => "gemma-4-31b-it",
2242        }
2243    }
2244    #[allow(clippy::too_many_lines)]
2245    fn display_name(self) -> &'static str {
2246        match self {
2247            Self::Gemini20Flash => "Gemini 2.0 Flash",
2248            Self::Gemini20FlashLite => "Gemini 2.0 Flash-Lite",
2249            Self::Gemini25Flash => "Gemini 2.5 Flash",
2250            Self::Gemini25FlashLite => "Gemini 2.5 Flash-Lite",
2251            Self::Gemini25Pro => "Gemini 2.5 Pro",
2252            Self::Gemini3FlashPreview => "Gemini 3 Flash Preview",
2253            Self::Gemini3ProPreview => "Gemini 3 Pro Preview",
2254            Self::Gemini31FlashLite => "Gemini 3.1 Flash Lite",
2255            Self::Gemini31FlashLitePreview => "Gemini 3.1 Flash Lite Preview",
2256            Self::Gemini31ProPreview => "Gemini 3.1 Pro Preview",
2257            Self::Gemini31ProPreviewCustomtools => "Gemini 3.1 Pro Preview Custom Tools",
2258            Self::Gemini35Flash => "Gemini 3.5 Flash",
2259            Self::Gemma426bA4bIt => "Gemma 4 26B A4B IT",
2260            Self::Gemma431bIt => "Gemma 4 31B IT",
2261        }
2262    }
2263    #[allow(clippy::too_many_lines)]
2264    fn context_window(self) -> u32 {
2265        match self {
2266            Self::Gemma426bA4bIt | Self::Gemma431bIt => 262_144,
2267            Self::Gemini20Flash
2268            | Self::Gemini20FlashLite
2269            | Self::Gemini25Flash
2270            | Self::Gemini25FlashLite
2271            | Self::Gemini25Pro
2272            | Self::Gemini3FlashPreview
2273            | Self::Gemini3ProPreview
2274            | Self::Gemini31FlashLite
2275            | Self::Gemini31FlashLitePreview
2276            | Self::Gemini31ProPreview
2277            | Self::Gemini31ProPreviewCustomtools
2278            | Self::Gemini35Flash => 1_048_576,
2279        }
2280    }
2281    #[allow(clippy::too_many_lines)]
2282    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
2283        match self {
2284            Self::Gemini20Flash | Self::Gemini20FlashLite => &[],
2285            Self::Gemini3ProPreview => &[ReasoningEffort::Low, ReasoningEffort::High],
2286            Self::Gemini25Flash
2287            | Self::Gemini25FlashLite
2288            | Self::Gemini25Pro
2289            | Self::Gemini31ProPreview
2290            | Self::Gemini31ProPreviewCustomtools
2291            | Self::Gemma426bA4bIt
2292            | Self::Gemma431bIt => {
2293                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
2294            }
2295            Self::Gemini3FlashPreview
2296            | Self::Gemini31FlashLite
2297            | Self::Gemini31FlashLitePreview
2298            | Self::Gemini35Flash => {
2299                &[
2300                    ReasoningEffort::Minimal,
2301                    ReasoningEffort::Low,
2302                    ReasoningEffort::Medium,
2303                    ReasoningEffort::High,
2304                ]
2305            }
2306        }
2307    }
2308    pub fn supports_reasoning(self) -> bool {
2309        !self.reasoning_levels().is_empty()
2310    }
2311    #[allow(clippy::too_many_lines)]
2312    pub fn supports_prompt_caching(self) -> bool {
2313        match self {
2314            Self::Gemini20FlashLite | Self::Gemma426bA4bIt | Self::Gemma431bIt => false,
2315            Self::Gemini20Flash
2316            | Self::Gemini25Flash
2317            | Self::Gemini25FlashLite
2318            | Self::Gemini25Pro
2319            | Self::Gemini3FlashPreview
2320            | Self::Gemini3ProPreview
2321            | Self::Gemini31FlashLite
2322            | Self::Gemini31FlashLitePreview
2323            | Self::Gemini31ProPreview
2324            | Self::Gemini31ProPreviewCustomtools
2325            | Self::Gemini35Flash => true,
2326        }
2327    }
2328    #[allow(clippy::too_many_lines)]
2329    pub fn supports_image(self) -> bool {
2330        match self {
2331            Self::Gemini20Flash
2332            | Self::Gemini20FlashLite
2333            | Self::Gemini25Flash
2334            | Self::Gemini25FlashLite
2335            | Self::Gemini25Pro
2336            | Self::Gemini3FlashPreview
2337            | Self::Gemini3ProPreview
2338            | Self::Gemini31FlashLite
2339            | Self::Gemini31FlashLitePreview
2340            | Self::Gemini31ProPreview
2341            | Self::Gemini31ProPreviewCustomtools
2342            | Self::Gemini35Flash
2343            | Self::Gemma426bA4bIt
2344            | Self::Gemma431bIt => true,
2345        }
2346    }
2347    #[allow(clippy::too_many_lines)]
2348    pub fn supports_audio(self) -> bool {
2349        match self {
2350            Self::Gemma426bA4bIt | Self::Gemma431bIt => false,
2351            Self::Gemini20Flash
2352            | Self::Gemini20FlashLite
2353            | Self::Gemini25Flash
2354            | Self::Gemini25FlashLite
2355            | Self::Gemini25Pro
2356            | Self::Gemini3FlashPreview
2357            | Self::Gemini3ProPreview
2358            | Self::Gemini31FlashLite
2359            | Self::Gemini31FlashLitePreview
2360            | Self::Gemini31ProPreview
2361            | Self::Gemini31ProPreviewCustomtools
2362            | Self::Gemini35Flash => true,
2363        }
2364    }
2365    const ALL: &[GeminiModel] = &[
2366        Self::Gemini20Flash,
2367        Self::Gemini20FlashLite,
2368        Self::Gemini25Flash,
2369        Self::Gemini25FlashLite,
2370        Self::Gemini25Pro,
2371        Self::Gemini3FlashPreview,
2372        Self::Gemini3ProPreview,
2373        Self::Gemini31FlashLite,
2374        Self::Gemini31FlashLitePreview,
2375        Self::Gemini31ProPreview,
2376        Self::Gemini31ProPreviewCustomtools,
2377        Self::Gemini35Flash,
2378        Self::Gemma426bA4bIt,
2379        Self::Gemma431bIt,
2380    ];
2381}
2382impl std::str::FromStr for GeminiModel {
2383    type Err = String;
2384    #[allow(clippy::too_many_lines)]
2385    fn from_str(s: &str) -> Result<Self, Self::Err> {
2386        match s {
2387            "gemini-2.0-flash" => Ok(Self::Gemini20Flash),
2388            "gemini-2.0-flash-lite" => Ok(Self::Gemini20FlashLite),
2389            "gemini-2.5-flash" => Ok(Self::Gemini25Flash),
2390            "gemini-2.5-flash-lite" => Ok(Self::Gemini25FlashLite),
2391            "gemini-2.5-pro" => Ok(Self::Gemini25Pro),
2392            "gemini-3-flash-preview" => Ok(Self::Gemini3FlashPreview),
2393            "gemini-3-pro-preview" => Ok(Self::Gemini3ProPreview),
2394            "gemini-3.1-flash-lite" => Ok(Self::Gemini31FlashLite),
2395            "gemini-3.1-flash-lite-preview" => Ok(Self::Gemini31FlashLitePreview),
2396            "gemini-3.1-pro-preview" => Ok(Self::Gemini31ProPreview),
2397            "gemini-3.1-pro-preview-customtools" => {
2398                Ok(Self::Gemini31ProPreviewCustomtools)
2399            }
2400            "gemini-3.5-flash" => Ok(Self::Gemini35Flash),
2401            "gemma-4-26b-a4b-it" => Ok(Self::Gemma426bA4bIt),
2402            "gemma-4-31b-it" => Ok(Self::Gemma431bIt),
2403            _ => Err(format!("Unknown gemini model: '{s}'")),
2404        }
2405    }
2406}
2407impl MoonshotModel {
2408    #[allow(clippy::too_many_lines)]
2409    fn model_id(self) -> &'static str {
2410        match self {
2411            Self::KimiK20711Preview => "kimi-k2-0711-preview",
2412            Self::KimiK20905Preview => "kimi-k2-0905-preview",
2413            Self::KimiK2Thinking => "kimi-k2-thinking",
2414            Self::KimiK2ThinkingTurbo => "kimi-k2-thinking-turbo",
2415            Self::KimiK2TurboPreview => "kimi-k2-turbo-preview",
2416            Self::KimiK25 => "kimi-k2.5",
2417            Self::KimiK26 => "kimi-k2.6",
2418            Self::KimiK27Code => "kimi-k2.7-code",
2419            Self::KimiK27CodeHighspeed => "kimi-k2.7-code-highspeed",
2420            Self::KimiK3 => "kimi-k3",
2421        }
2422    }
2423    #[allow(clippy::too_many_lines)]
2424    fn display_name(self) -> &'static str {
2425        match self {
2426            Self::KimiK20711Preview => "Kimi K2 0711",
2427            Self::KimiK20905Preview => "Kimi K2 0905",
2428            Self::KimiK2Thinking => "Kimi K2 Thinking",
2429            Self::KimiK2ThinkingTurbo => "Kimi K2 Thinking Turbo",
2430            Self::KimiK2TurboPreview => "Kimi K2 Turbo",
2431            Self::KimiK25 => "Kimi K2.5",
2432            Self::KimiK26 => "Kimi K2.6",
2433            Self::KimiK27Code => "Kimi K2.7 Code",
2434            Self::KimiK27CodeHighspeed => "Kimi K2.7 Code HighSpeed",
2435            Self::KimiK3 => "Kimi K3",
2436        }
2437    }
2438    #[allow(clippy::too_many_lines)]
2439    fn context_window(self) -> u32 {
2440        match self {
2441            Self::KimiK20711Preview => 131_072,
2442            Self::KimiK20905Preview
2443            | Self::KimiK2Thinking
2444            | Self::KimiK2ThinkingTurbo
2445            | Self::KimiK2TurboPreview
2446            | Self::KimiK25
2447            | Self::KimiK26
2448            | Self::KimiK27Code
2449            | Self::KimiK27CodeHighspeed => 262_144,
2450            Self::KimiK3 => 1_048_576,
2451        }
2452    }
2453    #[allow(clippy::too_many_lines)]
2454    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
2455        match self {
2456            Self::KimiK20711Preview
2457            | Self::KimiK20905Preview
2458            | Self::KimiK2TurboPreview => &[],
2459            Self::KimiK3 => {
2460                &[ReasoningEffort::Low, ReasoningEffort::High, ReasoningEffort::Max]
2461            }
2462            Self::KimiK2Thinking
2463            | Self::KimiK2ThinkingTurbo
2464            | Self::KimiK25
2465            | Self::KimiK26
2466            | Self::KimiK27Code
2467            | Self::KimiK27CodeHighspeed => {
2468                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
2469            }
2470        }
2471    }
2472    pub fn supports_reasoning(self) -> bool {
2473        !self.reasoning_levels().is_empty()
2474    }
2475    #[allow(clippy::too_many_lines)]
2476    pub fn supports_prompt_caching(self) -> bool {
2477        match self {
2478            Self::KimiK20711Preview
2479            | Self::KimiK20905Preview
2480            | Self::KimiK2Thinking
2481            | Self::KimiK2ThinkingTurbo
2482            | Self::KimiK2TurboPreview
2483            | Self::KimiK25
2484            | Self::KimiK26
2485            | Self::KimiK27Code
2486            | Self::KimiK27CodeHighspeed
2487            | Self::KimiK3 => true,
2488        }
2489    }
2490    #[allow(clippy::too_many_lines)]
2491    pub fn supports_image(self) -> bool {
2492        match self {
2493            Self::KimiK20711Preview
2494            | Self::KimiK20905Preview
2495            | Self::KimiK2Thinking
2496            | Self::KimiK2ThinkingTurbo
2497            | Self::KimiK2TurboPreview => false,
2498            Self::KimiK25
2499            | Self::KimiK26
2500            | Self::KimiK27Code
2501            | Self::KimiK27CodeHighspeed
2502            | Self::KimiK3 => true,
2503        }
2504    }
2505    #[allow(clippy::too_many_lines)]
2506    pub fn supports_audio(self) -> bool {
2507        match self {
2508            Self::KimiK20711Preview
2509            | Self::KimiK20905Preview
2510            | Self::KimiK2Thinking
2511            | Self::KimiK2ThinkingTurbo
2512            | Self::KimiK2TurboPreview
2513            | Self::KimiK25
2514            | Self::KimiK26
2515            | Self::KimiK27Code
2516            | Self::KimiK27CodeHighspeed
2517            | Self::KimiK3 => false,
2518        }
2519    }
2520    const ALL: &[MoonshotModel] = &[
2521        Self::KimiK20711Preview,
2522        Self::KimiK20905Preview,
2523        Self::KimiK2Thinking,
2524        Self::KimiK2ThinkingTurbo,
2525        Self::KimiK2TurboPreview,
2526        Self::KimiK25,
2527        Self::KimiK26,
2528        Self::KimiK27Code,
2529        Self::KimiK27CodeHighspeed,
2530        Self::KimiK3,
2531    ];
2532}
2533impl std::str::FromStr for MoonshotModel {
2534    type Err = String;
2535    #[allow(clippy::too_many_lines)]
2536    fn from_str(s: &str) -> Result<Self, Self::Err> {
2537        match s {
2538            "kimi-k2-0711-preview" => Ok(Self::KimiK20711Preview),
2539            "kimi-k2-0905-preview" => Ok(Self::KimiK20905Preview),
2540            "kimi-k2-thinking" => Ok(Self::KimiK2Thinking),
2541            "kimi-k2-thinking-turbo" => Ok(Self::KimiK2ThinkingTurbo),
2542            "kimi-k2-turbo-preview" => Ok(Self::KimiK2TurboPreview),
2543            "kimi-k2.5" => Ok(Self::KimiK25),
2544            "kimi-k2.6" => Ok(Self::KimiK26),
2545            "kimi-k2.7-code" => Ok(Self::KimiK27Code),
2546            "kimi-k2.7-code-highspeed" => Ok(Self::KimiK27CodeHighspeed),
2547            "kimi-k3" => Ok(Self::KimiK3),
2548            _ => Err(format!("Unknown moonshot model: '{s}'")),
2549        }
2550    }
2551}
2552impl OpenaiModel {
2553    #[allow(clippy::too_many_lines)]
2554    fn model_id(self) -> &'static str {
2555        match self {
2556            Self::Gpt4 => "gpt-4",
2557            Self::Gpt4Turbo => "gpt-4-turbo",
2558            Self::Gpt41 => "gpt-4.1",
2559            Self::Gpt41Mini => "gpt-4.1-mini",
2560            Self::Gpt41Nano => "gpt-4.1-nano",
2561            Self::Gpt4o => "gpt-4o",
2562            Self::Gpt4o20240513 => "gpt-4o-2024-05-13",
2563            Self::Gpt4o20240806 => "gpt-4o-2024-08-06",
2564            Self::Gpt4o20241120 => "gpt-4o-2024-11-20",
2565            Self::Gpt4oMini => "gpt-4o-mini",
2566            Self::Gpt5 => "gpt-5",
2567            Self::Gpt5Codex => "gpt-5-codex",
2568            Self::Gpt5Mini => "gpt-5-mini",
2569            Self::Gpt5Nano => "gpt-5-nano",
2570            Self::Gpt5Pro => "gpt-5-pro",
2571            Self::Gpt51 => "gpt-5.1",
2572            Self::Gpt51Codex => "gpt-5.1-codex",
2573            Self::Gpt51CodexMax => "gpt-5.1-codex-max",
2574            Self::Gpt51CodexMini => "gpt-5.1-codex-mini",
2575            Self::Gpt52 => "gpt-5.2",
2576            Self::Gpt52Codex => "gpt-5.2-codex",
2577            Self::Gpt52Pro => "gpt-5.2-pro",
2578            Self::Gpt53Codex => "gpt-5.3-codex",
2579            Self::Gpt53CodexSpark => "gpt-5.3-codex-spark",
2580            Self::Gpt54 => "gpt-5.4",
2581            Self::Gpt54Mini => "gpt-5.4-mini",
2582            Self::Gpt54Nano => "gpt-5.4-nano",
2583            Self::Gpt54Pro => "gpt-5.4-pro",
2584            Self::Gpt55 => "gpt-5.5",
2585            Self::Gpt55Pro => "gpt-5.5-pro",
2586            Self::Gpt56 => "gpt-5.6",
2587            Self::Gpt56Luna => "gpt-5.6-luna",
2588            Self::Gpt56Sol => "gpt-5.6-sol",
2589            Self::Gpt56Terra => "gpt-5.6-terra",
2590            Self::GptRealtime21 => "gpt-realtime-2.1",
2591            Self::O1 => "o1",
2592            Self::O1Pro => "o1-pro",
2593            Self::O3 => "o3",
2594            Self::O3DeepResearch => "o3-deep-research",
2595            Self::O3Mini => "o3-mini",
2596            Self::O3Pro => "o3-pro",
2597            Self::O4Mini => "o4-mini",
2598            Self::O4MiniDeepResearch => "o4-mini-deep-research",
2599        }
2600    }
2601    #[allow(clippy::too_many_lines)]
2602    fn display_name(self) -> &'static str {
2603        match self {
2604            Self::Gpt4 => "GPT-4",
2605            Self::Gpt4Turbo => "GPT-4 Turbo",
2606            Self::Gpt41 => "GPT-4.1",
2607            Self::Gpt41Mini => "GPT-4.1 mini",
2608            Self::Gpt41Nano => "GPT-4.1 nano",
2609            Self::Gpt4o => "GPT-4o",
2610            Self::Gpt4o20240513 => "GPT-4o (2024-05-13)",
2611            Self::Gpt4o20240806 => "GPT-4o (2024-08-06)",
2612            Self::Gpt4o20241120 => "GPT-4o (2024-11-20)",
2613            Self::Gpt4oMini => "GPT-4o mini",
2614            Self::Gpt5 => "GPT-5",
2615            Self::Gpt5Mini => "GPT-5 Mini",
2616            Self::Gpt5Nano => "GPT-5 Nano",
2617            Self::Gpt5Pro => "GPT-5 Pro",
2618            Self::Gpt5Codex => "GPT-5-Codex",
2619            Self::Gpt51 => "GPT-5.1",
2620            Self::Gpt51Codex => "GPT-5.1 Codex",
2621            Self::Gpt51CodexMax => "GPT-5.1 Codex Max",
2622            Self::Gpt51CodexMini => "GPT-5.1 Codex mini",
2623            Self::Gpt52 => "GPT-5.2",
2624            Self::Gpt52Codex => "GPT-5.2 Codex",
2625            Self::Gpt52Pro => "GPT-5.2 Pro",
2626            Self::Gpt53Codex => "GPT-5.3 Codex",
2627            Self::Gpt53CodexSpark => "GPT-5.3 Codex Spark",
2628            Self::Gpt54 => "GPT-5.4",
2629            Self::Gpt54Pro => "GPT-5.4 Pro",
2630            Self::Gpt54Mini => "GPT-5.4 mini",
2631            Self::Gpt54Nano => "GPT-5.4 nano",
2632            Self::Gpt55 => "GPT-5.5",
2633            Self::Gpt55Pro => "GPT-5.5 Pro",
2634            Self::Gpt56 => "GPT-5.6",
2635            Self::Gpt56Luna => "GPT-5.6 Luna",
2636            Self::Gpt56Sol => "GPT-5.6 Sol",
2637            Self::Gpt56Terra => "GPT-5.6 Terra",
2638            Self::GptRealtime21 => "GPT-Realtime-2.1",
2639            Self::O1 => "o1",
2640            Self::O1Pro => "o1-pro",
2641            Self::O3 => "o3",
2642            Self::O3DeepResearch => "o3-deep-research",
2643            Self::O3Mini => "o3-mini",
2644            Self::O3Pro => "o3-pro",
2645            Self::O4Mini => "o4-mini",
2646            Self::O4MiniDeepResearch => "o4-mini-deep-research",
2647        }
2648    }
2649    #[allow(clippy::too_many_lines)]
2650    fn context_window(self) -> u32 {
2651        match self {
2652            Self::Gpt4 => 8192,
2653            Self::Gpt4Turbo
2654            | Self::Gpt4o
2655            | Self::Gpt4o20240513
2656            | Self::Gpt4o20240806
2657            | Self::Gpt4o20241120
2658            | Self::Gpt4oMini
2659            | Self::Gpt53CodexSpark
2660            | Self::GptRealtime21 => 128_000,
2661            Self::O1
2662            | Self::O1Pro
2663            | Self::O3
2664            | Self::O3DeepResearch
2665            | Self::O3Mini
2666            | Self::O3Pro
2667            | Self::O4Mini
2668            | Self::O4MiniDeepResearch => 200_000,
2669            Self::Gpt5
2670            | Self::Gpt5Codex
2671            | Self::Gpt5Mini
2672            | Self::Gpt5Nano
2673            | Self::Gpt5Pro
2674            | Self::Gpt51
2675            | Self::Gpt51Codex
2676            | Self::Gpt51CodexMax
2677            | Self::Gpt51CodexMini
2678            | Self::Gpt52
2679            | Self::Gpt52Codex
2680            | Self::Gpt52Pro
2681            | Self::Gpt53Codex
2682            | Self::Gpt54Mini
2683            | Self::Gpt54Nano => 400_000,
2684            Self::Gpt41 | Self::Gpt41Mini | Self::Gpt41Nano => 1_047_576,
2685            Self::Gpt54
2686            | Self::Gpt54Pro
2687            | Self::Gpt55
2688            | Self::Gpt55Pro
2689            | Self::Gpt56
2690            | Self::Gpt56Luna
2691            | Self::Gpt56Sol
2692            | Self::Gpt56Terra => 1_050_000,
2693        }
2694    }
2695    #[allow(clippy::too_many_lines)]
2696    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
2697        match self {
2698            Self::Gpt4
2699            | Self::Gpt4Turbo
2700            | Self::Gpt41
2701            | Self::Gpt41Mini
2702            | Self::Gpt41Nano
2703            | Self::Gpt4o
2704            | Self::Gpt4o20240513
2705            | Self::Gpt4o20240806
2706            | Self::Gpt4o20241120
2707            | Self::Gpt4oMini => &[],
2708            Self::Gpt5Pro => &[ReasoningEffort::High],
2709            Self::Gpt5Codex
2710            | Self::Gpt51
2711            | Self::Gpt51Codex
2712            | Self::Gpt51CodexMini
2713            | Self::O1
2714            | Self::O1Pro
2715            | Self::O3
2716            | Self::O3Mini
2717            | Self::O3Pro
2718            | Self::O4Mini => {
2719                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
2720            }
2721            Self::Gpt51CodexMax
2722            | Self::Gpt52
2723            | Self::Gpt52Codex
2724            | Self::Gpt53Codex
2725            | Self::Gpt53CodexSpark
2726            | Self::Gpt54
2727            | Self::Gpt54Mini
2728            | Self::Gpt54Nano
2729            | Self::Gpt55 => {
2730                &[
2731                    ReasoningEffort::Low,
2732                    ReasoningEffort::Medium,
2733                    ReasoningEffort::High,
2734                    ReasoningEffort::Xhigh,
2735                ]
2736            }
2737            Self::Gpt56 | Self::Gpt56Luna | Self::Gpt56Sol | Self::Gpt56Terra => {
2738                &[
2739                    ReasoningEffort::Low,
2740                    ReasoningEffort::Medium,
2741                    ReasoningEffort::High,
2742                    ReasoningEffort::Xhigh,
2743                    ReasoningEffort::Max,
2744                ]
2745            }
2746            Self::O3DeepResearch | Self::O4MiniDeepResearch => &[ReasoningEffort::Medium],
2747            Self::Gpt52Pro | Self::Gpt54Pro | Self::Gpt55Pro => {
2748                &[ReasoningEffort::Medium, ReasoningEffort::High, ReasoningEffort::Xhigh]
2749            }
2750            Self::Gpt5 | Self::Gpt5Mini | Self::Gpt5Nano => {
2751                &[
2752                    ReasoningEffort::Minimal,
2753                    ReasoningEffort::Low,
2754                    ReasoningEffort::Medium,
2755                    ReasoningEffort::High,
2756                ]
2757            }
2758            Self::GptRealtime21 => {
2759                &[
2760                    ReasoningEffort::Minimal,
2761                    ReasoningEffort::Low,
2762                    ReasoningEffort::Medium,
2763                    ReasoningEffort::High,
2764                    ReasoningEffort::Xhigh,
2765                ]
2766            }
2767        }
2768    }
2769    pub fn supports_reasoning(self) -> bool {
2770        !self.reasoning_levels().is_empty()
2771    }
2772    #[allow(clippy::too_many_lines)]
2773    pub fn supports_prompt_caching(self) -> bool {
2774        match self {
2775            Self::Gpt4
2776            | Self::Gpt4Turbo
2777            | Self::Gpt4o20240513
2778            | Self::Gpt5Pro
2779            | Self::Gpt52Pro
2780            | Self::Gpt54Pro
2781            | Self::Gpt55Pro
2782            | Self::O1Pro
2783            | Self::O3Pro => false,
2784            Self::Gpt41
2785            | Self::Gpt41Mini
2786            | Self::Gpt41Nano
2787            | Self::Gpt4o
2788            | Self::Gpt4o20240806
2789            | Self::Gpt4o20241120
2790            | Self::Gpt4oMini
2791            | Self::Gpt5
2792            | Self::Gpt5Codex
2793            | Self::Gpt5Mini
2794            | Self::Gpt5Nano
2795            | Self::Gpt51
2796            | Self::Gpt51Codex
2797            | Self::Gpt51CodexMax
2798            | Self::Gpt51CodexMini
2799            | Self::Gpt52
2800            | Self::Gpt52Codex
2801            | Self::Gpt53Codex
2802            | Self::Gpt53CodexSpark
2803            | Self::Gpt54
2804            | Self::Gpt54Mini
2805            | Self::Gpt54Nano
2806            | Self::Gpt55
2807            | Self::Gpt56
2808            | Self::Gpt56Luna
2809            | Self::Gpt56Sol
2810            | Self::Gpt56Terra
2811            | Self::GptRealtime21
2812            | Self::O1
2813            | Self::O3
2814            | Self::O3DeepResearch
2815            | Self::O3Mini
2816            | Self::O4Mini
2817            | Self::O4MiniDeepResearch => true,
2818        }
2819    }
2820    #[allow(clippy::too_many_lines)]
2821    pub fn supports_image(self) -> bool {
2822        match self {
2823            Self::Gpt4 | Self::O3Mini => false,
2824            Self::Gpt4Turbo
2825            | Self::Gpt41
2826            | Self::Gpt41Mini
2827            | Self::Gpt41Nano
2828            | Self::Gpt4o
2829            | Self::Gpt4o20240513
2830            | Self::Gpt4o20240806
2831            | Self::Gpt4o20241120
2832            | Self::Gpt4oMini
2833            | Self::Gpt5
2834            | Self::Gpt5Codex
2835            | Self::Gpt5Mini
2836            | Self::Gpt5Nano
2837            | Self::Gpt5Pro
2838            | Self::Gpt51
2839            | Self::Gpt51Codex
2840            | Self::Gpt51CodexMax
2841            | Self::Gpt51CodexMini
2842            | Self::Gpt52
2843            | Self::Gpt52Codex
2844            | Self::Gpt52Pro
2845            | Self::Gpt53Codex
2846            | Self::Gpt53CodexSpark
2847            | Self::Gpt54
2848            | Self::Gpt54Mini
2849            | Self::Gpt54Nano
2850            | Self::Gpt54Pro
2851            | Self::Gpt55
2852            | Self::Gpt55Pro
2853            | Self::Gpt56
2854            | Self::Gpt56Luna
2855            | Self::Gpt56Sol
2856            | Self::Gpt56Terra
2857            | Self::GptRealtime21
2858            | Self::O1
2859            | Self::O1Pro
2860            | Self::O3
2861            | Self::O3DeepResearch
2862            | Self::O3Pro
2863            | Self::O4Mini
2864            | Self::O4MiniDeepResearch => true,
2865        }
2866    }
2867    #[allow(clippy::too_many_lines)]
2868    pub fn supports_audio(self) -> bool {
2869        match self {
2870            Self::Gpt4
2871            | Self::Gpt4Turbo
2872            | Self::Gpt41
2873            | Self::Gpt41Mini
2874            | Self::Gpt41Nano
2875            | Self::Gpt4o
2876            | Self::Gpt4o20240513
2877            | Self::Gpt4o20240806
2878            | Self::Gpt4o20241120
2879            | Self::Gpt4oMini
2880            | Self::Gpt5
2881            | Self::Gpt5Codex
2882            | Self::Gpt5Mini
2883            | Self::Gpt5Nano
2884            | Self::Gpt5Pro
2885            | Self::Gpt51
2886            | Self::Gpt51Codex
2887            | Self::Gpt51CodexMax
2888            | Self::Gpt51CodexMini
2889            | Self::Gpt52
2890            | Self::Gpt52Codex
2891            | Self::Gpt52Pro
2892            | Self::Gpt53Codex
2893            | Self::Gpt53CodexSpark
2894            | Self::Gpt54
2895            | Self::Gpt54Mini
2896            | Self::Gpt54Nano
2897            | Self::Gpt54Pro
2898            | Self::Gpt55
2899            | Self::Gpt55Pro
2900            | Self::Gpt56
2901            | Self::Gpt56Luna
2902            | Self::Gpt56Sol
2903            | Self::Gpt56Terra
2904            | Self::O1
2905            | Self::O1Pro
2906            | Self::O3
2907            | Self::O3DeepResearch
2908            | Self::O3Mini
2909            | Self::O3Pro
2910            | Self::O4Mini
2911            | Self::O4MiniDeepResearch => false,
2912            Self::GptRealtime21 => true,
2913        }
2914    }
2915    const ALL: &[OpenaiModel] = &[
2916        Self::Gpt4,
2917        Self::Gpt4Turbo,
2918        Self::Gpt41,
2919        Self::Gpt41Mini,
2920        Self::Gpt41Nano,
2921        Self::Gpt4o,
2922        Self::Gpt4o20240513,
2923        Self::Gpt4o20240806,
2924        Self::Gpt4o20241120,
2925        Self::Gpt4oMini,
2926        Self::Gpt5,
2927        Self::Gpt5Codex,
2928        Self::Gpt5Mini,
2929        Self::Gpt5Nano,
2930        Self::Gpt5Pro,
2931        Self::Gpt51,
2932        Self::Gpt51Codex,
2933        Self::Gpt51CodexMax,
2934        Self::Gpt51CodexMini,
2935        Self::Gpt52,
2936        Self::Gpt52Codex,
2937        Self::Gpt52Pro,
2938        Self::Gpt53Codex,
2939        Self::Gpt53CodexSpark,
2940        Self::Gpt54,
2941        Self::Gpt54Mini,
2942        Self::Gpt54Nano,
2943        Self::Gpt54Pro,
2944        Self::Gpt55,
2945        Self::Gpt55Pro,
2946        Self::Gpt56,
2947        Self::Gpt56Luna,
2948        Self::Gpt56Sol,
2949        Self::Gpt56Terra,
2950        Self::GptRealtime21,
2951        Self::O1,
2952        Self::O1Pro,
2953        Self::O3,
2954        Self::O3DeepResearch,
2955        Self::O3Mini,
2956        Self::O3Pro,
2957        Self::O4Mini,
2958        Self::O4MiniDeepResearch,
2959    ];
2960}
2961impl std::str::FromStr for OpenaiModel {
2962    type Err = String;
2963    #[allow(clippy::too_many_lines)]
2964    fn from_str(s: &str) -> Result<Self, Self::Err> {
2965        match s {
2966            "gpt-4" => Ok(Self::Gpt4),
2967            "gpt-4-turbo" => Ok(Self::Gpt4Turbo),
2968            "gpt-4.1" => Ok(Self::Gpt41),
2969            "gpt-4.1-mini" => Ok(Self::Gpt41Mini),
2970            "gpt-4.1-nano" => Ok(Self::Gpt41Nano),
2971            "gpt-4o" => Ok(Self::Gpt4o),
2972            "gpt-4o-2024-05-13" => Ok(Self::Gpt4o20240513),
2973            "gpt-4o-2024-08-06" => Ok(Self::Gpt4o20240806),
2974            "gpt-4o-2024-11-20" => Ok(Self::Gpt4o20241120),
2975            "gpt-4o-mini" => Ok(Self::Gpt4oMini),
2976            "gpt-5" => Ok(Self::Gpt5),
2977            "gpt-5-codex" => Ok(Self::Gpt5Codex),
2978            "gpt-5-mini" => Ok(Self::Gpt5Mini),
2979            "gpt-5-nano" => Ok(Self::Gpt5Nano),
2980            "gpt-5-pro" => Ok(Self::Gpt5Pro),
2981            "gpt-5.1" => Ok(Self::Gpt51),
2982            "gpt-5.1-codex" => Ok(Self::Gpt51Codex),
2983            "gpt-5.1-codex-max" => Ok(Self::Gpt51CodexMax),
2984            "gpt-5.1-codex-mini" => Ok(Self::Gpt51CodexMini),
2985            "gpt-5.2" => Ok(Self::Gpt52),
2986            "gpt-5.2-codex" => Ok(Self::Gpt52Codex),
2987            "gpt-5.2-pro" => Ok(Self::Gpt52Pro),
2988            "gpt-5.3-codex" => Ok(Self::Gpt53Codex),
2989            "gpt-5.3-codex-spark" => Ok(Self::Gpt53CodexSpark),
2990            "gpt-5.4" => Ok(Self::Gpt54),
2991            "gpt-5.4-mini" => Ok(Self::Gpt54Mini),
2992            "gpt-5.4-nano" => Ok(Self::Gpt54Nano),
2993            "gpt-5.4-pro" => Ok(Self::Gpt54Pro),
2994            "gpt-5.5" => Ok(Self::Gpt55),
2995            "gpt-5.5-pro" => Ok(Self::Gpt55Pro),
2996            "gpt-5.6" => Ok(Self::Gpt56),
2997            "gpt-5.6-luna" => Ok(Self::Gpt56Luna),
2998            "gpt-5.6-sol" => Ok(Self::Gpt56Sol),
2999            "gpt-5.6-terra" => Ok(Self::Gpt56Terra),
3000            "gpt-realtime-2.1" => Ok(Self::GptRealtime21),
3001            "o1" => Ok(Self::O1),
3002            "o1-pro" => Ok(Self::O1Pro),
3003            "o3" => Ok(Self::O3),
3004            "o3-deep-research" => Ok(Self::O3DeepResearch),
3005            "o3-mini" => Ok(Self::O3Mini),
3006            "o3-pro" => Ok(Self::O3Pro),
3007            "o4-mini" => Ok(Self::O4Mini),
3008            "o4-mini-deep-research" => Ok(Self::O4MiniDeepResearch),
3009            _ => Err(format!("Unknown openai model: '{s}'")),
3010        }
3011    }
3012}
3013impl OpenRouterModel {
3014    #[allow(clippy::too_many_lines)]
3015    fn model_id(self) -> &'static str {
3016        match self {
3017            Self::Ai21JambaLarge17 => "ai21/jamba-large-1.7",
3018            Self::AionLabsAion20 => "aion-labs/aion-2.0",
3019            Self::AionLabsAion30 => "aion-labs/aion-3.0",
3020            Self::AionLabsAion30Mini => "aion-labs/aion-3.0-mini",
3021            Self::AmazonNova2LiteV1 => "amazon/nova-2-lite-v1",
3022            Self::AmazonNovaLiteV1 => "amazon/nova-lite-v1",
3023            Self::AmazonNovaMicroV1 => "amazon/nova-micro-v1",
3024            Self::AmazonNovaPremierV1 => "amazon/nova-premier-v1",
3025            Self::AmazonNovaProV1 => "amazon/nova-pro-v1",
3026            Self::AnthropicClaude3Haiku => "anthropic/claude-3-haiku",
3027            Self::AnthropicClaudeFable5 => "anthropic/claude-fable-5",
3028            Self::AnthropicClaudeHaiku45 => "anthropic/claude-haiku-4.5",
3029            Self::AnthropicClaudeOpus4 => "anthropic/claude-opus-4",
3030            Self::AnthropicClaudeOpus41 => "anthropic/claude-opus-4.1",
3031            Self::AnthropicClaudeOpus45 => "anthropic/claude-opus-4.5",
3032            Self::AnthropicClaudeOpus46 => "anthropic/claude-opus-4.6",
3033            Self::AnthropicClaudeOpus47 => "anthropic/claude-opus-4.7",
3034            Self::AnthropicClaudeOpus47Fast => "anthropic/claude-opus-4.7-fast",
3035            Self::AnthropicClaudeOpus48 => "anthropic/claude-opus-4.8",
3036            Self::AnthropicClaudeOpus48Fast => "anthropic/claude-opus-4.8-fast",
3037            Self::AnthropicClaudeSonnet4 => "anthropic/claude-sonnet-4",
3038            Self::AnthropicClaudeSonnet45 => "anthropic/claude-sonnet-4.5",
3039            Self::AnthropicClaudeSonnet46 => "anthropic/claude-sonnet-4.6",
3040            Self::AnthropicClaudeSonnet5 => "anthropic/claude-sonnet-5",
3041            Self::ArceeAiTrinityLargeThinking => "arcee-ai/trinity-large-thinking",
3042            Self::ArceeAiVirtuosoLarge => "arcee-ai/virtuoso-large",
3043            Self::BytedanceSeedSeed16 => "bytedance-seed/seed-1.6",
3044            Self::BytedanceSeedSeed16Flash => "bytedance-seed/seed-1.6-flash",
3045            Self::BytedanceSeedSeed20Lite => "bytedance-seed/seed-2.0-lite",
3046            Self::BytedanceSeedSeed20Mini => "bytedance-seed/seed-2.0-mini",
3047            Self::CohereCommandR082024 => "cohere/command-r-08-2024",
3048            Self::CohereCommandRPlus082024 => "cohere/command-r-plus-08-2024",
3049            Self::CohereNorthMiniCodeFree => "cohere/north-mini-code:free",
3050            Self::DeepseekDeepseekChat => "deepseek/deepseek-chat",
3051            Self::DeepseekDeepseekChatV30324 => "deepseek/deepseek-chat-v3-0324",
3052            Self::DeepseekDeepseekChatV31 => "deepseek/deepseek-chat-v3.1",
3053            Self::DeepseekDeepseekR1 => "deepseek/deepseek-r1",
3054            Self::DeepseekDeepseekR10528 => "deepseek/deepseek-r1-0528",
3055            Self::DeepseekDeepseekV31Terminus => "deepseek/deepseek-v3.1-terminus",
3056            Self::DeepseekDeepseekV32 => "deepseek/deepseek-v3.2",
3057            Self::DeepseekDeepseekV32Exp => "deepseek/deepseek-v3.2-exp",
3058            Self::DeepseekDeepseekV4Flash => "deepseek/deepseek-v4-flash",
3059            Self::DeepseekDeepseekV4Pro => "deepseek/deepseek-v4-pro",
3060            Self::GoogleGemini25Flash => "google/gemini-2.5-flash",
3061            Self::GoogleGemini25FlashLite => "google/gemini-2.5-flash-lite",
3062            Self::GoogleGemini25Pro => "google/gemini-2.5-pro",
3063            Self::GoogleGemini25ProPreview => "google/gemini-2.5-pro-preview",
3064            Self::GoogleGemini25ProPreview0506 => "google/gemini-2.5-pro-preview-05-06",
3065            Self::GoogleGemini3FlashPreview => "google/gemini-3-flash-preview",
3066            Self::GoogleGemini3ProImage => "google/gemini-3-pro-image",
3067            Self::GoogleGemini31FlashLite => "google/gemini-3.1-flash-lite",
3068            Self::GoogleGemini31FlashLitePreview => {
3069                "google/gemini-3.1-flash-lite-preview"
3070            }
3071            Self::GoogleGemini31ProPreview => "google/gemini-3.1-pro-preview",
3072            Self::GoogleGemini31ProPreviewCustomtools => {
3073                "google/gemini-3.1-pro-preview-customtools"
3074            }
3075            Self::GoogleGemini35Flash => "google/gemini-3.5-flash",
3076            Self::GoogleGemma312bIt => "google/gemma-3-12b-it",
3077            Self::GoogleGemma327bIt => "google/gemma-3-27b-it",
3078            Self::GoogleGemma426bA4bIt => "google/gemma-4-26b-a4b-it",
3079            Self::GoogleGemma426bA4bItFree => "google/gemma-4-26b-a4b-it:free",
3080            Self::GoogleGemma431bIt => "google/gemma-4-31b-it",
3081            Self::GoogleGemma431bItFree => "google/gemma-4-31b-it:free",
3082            Self::IbmGraniteGranite418b => "ibm-granite/granite-4.1-8b",
3083            Self::InceptionMercury2 => "inception/mercury-2",
3084            Self::InclusionaiLing261t => "inclusionai/ling-2.6-1t",
3085            Self::InclusionaiLing26Flash => "inclusionai/ling-2.6-flash",
3086            Self::InclusionaiRing261t => "inclusionai/ring-2.6-1t",
3087            Self::KwaipilotKatCoderAirV25 => "kwaipilot/kat-coder-air-v2.5",
3088            Self::KwaipilotKatCoderProV2 => "kwaipilot/kat-coder-pro-v2",
3089            Self::KwaipilotKatCoderProV25 => "kwaipilot/kat-coder-pro-v2.5",
3090            Self::MetaLlamaLlama3170bInstruct => "meta-llama/llama-3.1-70b-instruct",
3091            Self::MetaLlamaLlama318bInstruct => "meta-llama/llama-3.1-8b-instruct",
3092            Self::MetaLlamaLlama3370bInstruct => "meta-llama/llama-3.3-70b-instruct",
3093            Self::MetaLlamaLlama4Maverick => "meta-llama/llama-4-maverick",
3094            Self::MetaLlamaLlama4Scout => "meta-llama/llama-4-scout",
3095            Self::MetaMuseSpark11 => "meta/muse-spark-1.1",
3096            Self::MinimaxMinimaxM1 => "minimax/minimax-m1",
3097            Self::MinimaxMinimaxM2 => "minimax/minimax-m2",
3098            Self::MinimaxMinimaxM21 => "minimax/minimax-m2.1",
3099            Self::MinimaxMinimaxM25 => "minimax/minimax-m2.5",
3100            Self::MinimaxMinimaxM27 => "minimax/minimax-m2.7",
3101            Self::MinimaxMinimaxM3 => "minimax/minimax-m3",
3102            Self::MistralaiCodestral2508 => "mistralai/codestral-2508",
3103            Self::MistralaiDevstral2512 => "mistralai/devstral-2512",
3104            Self::MistralaiMinistral14b2512 => "mistralai/ministral-14b-2512",
3105            Self::MistralaiMinistral3b2512 => "mistralai/ministral-3b-2512",
3106            Self::MistralaiMinistral8b2512 => "mistralai/ministral-8b-2512",
3107            Self::MistralaiMistralLarge => "mistralai/mistral-large",
3108            Self::MistralaiMistralLarge2407 => "mistralai/mistral-large-2407",
3109            Self::MistralaiMistralLarge2512 => "mistralai/mistral-large-2512",
3110            Self::MistralaiMistralMedium3 => "mistralai/mistral-medium-3",
3111            Self::MistralaiMistralMedium35 => "mistralai/mistral-medium-3-5",
3112            Self::MistralaiMistralMedium31 => "mistralai/mistral-medium-3.1",
3113            Self::MistralaiMistralNemo => "mistralai/mistral-nemo",
3114            Self::MistralaiMistralSaba => "mistralai/mistral-saba",
3115            Self::MistralaiMistralSmall2603 => "mistralai/mistral-small-2603",
3116            Self::MistralaiMistralSmall3224bInstruct => {
3117                "mistralai/mistral-small-3.2-24b-instruct"
3118            }
3119            Self::MistralaiMixtral8x22bInstruct => "mistralai/mixtral-8x22b-instruct",
3120            Self::MistralaiVoxtralSmall24b2507 => "mistralai/voxtral-small-24b-2507",
3121            Self::MoonshotaiKimiK2 => "moonshotai/kimi-k2",
3122            Self::MoonshotaiKimiK20905 => "moonshotai/kimi-k2-0905",
3123            Self::MoonshotaiKimiK2Thinking => "moonshotai/kimi-k2-thinking",
3124            Self::MoonshotaiKimiK25 => "moonshotai/kimi-k2.5",
3125            Self::MoonshotaiKimiK26 => "moonshotai/kimi-k2.6",
3126            Self::MoonshotaiKimiK27Code => "moonshotai/kimi-k2.7-code",
3127            Self::MoonshotaiKimiK3 => "moonshotai/kimi-k3",
3128            Self::NexAgiNexN2Mini => "nex-agi/nex-n2-mini",
3129            Self::NexAgiNexN2Pro => "nex-agi/nex-n2-pro",
3130            Self::NvidiaNemotron3Nano30bA3b => "nvidia/nemotron-3-nano-30b-a3b",
3131            Self::NvidiaNemotron3Nano30bA3bFree => "nvidia/nemotron-3-nano-30b-a3b:free",
3132            Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree => {
3133                "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free"
3134            }
3135            Self::NvidiaNemotron3Super120bA12b => "nvidia/nemotron-3-super-120b-a12b",
3136            Self::NvidiaNemotron3Super120bA12bFree => {
3137                "nvidia/nemotron-3-super-120b-a12b:free"
3138            }
3139            Self::NvidiaNemotron3Ultra550bA55b => "nvidia/nemotron-3-ultra-550b-a55b",
3140            Self::NvidiaNemotron3Ultra550bA55bFree => {
3141                "nvidia/nemotron-3-ultra-550b-a55b:free"
3142            }
3143            Self::NvidiaNemotronNano12bV2VlFree => "nvidia/nemotron-nano-12b-v2-vl:free",
3144            Self::NvidiaNemotronNano9bV2Free => "nvidia/nemotron-nano-9b-v2:free",
3145            Self::OpenaiGpt35Turbo => "openai/gpt-3.5-turbo",
3146            Self::OpenaiGpt35Turbo0613 => "openai/gpt-3.5-turbo-0613",
3147            Self::OpenaiGpt35Turbo16k => "openai/gpt-3.5-turbo-16k",
3148            Self::OpenaiGpt4 => "openai/gpt-4",
3149            Self::OpenaiGpt4Turbo => "openai/gpt-4-turbo",
3150            Self::OpenaiGpt4TurboPreview => "openai/gpt-4-turbo-preview",
3151            Self::OpenaiGpt41 => "openai/gpt-4.1",
3152            Self::OpenaiGpt41Mini => "openai/gpt-4.1-mini",
3153            Self::OpenaiGpt41Nano => "openai/gpt-4.1-nano",
3154            Self::OpenaiGpt4o => "openai/gpt-4o",
3155            Self::OpenaiGpt4o20240513 => "openai/gpt-4o-2024-05-13",
3156            Self::OpenaiGpt4o20240806 => "openai/gpt-4o-2024-08-06",
3157            Self::OpenaiGpt4o20241120 => "openai/gpt-4o-2024-11-20",
3158            Self::OpenaiGpt4oMini => "openai/gpt-4o-mini",
3159            Self::OpenaiGpt4oMini20240718 => "openai/gpt-4o-mini-2024-07-18",
3160            Self::OpenaiGpt5 => "openai/gpt-5",
3161            Self::OpenaiGpt5Codex => "openai/gpt-5-codex",
3162            Self::OpenaiGpt5Mini => "openai/gpt-5-mini",
3163            Self::OpenaiGpt5Nano => "openai/gpt-5-nano",
3164            Self::OpenaiGpt5Pro => "openai/gpt-5-pro",
3165            Self::OpenaiGpt51 => "openai/gpt-5.1",
3166            Self::OpenaiGpt51Chat => "openai/gpt-5.1-chat",
3167            Self::OpenaiGpt51Codex => "openai/gpt-5.1-codex",
3168            Self::OpenaiGpt51CodexMax => "openai/gpt-5.1-codex-max",
3169            Self::OpenaiGpt51CodexMini => "openai/gpt-5.1-codex-mini",
3170            Self::OpenaiGpt52 => "openai/gpt-5.2",
3171            Self::OpenaiGpt52Chat => "openai/gpt-5.2-chat",
3172            Self::OpenaiGpt52Codex => "openai/gpt-5.2-codex",
3173            Self::OpenaiGpt52Pro => "openai/gpt-5.2-pro",
3174            Self::OpenaiGpt53Chat => "openai/gpt-5.3-chat",
3175            Self::OpenaiGpt53Codex => "openai/gpt-5.3-codex",
3176            Self::OpenaiGpt54 => "openai/gpt-5.4",
3177            Self::OpenaiGpt54Mini => "openai/gpt-5.4-mini",
3178            Self::OpenaiGpt54Nano => "openai/gpt-5.4-nano",
3179            Self::OpenaiGpt54Pro => "openai/gpt-5.4-pro",
3180            Self::OpenaiGpt55 => "openai/gpt-5.5",
3181            Self::OpenaiGpt55Pro => "openai/gpt-5.5-pro",
3182            Self::OpenaiGpt56Luna => "openai/gpt-5.6-luna",
3183            Self::OpenaiGpt56LunaPro => "openai/gpt-5.6-luna-pro",
3184            Self::OpenaiGpt56Sol => "openai/gpt-5.6-sol",
3185            Self::OpenaiGpt56SolPro => "openai/gpt-5.6-sol-pro",
3186            Self::OpenaiGpt56Terra => "openai/gpt-5.6-terra",
3187            Self::OpenaiGpt56TerraPro => "openai/gpt-5.6-terra-pro",
3188            Self::OpenaiGptAudio => "openai/gpt-audio",
3189            Self::OpenaiGptAudioMini => "openai/gpt-audio-mini",
3190            Self::OpenaiGptOss120b => "openai/gpt-oss-120b",
3191            Self::OpenaiGptOss20b => "openai/gpt-oss-20b",
3192            Self::OpenaiGptOss20bFree => "openai/gpt-oss-20b:free",
3193            Self::OpenaiGptOssSafeguard20b => "openai/gpt-oss-safeguard-20b",
3194            Self::OpenaiO1 => "openai/o1",
3195            Self::OpenaiO3 => "openai/o3",
3196            Self::OpenaiO3DeepResearch => "openai/o3-deep-research",
3197            Self::OpenaiO3Mini => "openai/o3-mini",
3198            Self::OpenaiO3MiniHigh => "openai/o3-mini-high",
3199            Self::OpenaiO3Pro => "openai/o3-pro",
3200            Self::OpenaiO4Mini => "openai/o4-mini",
3201            Self::OpenaiO4MiniDeepResearch => "openai/o4-mini-deep-research",
3202            Self::OpenaiO4MiniHigh => "openai/o4-mini-high",
3203            Self::OpenrouterAuto => "openrouter/auto",
3204            Self::OpenrouterFree => "openrouter/free",
3205            Self::PoolsideLagunaM1 => "poolside/laguna-m.1",
3206            Self::PoolsideLagunaM1Free => "poolside/laguna-m.1:free",
3207            Self::PoolsideLagunaXs21 => "poolside/laguna-xs-2.1",
3208            Self::PoolsideLagunaXs21Free => "poolside/laguna-xs-2.1:free",
3209            Self::QwenQwen2572bInstruct => "qwen/qwen-2.5-72b-instruct",
3210            Self::QwenQwen257bInstruct => "qwen/qwen-2.5-7b-instruct",
3211            Self::QwenQwenPlus => "qwen/qwen-plus",
3212            Self::QwenQwenPlus20250728 => "qwen/qwen-plus-2025-07-28",
3213            Self::QwenQwenPlus20250728Thinking => "qwen/qwen-plus-2025-07-28:thinking",
3214            Self::QwenQwen314b => "qwen/qwen3-14b",
3215            Self::QwenQwen3235bA22b => "qwen/qwen3-235b-a22b",
3216            Self::QwenQwen3235bA22b2507 => "qwen/qwen3-235b-a22b-2507",
3217            Self::QwenQwen3235bA22bThinking2507 => "qwen/qwen3-235b-a22b-thinking-2507",
3218            Self::QwenQwen330bA3b => "qwen/qwen3-30b-a3b",
3219            Self::QwenQwen330bA3bInstruct2507 => "qwen/qwen3-30b-a3b-instruct-2507",
3220            Self::QwenQwen330bA3bThinking2507 => "qwen/qwen3-30b-a3b-thinking-2507",
3221            Self::QwenQwen332b => "qwen/qwen3-32b",
3222            Self::QwenQwen38b => "qwen/qwen3-8b",
3223            Self::QwenQwen3Coder => "qwen/qwen3-coder",
3224            Self::QwenQwen3Coder30bA3bInstruct => "qwen/qwen3-coder-30b-a3b-instruct",
3225            Self::QwenQwen3CoderFlash => "qwen/qwen3-coder-flash",
3226            Self::QwenQwen3CoderNext => "qwen/qwen3-coder-next",
3227            Self::QwenQwen3CoderPlus => "qwen/qwen3-coder-plus",
3228            Self::QwenQwen3Max => "qwen/qwen3-max",
3229            Self::QwenQwen3MaxThinking => "qwen/qwen3-max-thinking",
3230            Self::QwenQwen3Next80bA3bInstruct => "qwen/qwen3-next-80b-a3b-instruct",
3231            Self::QwenQwen3Next80bA3bThinking => "qwen/qwen3-next-80b-a3b-thinking",
3232            Self::QwenQwen3Vl235bA22bInstruct => "qwen/qwen3-vl-235b-a22b-instruct",
3233            Self::QwenQwen3Vl235bA22bThinking => "qwen/qwen3-vl-235b-a22b-thinking",
3234            Self::QwenQwen3Vl30bA3bInstruct => "qwen/qwen3-vl-30b-a3b-instruct",
3235            Self::QwenQwen3Vl30bA3bThinking => "qwen/qwen3-vl-30b-a3b-thinking",
3236            Self::QwenQwen3Vl32bInstruct => "qwen/qwen3-vl-32b-instruct",
3237            Self::QwenQwen3Vl8bInstruct => "qwen/qwen3-vl-8b-instruct",
3238            Self::QwenQwen3Vl8bThinking => "qwen/qwen3-vl-8b-thinking",
3239            Self::QwenQwen35122bA10b => "qwen/qwen3.5-122b-a10b",
3240            Self::QwenQwen3527b => "qwen/qwen3.5-27b",
3241            Self::QwenQwen3535bA3b => "qwen/qwen3.5-35b-a3b",
3242            Self::QwenQwen35397bA17b => "qwen/qwen3.5-397b-a17b",
3243            Self::QwenQwen359b => "qwen/qwen3.5-9b",
3244            Self::QwenQwen35Flash0223 => "qwen/qwen3.5-flash-02-23",
3245            Self::QwenQwen35Plus0215 => "qwen/qwen3.5-plus-02-15",
3246            Self::QwenQwen35Plus20260420 => "qwen/qwen3.5-plus-20260420",
3247            Self::QwenQwen3627b => "qwen/qwen3.6-27b",
3248            Self::QwenQwen3635bA3b => "qwen/qwen3.6-35b-a3b",
3249            Self::QwenQwen36Flash => "qwen/qwen3.6-flash",
3250            Self::QwenQwen36MaxPreview => "qwen/qwen3.6-max-preview",
3251            Self::QwenQwen36Plus => "qwen/qwen3.6-plus",
3252            Self::QwenQwen37Max => "qwen/qwen3.7-max",
3253            Self::QwenQwen37Plus => "qwen/qwen3.7-plus",
3254            Self::RekaaiRekaEdge => "rekaai/reka-edge",
3255            Self::RelaceRelaceSearch => "relace/relace-search",
3256            Self::SakanaFuguUltra => "sakana/fugu-ultra",
3257            Self::Sao10kL31Euryale70b => "sao10k/l3.1-euryale-70b",
3258            Self::StepfunStep35Flash => "stepfun/step-3.5-flash",
3259            Self::StepfunStep37Flash => "stepfun/step-3.7-flash",
3260            Self::TencentHy3 => "tencent/hy3",
3261            Self::TencentHy3Preview => "tencent/hy3-preview",
3262            Self::TencentHy3Free => "tencent/hy3:free",
3263            Self::ThedrummerUnslopnemo12b => "thedrummer/unslopnemo-12b",
3264            Self::ThinkingmachinesInkling => "thinkingmachines/inkling",
3265            Self::UpstageSolarPro3 => "upstage/solar-pro-3",
3266            Self::XAiGrok420 => "x-ai/grok-4.20",
3267            Self::XAiGrok43 => "x-ai/grok-4.3",
3268            Self::XAiGrok45 => "x-ai/grok-4.5",
3269            Self::XAiGrokBuild01 => "x-ai/grok-build-0.1",
3270            Self::XiaomiMimoV25 => "xiaomi/mimo-v2.5",
3271            Self::XiaomiMimoV25Pro => "xiaomi/mimo-v2.5-pro",
3272            Self::ZAiGlm45 => "z-ai/glm-4.5",
3273            Self::ZAiGlm45Air => "z-ai/glm-4.5-air",
3274            Self::ZAiGlm45v => "z-ai/glm-4.5v",
3275            Self::ZAiGlm46 => "z-ai/glm-4.6",
3276            Self::ZAiGlm46v => "z-ai/glm-4.6v",
3277            Self::ZAiGlm47 => "z-ai/glm-4.7",
3278            Self::ZAiGlm47Flash => "z-ai/glm-4.7-flash",
3279            Self::ZAiGlm5 => "z-ai/glm-5",
3280            Self::ZAiGlm5Turbo => "z-ai/glm-5-turbo",
3281            Self::ZAiGlm51 => "z-ai/glm-5.1",
3282            Self::ZAiGlm52 => "z-ai/glm-5.2",
3283            Self::ZAiGlm5vTurbo => "z-ai/glm-5v-turbo",
3284        }
3285    }
3286    #[allow(clippy::too_many_lines)]
3287    fn display_name(self) -> &'static str {
3288        match self {
3289            Self::AionLabsAion20 => "Aion-2.0",
3290            Self::AionLabsAion30 => "Aion-3.0",
3291            Self::AionLabsAion30Mini => "Aion-3.0-Mini",
3292            Self::OpenrouterAuto => "Auto Router",
3293            Self::AnthropicClaude3Haiku => "Claude 3 Haiku",
3294            Self::AnthropicClaudeFable5 => "Claude Fable 5",
3295            Self::AnthropicClaudeHaiku45 => "Claude Haiku 4.5 (latest)",
3296            Self::AnthropicClaudeOpus4 => "Claude Opus 4",
3297            Self::AnthropicClaudeOpus41 => "Claude Opus 4.1 (latest)",
3298            Self::AnthropicClaudeOpus45 => "Claude Opus 4.5 (latest)",
3299            Self::AnthropicClaudeOpus46 => "Claude Opus 4.6",
3300            Self::AnthropicClaudeOpus47 => "Claude Opus 4.7",
3301            Self::AnthropicClaudeOpus47Fast => "Claude Opus 4.7 (Fast)",
3302            Self::AnthropicClaudeOpus48 => "Claude Opus 4.8",
3303            Self::AnthropicClaudeOpus48Fast => "Claude Opus 4.8 (Fast)",
3304            Self::AnthropicClaudeSonnet4 => "Claude Sonnet 4",
3305            Self::AnthropicClaudeSonnet45 => "Claude Sonnet 4.5 (latest)",
3306            Self::AnthropicClaudeSonnet46 => "Claude Sonnet 4.6",
3307            Self::AnthropicClaudeSonnet5 => "Claude Sonnet 5",
3308            Self::MistralaiCodestral2508 => "Codestral 2508",
3309            Self::CohereCommandR082024 => "Command R",
3310            Self::CohereCommandRPlus082024 => "Command R+",
3311            Self::DeepseekDeepseekChat => "DeepSeek Chat",
3312            Self::DeepseekDeepseekChatV30324 => "DeepSeek V3 0324",
3313            Self::DeepseekDeepseekChatV31 => "DeepSeek V3.1",
3314            Self::DeepseekDeepseekV31Terminus => "DeepSeek V3.1 Terminus",
3315            Self::DeepseekDeepseekV32 => "DeepSeek V3.2",
3316            Self::DeepseekDeepseekV32Exp => "DeepSeek V3.2 Exp",
3317            Self::DeepseekDeepseekV4Flash => "DeepSeek V4 Flash",
3318            Self::DeepseekDeepseekV4Pro => "DeepSeek V4 Pro",
3319            Self::DeepseekDeepseekR1 => "DeepSeek-R1",
3320            Self::MistralaiDevstral2512 => "Devstral 2",
3321            Self::OpenrouterFree => "Free Models Router",
3322            Self::SakanaFuguUltra => "Fugu Ultra",
3323            Self::ZAiGlm45 => "GLM-4.5",
3324            Self::ZAiGlm45Air => "GLM-4.5-Air",
3325            Self::ZAiGlm45v => "GLM-4.5V",
3326            Self::ZAiGlm46 => "GLM-4.6",
3327            Self::ZAiGlm46v => "GLM-4.6V",
3328            Self::ZAiGlm47 => "GLM-4.7",
3329            Self::ZAiGlm47Flash => "GLM-4.7-Flash",
3330            Self::ZAiGlm5 => "GLM-5",
3331            Self::ZAiGlm5Turbo => "GLM-5-Turbo",
3332            Self::ZAiGlm51 => "GLM-5.1",
3333            Self::ZAiGlm52 => "GLM-5.2",
3334            Self::ZAiGlm5vTurbo => "GLM-5V-Turbo",
3335            Self::OpenaiGptAudio => "GPT Audio",
3336            Self::OpenaiGptAudioMini => "GPT Audio Mini",
3337            Self::OpenaiGptOss120b => "GPT OSS 120B",
3338            Self::OpenaiGptOss20b => "GPT OSS 20B",
3339            Self::OpenaiGpt35Turbo0613 => "GPT-3.5 Turbo (older v0613)",
3340            Self::OpenaiGpt35Turbo16k => "GPT-3.5 Turbo 16k",
3341            Self::OpenaiGpt35Turbo => "GPT-3.5-turbo",
3342            Self::OpenaiGpt4 => "GPT-4",
3343            Self::OpenaiGpt4Turbo => "GPT-4 Turbo",
3344            Self::OpenaiGpt4TurboPreview => "GPT-4 Turbo Preview",
3345            Self::OpenaiGpt41 => "GPT-4.1",
3346            Self::OpenaiGpt41Mini => "GPT-4.1 mini",
3347            Self::OpenaiGpt41Nano => "GPT-4.1 nano",
3348            Self::OpenaiGpt4o => "GPT-4o",
3349            Self::OpenaiGpt4o20240513 => "GPT-4o (2024-05-13)",
3350            Self::OpenaiGpt4o20240806 => "GPT-4o (2024-08-06)",
3351            Self::OpenaiGpt4o20241120 => "GPT-4o (2024-11-20)",
3352            Self::OpenaiGpt4oMini => "GPT-4o mini",
3353            Self::OpenaiGpt4oMini20240718 => "GPT-4o-mini (2024-07-18)",
3354            Self::OpenaiGpt5 => "GPT-5",
3355            Self::OpenaiGpt5Mini => "GPT-5 Mini",
3356            Self::OpenaiGpt5Nano => "GPT-5 Nano",
3357            Self::OpenaiGpt5Pro => "GPT-5 Pro",
3358            Self::OpenaiGpt5Codex => "GPT-5-Codex",
3359            Self::OpenaiGpt51 => "GPT-5.1",
3360            Self::OpenaiGpt51Chat => "GPT-5.1 Chat",
3361            Self::OpenaiGpt51Codex => "GPT-5.1 Codex",
3362            Self::OpenaiGpt51CodexMax => "GPT-5.1 Codex Max",
3363            Self::OpenaiGpt51CodexMini => "GPT-5.1 Codex mini",
3364            Self::OpenaiGpt52 => "GPT-5.2",
3365            Self::OpenaiGpt52Chat => "GPT-5.2 Chat",
3366            Self::OpenaiGpt52Codex => "GPT-5.2 Codex",
3367            Self::OpenaiGpt52Pro => "GPT-5.2 Pro",
3368            Self::OpenaiGpt53Chat => "GPT-5.3 Chat",
3369            Self::OpenaiGpt53Codex => "GPT-5.3 Codex",
3370            Self::OpenaiGpt54 => "GPT-5.4",
3371            Self::OpenaiGpt54Pro => "GPT-5.4 Pro",
3372            Self::OpenaiGpt54Mini => "GPT-5.4 mini",
3373            Self::OpenaiGpt54Nano => "GPT-5.4 nano",
3374            Self::OpenaiGpt55 => "GPT-5.5",
3375            Self::OpenaiGpt55Pro => "GPT-5.5 Pro",
3376            Self::OpenaiGpt56Luna => "GPT-5.6 Luna",
3377            Self::OpenaiGpt56LunaPro => "GPT-5.6 Luna Pro",
3378            Self::OpenaiGpt56Sol => "GPT-5.6 Sol",
3379            Self::OpenaiGpt56SolPro => "GPT-5.6 Sol Pro",
3380            Self::OpenaiGpt56Terra => "GPT-5.6 Terra",
3381            Self::OpenaiGpt56TerraPro => "GPT-5.6 Terra Pro",
3382            Self::GoogleGemini25Flash => "Gemini 2.5 Flash",
3383            Self::GoogleGemini25FlashLite => "Gemini 2.5 Flash-Lite",
3384            Self::GoogleGemini25Pro => "Gemini 2.5 Pro",
3385            Self::GoogleGemini25ProPreview0506 => "Gemini 2.5 Pro Preview 05-06",
3386            Self::GoogleGemini25ProPreview => "Gemini 2.5 Pro Preview 06-05",
3387            Self::GoogleGemini3FlashPreview => "Gemini 3 Flash Preview",
3388            Self::GoogleGemini31FlashLite => "Gemini 3.1 Flash Lite",
3389            Self::GoogleGemini31FlashLitePreview => "Gemini 3.1 Flash Lite Preview",
3390            Self::GoogleGemini31ProPreview => "Gemini 3.1 Pro Preview",
3391            Self::GoogleGemini31ProPreviewCustomtools => {
3392                "Gemini 3.1 Pro Preview Custom Tools"
3393            }
3394            Self::GoogleGemini35Flash => "Gemini 3.5 Flash",
3395            Self::GoogleGemma312bIt => "Gemma 3 12B",
3396            Self::GoogleGemma327bIt => "Gemma 3 27B",
3397            Self::GoogleGemma426bA4bItFree => "Gemma 4 26B A4B  (free)",
3398            Self::GoogleGemma426bA4bIt => "Gemma 4 26B A4B IT",
3399            Self::GoogleGemma431bItFree => "Gemma 4 31B (free)",
3400            Self::GoogleGemma431bIt => "Gemma 4 31B IT",
3401            Self::IbmGraniteGranite418b => "Granite 4.1 8B",
3402            Self::XAiGrok420 => "Grok 4.20",
3403            Self::XAiGrok43 => "Grok 4.3",
3404            Self::XAiGrok45 => "Grok 4.5",
3405            Self::XAiGrokBuild01 => "Grok Build 0.1",
3406            Self::TencentHy3 => "Hy3",
3407            Self::TencentHy3Free => "Hy3 (free)",
3408            Self::TencentHy3Preview => "Hy3 preview",
3409            Self::ThinkingmachinesInkling => "Inkling",
3410            Self::Ai21JambaLarge17 => "Jamba Large 1.7",
3411            Self::KwaipilotKatCoderAirV25 => "KAT-Coder-Air V2.5",
3412            Self::KwaipilotKatCoderProV2 => "KAT-Coder-Pro V2",
3413            Self::KwaipilotKatCoderProV25 => "KAT-Coder-Pro V2.5",
3414            Self::MoonshotaiKimiK2 => "Kimi K2 0711",
3415            Self::MoonshotaiKimiK20905 => "Kimi K2 0905",
3416            Self::MoonshotaiKimiK2Thinking => "Kimi K2 Thinking",
3417            Self::MoonshotaiKimiK25 => "Kimi K2.5",
3418            Self::MoonshotaiKimiK26 => "Kimi K2.6",
3419            Self::MoonshotaiKimiK27Code => "Kimi K2.7 Code",
3420            Self::MoonshotaiKimiK3 => "Kimi K3",
3421            Self::PoolsideLagunaM1 => "Laguna M.1",
3422            Self::PoolsideLagunaM1Free => "Laguna M.1 (free)",
3423            Self::PoolsideLagunaXs21 => "Laguna XS 2.1",
3424            Self::PoolsideLagunaXs21Free => "Laguna XS 2.1 (free)",
3425            Self::InclusionaiLing261t => "Ling-2.6-1T",
3426            Self::InclusionaiLing26Flash => "Ling-2.6-flash",
3427            Self::MetaLlamaLlama3170bInstruct => "Llama 3.1 70B Instruct",
3428            Self::MetaLlamaLlama318bInstruct => "Llama 3.1 8B Instruct",
3429            Self::Sao10kL31Euryale70b => "Llama 3.1 Euryale 70B v2.2",
3430            Self::MetaLlamaLlama4Maverick => "Llama 4 Maverick",
3431            Self::MetaLlamaLlama4Scout => "Llama 4 Scout",
3432            Self::MetaLlamaLlama3370bInstruct => "Llama-3.3-70B-Instruct",
3433            Self::InceptionMercury2 => "Mercury 2",
3434            Self::XiaomiMimoV25 => "MiMo-V2.5",
3435            Self::XiaomiMimoV25Pro => "MiMo-V2.5-Pro",
3436            Self::MinimaxMinimaxM1 => "MiniMax M1",
3437            Self::MinimaxMinimaxM2 => "MiniMax-M2",
3438            Self::MinimaxMinimaxM21 => "MiniMax-M2.1",
3439            Self::MinimaxMinimaxM25 => "MiniMax-M2.5",
3440            Self::MinimaxMinimaxM27 => "MiniMax-M2.7",
3441            Self::MinimaxMinimaxM3 => "MiniMax-M3",
3442            Self::MistralaiMinistral14b2512 => "Ministral 3 14B 2512",
3443            Self::MistralaiMinistral3b2512 => "Ministral 3 3B 2512",
3444            Self::MistralaiMinistral8b2512 => "Ministral 3 8B 2512",
3445            Self::MistralaiMistralLarge => "Mistral Large",
3446            Self::MistralaiMistralLarge2407 => "Mistral Large 2407",
3447            Self::MistralaiMistralLarge2512 => "Mistral Large 3",
3448            Self::MistralaiMistralMedium3 => "Mistral Medium 3",
3449            Self::MistralaiMistralMedium31 => "Mistral Medium 3.1",
3450            Self::MistralaiMistralMedium35 => "Mistral Medium 3.5",
3451            Self::MistralaiMistralNemo => "Mistral Nemo",
3452            Self::MistralaiMistralSmall3224bInstruct => "Mistral Small 3.2 24B",
3453            Self::MistralaiMistralSmall2603 => "Mistral Small 4",
3454            Self::MistralaiMixtral8x22bInstruct => "Mixtral 8x22B Instruct",
3455            Self::MetaMuseSpark11 => "Muse Spark 1.1",
3456            Self::GoogleGemini3ProImage => "Nano Banana Pro",
3457            Self::NvidiaNemotron3Nano30bA3b => "Nemotron 3 Nano 30B A3B",
3458            Self::NvidiaNemotron3Nano30bA3bFree => "Nemotron 3 Nano 30B A3B (free)",
3459            Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree => {
3460                "Nemotron 3 Nano Omni (free)"
3461            }
3462            Self::NvidiaNemotron3Super120bA12bFree => "Nemotron 3 Super (free)",
3463            Self::NvidiaNemotron3Super120bA12b => "Nemotron 3 Super 120B A12B",
3464            Self::NvidiaNemotron3Ultra550bA55bFree => "Nemotron 3 Ultra (free)",
3465            Self::NvidiaNemotron3Ultra550bA55b => "Nemotron 3 Ultra 550B A55B",
3466            Self::NvidiaNemotronNano12bV2VlFree => "Nemotron Nano 12B 2 VL (free)",
3467            Self::NvidiaNemotronNano9bV2Free => "Nemotron Nano 9B V2 (free)",
3468            Self::NexAgiNexN2Mini => "Nex-N2-Mini",
3469            Self::NexAgiNexN2Pro => "Nex-N2-Pro",
3470            Self::CohereNorthMiniCodeFree => "North Mini Code (free)",
3471            Self::AmazonNova2LiteV1 => "Nova 2 Lite",
3472            Self::AmazonNovaLiteV1 => "Nova Lite 1.0",
3473            Self::AmazonNovaMicroV1 => "Nova Micro 1.0",
3474            Self::AmazonNovaPremierV1 => "Nova Premier 1.0",
3475            Self::AmazonNovaProV1 => "Nova Pro 1.0",
3476            Self::QwenQwenPlus => "Qwen Plus",
3477            Self::QwenQwenPlus20250728 => "Qwen Plus 0728",
3478            Self::QwenQwenPlus20250728Thinking => "Qwen Plus 0728 (thinking)",
3479            Self::QwenQwen2572bInstruct => "Qwen2.5 72B Instruct",
3480            Self::QwenQwen257bInstruct => "Qwen2.5 7B Instruct",
3481            Self::QwenQwen314b => "Qwen3 14B",
3482            Self::QwenQwen3235bA22b2507 => "Qwen3 235B A22B Instruct 2507",
3483            Self::QwenQwen3235bA22bThinking2507 => "Qwen3 235B A22B Thinking 2507",
3484            Self::QwenQwen3235bA22b => "Qwen3 235B-A22B",
3485            Self::QwenQwen330bA3b => "Qwen3 30B A3B",
3486            Self::QwenQwen330bA3bInstruct2507 => "Qwen3 30B A3B Instruct 2507",
3487            Self::QwenQwen330bA3bThinking2507 => "Qwen3 30B A3B Thinking 2507",
3488            Self::QwenQwen332b => "Qwen3 32B",
3489            Self::QwenQwen38b => "Qwen3 8B",
3490            Self::QwenQwen3Coder => "Qwen3 Coder 480B A35B",
3491            Self::QwenQwen3CoderFlash => "Qwen3 Coder Flash",
3492            Self::QwenQwen3CoderNext => "Qwen3 Coder Next",
3493            Self::QwenQwen3CoderPlus => "Qwen3 Coder Plus",
3494            Self::QwenQwen3Max => "Qwen3 Max",
3495            Self::QwenQwen3MaxThinking => "Qwen3 Max Thinking",
3496            Self::QwenQwen3Vl235bA22bInstruct => "Qwen3 VL 235B A22B Instruct",
3497            Self::QwenQwen3Vl235bA22bThinking => "Qwen3 VL 235B A22B Thinking",
3498            Self::QwenQwen3Vl30bA3bInstruct => "Qwen3 VL 30B A3B Instruct",
3499            Self::QwenQwen3Vl30bA3bThinking => "Qwen3 VL 30B A3B Thinking",
3500            Self::QwenQwen3Vl32bInstruct => "Qwen3 VL 32B Instruct",
3501            Self::QwenQwen3Vl8bInstruct => "Qwen3 VL 8B Instruct",
3502            Self::QwenQwen3Vl8bThinking => "Qwen3 VL 8B Thinking",
3503            Self::QwenQwen3Coder30bA3bInstruct => "Qwen3-Coder 30B-A3B Instruct",
3504            Self::QwenQwen3Next80bA3bThinking => "Qwen3-Next 80B-A3B (Thinking)",
3505            Self::QwenQwen3Next80bA3bInstruct => "Qwen3-Next 80B-A3B Instruct",
3506            Self::QwenQwen35122bA10b => "Qwen3.5 122B-A10B",
3507            Self::QwenQwen3527b => "Qwen3.5 27B",
3508            Self::QwenQwen3535bA3b => "Qwen3.5 35B-A3B",
3509            Self::QwenQwen35397bA17b => "Qwen3.5 397B-A17B",
3510            Self::QwenQwen359b => "Qwen3.5 9B",
3511            Self::QwenQwen35Plus0215 => "Qwen3.5 Plus 2026-02-15",
3512            Self::QwenQwen35Plus20260420 => "Qwen3.5 Plus 2026-04-20",
3513            Self::QwenQwen35Flash0223 => "Qwen3.5-Flash",
3514            Self::QwenQwen3627b => "Qwen3.6 27B",
3515            Self::QwenQwen3635bA3b => "Qwen3.6 35B-A3B",
3516            Self::QwenQwen36Flash => "Qwen3.6 Flash",
3517            Self::QwenQwen36MaxPreview => "Qwen3.6 Max Preview",
3518            Self::QwenQwen36Plus => "Qwen3.6 Plus",
3519            Self::QwenQwen37Max => "Qwen3.7 Max",
3520            Self::QwenQwen37Plus => "Qwen3.7 Plus",
3521            Self::DeepseekDeepseekR10528 => "R1 0528",
3522            Self::RekaaiRekaEdge => "Reka Edge",
3523            Self::RelaceRelaceSearch => "Relace Search",
3524            Self::InclusionaiRing261t => "Ring-2.6-1T",
3525            Self::MistralaiMistralSaba => "Saba",
3526            Self::BytedanceSeedSeed16 => "Seed 1.6",
3527            Self::BytedanceSeedSeed16Flash => "Seed 1.6 Flash",
3528            Self::BytedanceSeedSeed20Lite => "Seed-2.0-Lite",
3529            Self::BytedanceSeedSeed20Mini => "Seed-2.0-Mini",
3530            Self::UpstageSolarPro3 => "Solar Pro 3",
3531            Self::StepfunStep35Flash => "Step 3.5 Flash",
3532            Self::StepfunStep37Flash => "Step 3.7 Flash",
3533            Self::ArceeAiTrinityLargeThinking => "Trinity Large Thinking",
3534            Self::ThedrummerUnslopnemo12b => "UnslopNemo 12B",
3535            Self::ArceeAiVirtuosoLarge => "Virtuoso Large",
3536            Self::MistralaiVoxtralSmall24b2507 => "Voxtral Small 24B 2507",
3537            Self::OpenaiGptOss20bFree => "gpt-oss-20b (free)",
3538            Self::OpenaiGptOssSafeguard20b => "gpt-oss-safeguard-20b",
3539            Self::OpenaiO1 => "o1",
3540            Self::OpenaiO3 => "o3",
3541            Self::OpenaiO3MiniHigh => "o3 Mini High",
3542            Self::OpenaiO3DeepResearch => "o3-deep-research",
3543            Self::OpenaiO3Mini => "o3-mini",
3544            Self::OpenaiO3Pro => "o3-pro",
3545            Self::OpenaiO4MiniHigh => "o4 Mini High",
3546            Self::OpenaiO4Mini => "o4-mini",
3547            Self::OpenaiO4MiniDeepResearch => "o4-mini-deep-research",
3548        }
3549    }
3550    #[allow(clippy::too_many_lines)]
3551    fn context_window(self) -> u32 {
3552        match self {
3553            Self::OpenaiGpt35Turbo0613 => 4095,
3554            Self::OpenaiGpt4 => 8191,
3555            Self::RekaaiRekaEdge => 16_384,
3556            Self::OpenaiGpt35Turbo | Self::OpenaiGpt35Turbo16k => 16_385,
3557            Self::MistralaiVoxtralSmall24b2507 => 32_000,
3558            Self::MistralaiMistralSaba | Self::ThedrummerUnslopnemo12b => 32_768,
3559            Self::GoogleGemini3ProImage
3560            | Self::MistralaiMixtral8x22bInstruct
3561            | Self::ZAiGlm45v => 65_536,
3562            Self::AmazonNovaMicroV1
3563            | Self::CohereCommandR082024
3564            | Self::CohereCommandRPlus082024
3565            | Self::InceptionMercury2
3566            | Self::MistralaiMistralLarge
3567            | Self::NvidiaNemotronNano12bV2VlFree
3568            | Self::NvidiaNemotronNano9bV2Free
3569            | Self::OpenaiGpt4Turbo
3570            | Self::OpenaiGpt4TurboPreview
3571            | Self::OpenaiGpt4o
3572            | Self::OpenaiGpt4o20240513
3573            | Self::OpenaiGpt4o20240806
3574            | Self::OpenaiGpt4o20241120
3575            | Self::OpenaiGpt4oMini
3576            | Self::OpenaiGpt4oMini20240718
3577            | Self::OpenaiGpt51Chat
3578            | Self::OpenaiGpt52Chat
3579            | Self::OpenaiGpt53Chat
3580            | Self::OpenaiGptAudio
3581            | Self::OpenaiGptAudioMini
3582            | Self::UpstageSolarPro3 => 128_000,
3583            Self::AionLabsAion20
3584            | Self::AionLabsAion30
3585            | Self::AionLabsAion30Mini
3586            | Self::ArceeAiVirtuosoLarge
3587            | Self::DeepseekDeepseekChat
3588            | Self::DeepseekDeepseekV31Terminus
3589            | Self::GoogleGemma312bIt
3590            | Self::GoogleGemma327bIt
3591            | Self::IbmGraniteGranite418b
3592            | Self::MetaLlamaLlama3170bInstruct
3593            | Self::MetaLlamaLlama318bInstruct
3594            | Self::MetaLlamaLlama3370bInstruct
3595            | Self::MistralaiMinistral3b2512
3596            | Self::MistralaiMistralLarge2407
3597            | Self::MistralaiMistralMedium3
3598            | Self::MistralaiMistralMedium31
3599            | Self::MistralaiMistralNemo
3600            | Self::MistralaiMistralSmall3224bInstruct
3601            | Self::MoonshotaiKimiK2
3602            | Self::OpenaiGptOss120b
3603            | Self::OpenaiGptOss20b
3604            | Self::OpenaiGptOss20bFree
3605            | Self::OpenaiGptOssSafeguard20b
3606            | Self::QwenQwen2572bInstruct
3607            | Self::QwenQwen257bInstruct
3608            | Self::QwenQwen3235bA22b
3609            | Self::QwenQwen330bA3b
3610            | Self::QwenQwen330bA3bThinking2507
3611            | Self::QwenQwen332b
3612            | Self::QwenQwen38b
3613            | Self::QwenQwen3Vl235bA22bInstruct
3614            | Self::QwenQwen3Vl235bA22bThinking
3615            | Self::QwenQwen3Vl30bA3bThinking
3616            | Self::Sao10kL31Euryale70b
3617            | Self::ZAiGlm45
3618            | Self::ZAiGlm45Air
3619            | Self::ZAiGlm46v => 131_072,
3620            Self::QwenQwen314b => 131_702,
3621            Self::QwenQwen3Coder30bA3bInstruct => 160_000,
3622            Self::DeepseekDeepseekChatV30324
3623            | Self::DeepseekDeepseekChatV31
3624            | Self::DeepseekDeepseekR1
3625            | Self::DeepseekDeepseekR10528
3626            | Self::DeepseekDeepseekV32
3627            | Self::DeepseekDeepseekV32Exp => 163_840,
3628            Self::AnthropicClaude3Haiku
3629            | Self::AnthropicClaudeHaiku45
3630            | Self::AnthropicClaudeOpus4
3631            | Self::AnthropicClaudeOpus41
3632            | Self::AnthropicClaudeOpus45
3633            | Self::OpenaiO1
3634            | Self::OpenaiO3
3635            | Self::OpenaiO3DeepResearch
3636            | Self::OpenaiO3Mini
3637            | Self::OpenaiO3MiniHigh
3638            | Self::OpenaiO3Pro
3639            | Self::OpenaiO4Mini
3640            | Self::OpenaiO4MiniDeepResearch
3641            | Self::OpenaiO4MiniHigh
3642            | Self::OpenrouterFree
3643            | Self::ZAiGlm47Flash => 200_000,
3644            Self::ZAiGlm46
3645            | Self::ZAiGlm47
3646            | Self::ZAiGlm5Turbo
3647            | Self::ZAiGlm51
3648            | Self::ZAiGlm5vTurbo => 202_752,
3649            Self::MinimaxMinimaxM2
3650            | Self::MinimaxMinimaxM21
3651            | Self::MinimaxMinimaxM25
3652            | Self::MinimaxMinimaxM27
3653            | Self::ZAiGlm5 => 204_800,
3654            Self::Ai21JambaLarge17
3655            | Self::CohereNorthMiniCodeFree
3656            | Self::KwaipilotKatCoderAirV25
3657            | Self::KwaipilotKatCoderProV2
3658            | Self::KwaipilotKatCoderProV25
3659            | Self::MistralaiCodestral2508
3660            | Self::NvidiaNemotron3Nano30bA3bFree
3661            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
3662            | Self::QwenQwen3Vl8bInstruct
3663            | Self::QwenQwen3Vl8bThinking
3664            | Self::RelaceRelaceSearch
3665            | Self::StepfunStep37Flash
3666            | Self::XAiGrokBuild01 => 256_000,
3667            Self::ArceeAiTrinityLargeThinking
3668            | Self::BytedanceSeedSeed16
3669            | Self::BytedanceSeedSeed16Flash
3670            | Self::BytedanceSeedSeed20Lite
3671            | Self::BytedanceSeedSeed20Mini
3672            | Self::GoogleGemma426bA4bIt
3673            | Self::GoogleGemma426bA4bItFree
3674            | Self::GoogleGemma431bIt
3675            | Self::GoogleGemma431bItFree
3676            | Self::InclusionaiLing261t
3677            | Self::InclusionaiLing26Flash
3678            | Self::InclusionaiRing261t
3679            | Self::MistralaiDevstral2512
3680            | Self::MistralaiMinistral14b2512
3681            | Self::MistralaiMinistral8b2512
3682            | Self::MistralaiMistralLarge2512
3683            | Self::MistralaiMistralMedium35
3684            | Self::MistralaiMistralSmall2603
3685            | Self::MoonshotaiKimiK20905
3686            | Self::MoonshotaiKimiK2Thinking
3687            | Self::MoonshotaiKimiK25
3688            | Self::MoonshotaiKimiK26
3689            | Self::MoonshotaiKimiK27Code
3690            | Self::NexAgiNexN2Mini
3691            | Self::NexAgiNexN2Pro
3692            | Self::NvidiaNemotron3Nano30bA3b
3693            | Self::PoolsideLagunaM1
3694            | Self::PoolsideLagunaM1Free
3695            | Self::PoolsideLagunaXs21
3696            | Self::PoolsideLagunaXs21Free
3697            | Self::QwenQwen3235bA22b2507
3698            | Self::QwenQwen3235bA22bThinking2507
3699            | Self::QwenQwen330bA3bInstruct2507
3700            | Self::QwenQwen3CoderNext
3701            | Self::QwenQwen3Max
3702            | Self::QwenQwen3MaxThinking
3703            | Self::QwenQwen3Next80bA3bInstruct
3704            | Self::QwenQwen3Next80bA3bThinking
3705            | Self::QwenQwen3Vl30bA3bInstruct
3706            | Self::QwenQwen3Vl32bInstruct
3707            | Self::QwenQwen35122bA10b
3708            | Self::QwenQwen3527b
3709            | Self::QwenQwen3535bA3b
3710            | Self::QwenQwen35397bA17b
3711            | Self::QwenQwen359b
3712            | Self::QwenQwen3627b
3713            | Self::QwenQwen3635bA3b
3714            | Self::QwenQwen36MaxPreview
3715            | Self::StepfunStep35Flash
3716            | Self::TencentHy3
3717            | Self::TencentHy3Preview
3718            | Self::TencentHy3Free => 262_144,
3719            Self::AmazonNovaLiteV1 | Self::AmazonNovaProV1 => 300_000,
3720            Self::OpenaiGpt5
3721            | Self::OpenaiGpt5Codex
3722            | Self::OpenaiGpt5Mini
3723            | Self::OpenaiGpt5Nano
3724            | Self::OpenaiGpt5Pro
3725            | Self::OpenaiGpt51
3726            | Self::OpenaiGpt51Codex
3727            | Self::OpenaiGpt51CodexMax
3728            | Self::OpenaiGpt51CodexMini
3729            | Self::OpenaiGpt52
3730            | Self::OpenaiGpt52Codex
3731            | Self::OpenaiGpt52Pro
3732            | Self::OpenaiGpt53Codex
3733            | Self::OpenaiGpt54Mini
3734            | Self::OpenaiGpt54Nano => 400_000,
3735            Self::XAiGrok45 => 500_000,
3736            Self::AmazonNova2LiteV1
3737            | Self::AmazonNovaPremierV1
3738            | Self::AnthropicClaudeFable5
3739            | Self::AnthropicClaudeOpus46
3740            | Self::AnthropicClaudeOpus47
3741            | Self::AnthropicClaudeOpus47Fast
3742            | Self::AnthropicClaudeOpus48
3743            | Self::AnthropicClaudeOpus48Fast
3744            | Self::AnthropicClaudeSonnet4
3745            | Self::AnthropicClaudeSonnet45
3746            | Self::AnthropicClaudeSonnet46
3747            | Self::AnthropicClaudeSonnet5
3748            | Self::MinimaxMinimaxM1
3749            | Self::NvidiaNemotron3Super120bA12b
3750            | Self::NvidiaNemotron3Super120bA12bFree
3751            | Self::NvidiaNemotron3Ultra550bA55b
3752            | Self::NvidiaNemotron3Ultra550bA55bFree
3753            | Self::QwenQwenPlus
3754            | Self::QwenQwenPlus20250728
3755            | Self::QwenQwenPlus20250728Thinking
3756            | Self::QwenQwen3CoderFlash
3757            | Self::QwenQwen3CoderPlus
3758            | Self::QwenQwen35Flash0223
3759            | Self::QwenQwen35Plus0215
3760            | Self::QwenQwen35Plus20260420
3761            | Self::QwenQwen36Flash
3762            | Self::QwenQwen36Plus
3763            | Self::QwenQwen37Max
3764            | Self::QwenQwen37Plus
3765            | Self::SakanaFuguUltra
3766            | Self::XAiGrok43 => 1_000_000,
3767            Self::OpenaiGpt41 | Self::OpenaiGpt41Mini | Self::OpenaiGpt41Nano => {
3768                1_047_576
3769            }
3770            Self::DeepseekDeepseekV4Flash
3771            | Self::DeepseekDeepseekV4Pro
3772            | Self::GoogleGemini25Flash
3773            | Self::GoogleGemini25FlashLite
3774            | Self::GoogleGemini25Pro
3775            | Self::GoogleGemini25ProPreview
3776            | Self::GoogleGemini25ProPreview0506
3777            | Self::GoogleGemini3FlashPreview
3778            | Self::GoogleGemini31FlashLite
3779            | Self::GoogleGemini31FlashLitePreview
3780            | Self::GoogleGemini31ProPreview
3781            | Self::GoogleGemini35Flash
3782            | Self::MetaLlamaLlama4Maverick
3783            | Self::MetaMuseSpark11
3784            | Self::MinimaxMinimaxM3
3785            | Self::MoonshotaiKimiK3
3786            | Self::QwenQwen3Coder
3787            | Self::ThinkingmachinesInkling
3788            | Self::XiaomiMimoV25
3789            | Self::XiaomiMimoV25Pro
3790            | Self::ZAiGlm52 => 1_048_576,
3791            Self::GoogleGemini31ProPreviewCustomtools => 1_048_756,
3792            Self::OpenaiGpt54
3793            | Self::OpenaiGpt54Pro
3794            | Self::OpenaiGpt55
3795            | Self::OpenaiGpt55Pro
3796            | Self::OpenaiGpt56Luna
3797            | Self::OpenaiGpt56LunaPro
3798            | Self::OpenaiGpt56Sol
3799            | Self::OpenaiGpt56SolPro
3800            | Self::OpenaiGpt56Terra
3801            | Self::OpenaiGpt56TerraPro => 1_050_000,
3802            Self::OpenrouterAuto | Self::XAiGrok420 => 2_000_000,
3803            Self::MetaLlamaLlama4Scout => 10_000_000,
3804        }
3805    }
3806    #[allow(clippy::too_many_lines)]
3807    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
3808        match self {
3809            Self::Ai21JambaLarge17
3810            | Self::AmazonNovaLiteV1
3811            | Self::AmazonNovaMicroV1
3812            | Self::AmazonNovaPremierV1
3813            | Self::AmazonNovaProV1
3814            | Self::AnthropicClaude3Haiku
3815            | Self::ArceeAiVirtuosoLarge
3816            | Self::CohereCommandR082024
3817            | Self::CohereCommandRPlus082024
3818            | Self::DeepseekDeepseekChat
3819            | Self::DeepseekDeepseekChatV30324
3820            | Self::GoogleGemma312bIt
3821            | Self::GoogleGemma327bIt
3822            | Self::IbmGraniteGranite418b
3823            | Self::InclusionaiLing261t
3824            | Self::InclusionaiLing26Flash
3825            | Self::KwaipilotKatCoderAirV25
3826            | Self::KwaipilotKatCoderProV2
3827            | Self::KwaipilotKatCoderProV25
3828            | Self::MetaLlamaLlama3170bInstruct
3829            | Self::MetaLlamaLlama318bInstruct
3830            | Self::MetaLlamaLlama3370bInstruct
3831            | Self::MetaLlamaLlama4Maverick
3832            | Self::MetaLlamaLlama4Scout
3833            | Self::MistralaiCodestral2508
3834            | Self::MistralaiDevstral2512
3835            | Self::MistralaiMinistral14b2512
3836            | Self::MistralaiMinistral3b2512
3837            | Self::MistralaiMinistral8b2512
3838            | Self::MistralaiMistralLarge
3839            | Self::MistralaiMistralLarge2407
3840            | Self::MistralaiMistralLarge2512
3841            | Self::MistralaiMistralMedium3
3842            | Self::MistralaiMistralMedium31
3843            | Self::MistralaiMistralNemo
3844            | Self::MistralaiMistralSaba
3845            | Self::MistralaiMistralSmall3224bInstruct
3846            | Self::MistralaiMixtral8x22bInstruct
3847            | Self::MistralaiVoxtralSmall24b2507
3848            | Self::MoonshotaiKimiK2
3849            | Self::MoonshotaiKimiK20905
3850            | Self::OpenaiGpt35Turbo
3851            | Self::OpenaiGpt35Turbo0613
3852            | Self::OpenaiGpt35Turbo16k
3853            | Self::OpenaiGpt4
3854            | Self::OpenaiGpt4Turbo
3855            | Self::OpenaiGpt4TurboPreview
3856            | Self::OpenaiGpt41
3857            | Self::OpenaiGpt41Mini
3858            | Self::OpenaiGpt41Nano
3859            | Self::OpenaiGpt4o
3860            | Self::OpenaiGpt4o20240513
3861            | Self::OpenaiGpt4o20240806
3862            | Self::OpenaiGpt4o20241120
3863            | Self::OpenaiGpt4oMini
3864            | Self::OpenaiGpt4oMini20240718
3865            | Self::OpenaiGpt51Chat
3866            | Self::OpenaiGpt52Chat
3867            | Self::OpenaiGpt53Chat
3868            | Self::OpenaiGptAudio
3869            | Self::OpenaiGptAudioMini
3870            | Self::QwenQwen2572bInstruct
3871            | Self::QwenQwen257bInstruct
3872            | Self::QwenQwenPlus
3873            | Self::QwenQwenPlus20250728
3874            | Self::QwenQwen3235bA22b2507
3875            | Self::QwenQwen330bA3bInstruct2507
3876            | Self::QwenQwen3Coder
3877            | Self::QwenQwen3Coder30bA3bInstruct
3878            | Self::QwenQwen3CoderFlash
3879            | Self::QwenQwen3CoderNext
3880            | Self::QwenQwen3CoderPlus
3881            | Self::QwenQwen3Max
3882            | Self::QwenQwen3Next80bA3bInstruct
3883            | Self::QwenQwen3Vl235bA22bInstruct
3884            | Self::QwenQwen3Vl30bA3bInstruct
3885            | Self::QwenQwen3Vl32bInstruct
3886            | Self::QwenQwen3Vl8bInstruct
3887            | Self::RekaaiRekaEdge
3888            | Self::RelaceRelaceSearch
3889            | Self::Sao10kL31Euryale70b
3890            | Self::ThedrummerUnslopnemo12b => &[],
3891            Self::MistralaiMistralMedium35
3892            | Self::MistralaiMistralSmall2603
3893            | Self::OpenaiGpt5Pro
3894            | Self::OpenaiO3MiniHigh
3895            | Self::OpenaiO4MiniHigh => &[ReasoningEffort::High],
3896            Self::DeepseekDeepseekV4Flash
3897            | Self::DeepseekDeepseekV4Pro
3898            | Self::InclusionaiRing261t
3899            | Self::ZAiGlm52 => &[ReasoningEffort::High, ReasoningEffort::Xhigh],
3900            Self::TencentHy3 | Self::TencentHy3Preview | Self::TencentHy3Free => {
3901                &[ReasoningEffort::Low, ReasoningEffort::High]
3902            }
3903            Self::MoonshotaiKimiK3 => {
3904                &[ReasoningEffort::Low, ReasoningEffort::High, ReasoningEffort::Max]
3905            }
3906            Self::NvidiaNemotron3Super120bA12b
3907            | Self::NvidiaNemotron3Super120bA12bFree => {
3908                &[ReasoningEffort::Low, ReasoningEffort::Medium]
3909            }
3910            Self::AionLabsAion20
3911            | Self::AionLabsAion30
3912            | Self::AionLabsAion30Mini
3913            | Self::AmazonNova2LiteV1
3914            | Self::AnthropicClaudeHaiku45
3915            | Self::AnthropicClaudeOpus4
3916            | Self::AnthropicClaudeOpus41
3917            | Self::AnthropicClaudeOpus45
3918            | Self::AnthropicClaudeSonnet4
3919            | Self::AnthropicClaudeSonnet45
3920            | Self::ArceeAiTrinityLargeThinking
3921            | Self::BytedanceSeedSeed16
3922            | Self::BytedanceSeedSeed16Flash
3923            | Self::CohereNorthMiniCodeFree
3924            | Self::DeepseekDeepseekChatV31
3925            | Self::DeepseekDeepseekR1
3926            | Self::DeepseekDeepseekR10528
3927            | Self::DeepseekDeepseekV31Terminus
3928            | Self::DeepseekDeepseekV32
3929            | Self::DeepseekDeepseekV32Exp
3930            | Self::GoogleGemini25Flash
3931            | Self::GoogleGemini25FlashLite
3932            | Self::GoogleGemini25Pro
3933            | Self::GoogleGemini25ProPreview
3934            | Self::GoogleGemini25ProPreview0506
3935            | Self::GoogleGemini3ProImage
3936            | Self::GoogleGemini31ProPreview
3937            | Self::GoogleGemini31ProPreviewCustomtools
3938            | Self::GoogleGemma426bA4bIt
3939            | Self::GoogleGemma426bA4bItFree
3940            | Self::GoogleGemma431bIt
3941            | Self::GoogleGemma431bItFree
3942            | Self::InceptionMercury2
3943            | Self::MinimaxMinimaxM1
3944            | Self::MinimaxMinimaxM2
3945            | Self::MinimaxMinimaxM21
3946            | Self::MinimaxMinimaxM25
3947            | Self::MinimaxMinimaxM27
3948            | Self::MinimaxMinimaxM3
3949            | Self::MoonshotaiKimiK2Thinking
3950            | Self::MoonshotaiKimiK25
3951            | Self::MoonshotaiKimiK26
3952            | Self::MoonshotaiKimiK27Code
3953            | Self::NexAgiNexN2Mini
3954            | Self::NexAgiNexN2Pro
3955            | Self::NvidiaNemotron3Nano30bA3b
3956            | Self::NvidiaNemotron3Nano30bA3bFree
3957            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
3958            | Self::NvidiaNemotronNano12bV2VlFree
3959            | Self::NvidiaNemotronNano9bV2Free
3960            | Self::OpenaiGpt5Codex
3961            | Self::OpenaiGpt51
3962            | Self::OpenaiGpt51Codex
3963            | Self::OpenaiGpt51CodexMini
3964            | Self::OpenaiGptOss120b
3965            | Self::OpenaiGptOss20b
3966            | Self::OpenaiGptOss20bFree
3967            | Self::OpenaiGptOssSafeguard20b
3968            | Self::OpenaiO1
3969            | Self::OpenaiO3
3970            | Self::OpenaiO3DeepResearch
3971            | Self::OpenaiO3Mini
3972            | Self::OpenaiO3Pro
3973            | Self::OpenaiO4Mini
3974            | Self::OpenaiO4MiniDeepResearch
3975            | Self::OpenrouterAuto
3976            | Self::OpenrouterFree
3977            | Self::PoolsideLagunaM1
3978            | Self::PoolsideLagunaM1Free
3979            | Self::PoolsideLagunaXs21
3980            | Self::PoolsideLagunaXs21Free
3981            | Self::QwenQwenPlus20250728Thinking
3982            | Self::QwenQwen314b
3983            | Self::QwenQwen3235bA22b
3984            | Self::QwenQwen3235bA22bThinking2507
3985            | Self::QwenQwen330bA3b
3986            | Self::QwenQwen330bA3bThinking2507
3987            | Self::QwenQwen332b
3988            | Self::QwenQwen38b
3989            | Self::QwenQwen3MaxThinking
3990            | Self::QwenQwen3Next80bA3bThinking
3991            | Self::QwenQwen3Vl235bA22bThinking
3992            | Self::QwenQwen3Vl30bA3bThinking
3993            | Self::QwenQwen3Vl8bThinking
3994            | Self::QwenQwen35122bA10b
3995            | Self::QwenQwen3527b
3996            | Self::QwenQwen3535bA3b
3997            | Self::QwenQwen35397bA17b
3998            | Self::QwenQwen359b
3999            | Self::QwenQwen35Flash0223
4000            | Self::QwenQwen35Plus0215
4001            | Self::QwenQwen35Plus20260420
4002            | Self::QwenQwen3627b
4003            | Self::QwenQwen3635bA3b
4004            | Self::QwenQwen36Flash
4005            | Self::QwenQwen36MaxPreview
4006            | Self::QwenQwen36Plus
4007            | Self::QwenQwen37Max
4008            | Self::QwenQwen37Plus
4009            | Self::StepfunStep35Flash
4010            | Self::StepfunStep37Flash
4011            | Self::UpstageSolarPro3
4012            | Self::XAiGrok420
4013            | Self::XAiGrok43
4014            | Self::XAiGrok45
4015            | Self::XAiGrokBuild01
4016            | Self::XiaomiMimoV25
4017            | Self::XiaomiMimoV25Pro
4018            | Self::ZAiGlm45
4019            | Self::ZAiGlm45Air
4020            | Self::ZAiGlm45v
4021            | Self::ZAiGlm46
4022            | Self::ZAiGlm46v
4023            | Self::ZAiGlm47
4024            | Self::ZAiGlm47Flash
4025            | Self::ZAiGlm5
4026            | Self::ZAiGlm5Turbo
4027            | Self::ZAiGlm51
4028            | Self::ZAiGlm5vTurbo => {
4029                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
4030            }
4031            Self::AnthropicClaudeOpus46 | Self::AnthropicClaudeSonnet46 => {
4032                &[
4033                    ReasoningEffort::Low,
4034                    ReasoningEffort::Medium,
4035                    ReasoningEffort::High,
4036                    ReasoningEffort::Max,
4037                ]
4038            }
4039            Self::OpenaiGpt51CodexMax
4040            | Self::OpenaiGpt52
4041            | Self::OpenaiGpt52Codex
4042            | Self::OpenaiGpt53Codex
4043            | Self::OpenaiGpt54
4044            | Self::OpenaiGpt54Mini
4045            | Self::OpenaiGpt54Nano
4046            | Self::OpenaiGpt55 => {
4047                &[
4048                    ReasoningEffort::Low,
4049                    ReasoningEffort::Medium,
4050                    ReasoningEffort::High,
4051                    ReasoningEffort::Xhigh,
4052                ]
4053            }
4054            Self::AnthropicClaudeFable5
4055            | Self::AnthropicClaudeOpus47
4056            | Self::AnthropicClaudeOpus47Fast
4057            | Self::AnthropicClaudeOpus48
4058            | Self::AnthropicClaudeOpus48Fast
4059            | Self::AnthropicClaudeSonnet5
4060            | Self::OpenaiGpt56Luna
4061            | Self::OpenaiGpt56LunaPro
4062            | Self::OpenaiGpt56Sol
4063            | Self::OpenaiGpt56SolPro
4064            | Self::OpenaiGpt56Terra
4065            | Self::OpenaiGpt56TerraPro => {
4066                &[
4067                    ReasoningEffort::Low,
4068                    ReasoningEffort::Medium,
4069                    ReasoningEffort::High,
4070                    ReasoningEffort::Xhigh,
4071                    ReasoningEffort::Max,
4072                ]
4073            }
4074            Self::SakanaFuguUltra => {
4075                &[ReasoningEffort::Max, ReasoningEffort::Xhigh, ReasoningEffort::High]
4076            }
4077            Self::NvidiaNemotron3Ultra550bA55b
4078            | Self::NvidiaNemotron3Ultra550bA55bFree => {
4079                &[ReasoningEffort::Medium, ReasoningEffort::High]
4080            }
4081            Self::OpenaiGpt52Pro | Self::OpenaiGpt54Pro | Self::OpenaiGpt55Pro => {
4082                &[ReasoningEffort::Medium, ReasoningEffort::High, ReasoningEffort::Xhigh]
4083            }
4084            Self::BytedanceSeedSeed20Lite
4085            | Self::BytedanceSeedSeed20Mini
4086            | Self::GoogleGemini3FlashPreview
4087            | Self::GoogleGemini31FlashLite
4088            | Self::GoogleGemini31FlashLitePreview
4089            | Self::GoogleGemini35Flash
4090            | Self::OpenaiGpt5
4091            | Self::OpenaiGpt5Mini
4092            | Self::OpenaiGpt5Nano => {
4093                &[
4094                    ReasoningEffort::Minimal,
4095                    ReasoningEffort::Low,
4096                    ReasoningEffort::Medium,
4097                    ReasoningEffort::High,
4098                ]
4099            }
4100            Self::ThinkingmachinesInkling => {
4101                &[
4102                    ReasoningEffort::Minimal,
4103                    ReasoningEffort::Low,
4104                    ReasoningEffort::Medium,
4105                    ReasoningEffort::High,
4106                    ReasoningEffort::Max,
4107                ]
4108            }
4109            Self::MetaMuseSpark11 => {
4110                &[
4111                    ReasoningEffort::Minimal,
4112                    ReasoningEffort::Low,
4113                    ReasoningEffort::Medium,
4114                    ReasoningEffort::High,
4115                    ReasoningEffort::Xhigh,
4116                ]
4117            }
4118        }
4119    }
4120    pub fn supports_reasoning(self) -> bool {
4121        !self.reasoning_levels().is_empty()
4122    }
4123    #[allow(clippy::too_many_lines)]
4124    pub fn supports_prompt_caching(self) -> bool {
4125        match self {
4126            Self::Ai21JambaLarge17
4127            | Self::AmazonNova2LiteV1
4128            | Self::AmazonNovaLiteV1
4129            | Self::AmazonNovaMicroV1
4130            | Self::AmazonNovaProV1
4131            | Self::ArceeAiVirtuosoLarge
4132            | Self::BytedanceSeedSeed16
4133            | Self::BytedanceSeedSeed16Flash
4134            | Self::BytedanceSeedSeed20Lite
4135            | Self::BytedanceSeedSeed20Mini
4136            | Self::CohereCommandR082024
4137            | Self::CohereCommandRPlus082024
4138            | Self::CohereNorthMiniCodeFree
4139            | Self::DeepseekDeepseekChat
4140            | Self::DeepseekDeepseekR1
4141            | Self::DeepseekDeepseekV32Exp
4142            | Self::GoogleGemma312bIt
4143            | Self::GoogleGemma327bIt
4144            | Self::GoogleGemma426bA4bIt
4145            | Self::GoogleGemma426bA4bItFree
4146            | Self::GoogleGemma431bItFree
4147            | Self::MetaLlamaLlama3170bInstruct
4148            | Self::MetaLlamaLlama3370bInstruct
4149            | Self::MetaLlamaLlama4Maverick
4150            | Self::MetaLlamaLlama4Scout
4151            | Self::MinimaxMinimaxM1
4152            | Self::MistralaiMistralMedium35
4153            | Self::MistralaiMistralNemo
4154            | Self::MoonshotaiKimiK2
4155            | Self::MoonshotaiKimiK20905
4156            | Self::NvidiaNemotron3Nano30bA3b
4157            | Self::NvidiaNemotron3Nano30bA3bFree
4158            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
4159            | Self::NvidiaNemotron3Super120bA12b
4160            | Self::NvidiaNemotron3Super120bA12bFree
4161            | Self::NvidiaNemotron3Ultra550bA55bFree
4162            | Self::NvidiaNemotronNano12bV2VlFree
4163            | Self::NvidiaNemotronNano9bV2Free
4164            | Self::OpenaiGpt35Turbo
4165            | Self::OpenaiGpt35Turbo0613
4166            | Self::OpenaiGpt35Turbo16k
4167            | Self::OpenaiGpt4
4168            | Self::OpenaiGpt4Turbo
4169            | Self::OpenaiGpt4TurboPreview
4170            | Self::OpenaiGpt4o20240513
4171            | Self::OpenaiGpt5Pro
4172            | Self::OpenaiGpt52Pro
4173            | Self::OpenaiGpt54Pro
4174            | Self::OpenaiGpt55Pro
4175            | Self::OpenaiGptAudio
4176            | Self::OpenaiGptAudioMini
4177            | Self::OpenaiGptOss120b
4178            | Self::OpenaiGptOss20bFree
4179            | Self::OpenaiO3Pro
4180            | Self::OpenrouterAuto
4181            | Self::OpenrouterFree
4182            | Self::PoolsideLagunaM1Free
4183            | Self::PoolsideLagunaXs21Free
4184            | Self::QwenQwen2572bInstruct
4185            | Self::QwenQwen257bInstruct
4186            | Self::QwenQwenPlus20250728
4187            | Self::QwenQwen314b
4188            | Self::QwenQwen3235bA22b
4189            | Self::QwenQwen3235bA22b2507
4190            | Self::QwenQwen3235bA22bThinking2507
4191            | Self::QwenQwen330bA3b
4192            | Self::QwenQwen330bA3bInstruct2507
4193            | Self::QwenQwen330bA3bThinking2507
4194            | Self::QwenQwen332b
4195            | Self::QwenQwen38b
4196            | Self::QwenQwen3Coder30bA3bInstruct
4197            | Self::QwenQwen3MaxThinking
4198            | Self::QwenQwen3Next80bA3bThinking
4199            | Self::QwenQwen3Vl235bA22bThinking
4200            | Self::QwenQwen3Vl30bA3bInstruct
4201            | Self::QwenQwen3Vl30bA3bThinking
4202            | Self::QwenQwen3Vl32bInstruct
4203            | Self::QwenQwen3Vl8bInstruct
4204            | Self::QwenQwen3Vl8bThinking
4205            | Self::QwenQwen35122bA10b
4206            | Self::QwenQwen3527b
4207            | Self::QwenQwen3535bA3b
4208            | Self::QwenQwen35397bA17b
4209            | Self::QwenQwen359b
4210            | Self::QwenQwen35Flash0223
4211            | Self::QwenQwen35Plus0215
4212            | Self::QwenQwen3627b
4213            | Self::QwenQwen3635bA3b
4214            | Self::RekaaiRekaEdge
4215            | Self::RelaceRelaceSearch
4216            | Self::Sao10kL31Euryale70b
4217            | Self::StepfunStep35Flash
4218            | Self::TencentHy3Free
4219            | Self::ThedrummerUnslopnemo12b
4220            | Self::ZAiGlm47Flash => false,
4221            Self::AionLabsAion20
4222            | Self::AionLabsAion30
4223            | Self::AionLabsAion30Mini
4224            | Self::AmazonNovaPremierV1
4225            | Self::AnthropicClaude3Haiku
4226            | Self::AnthropicClaudeFable5
4227            | Self::AnthropicClaudeHaiku45
4228            | Self::AnthropicClaudeOpus4
4229            | Self::AnthropicClaudeOpus41
4230            | Self::AnthropicClaudeOpus45
4231            | Self::AnthropicClaudeOpus46
4232            | Self::AnthropicClaudeOpus47
4233            | Self::AnthropicClaudeOpus47Fast
4234            | Self::AnthropicClaudeOpus48
4235            | Self::AnthropicClaudeOpus48Fast
4236            | Self::AnthropicClaudeSonnet4
4237            | Self::AnthropicClaudeSonnet45
4238            | Self::AnthropicClaudeSonnet46
4239            | Self::AnthropicClaudeSonnet5
4240            | Self::ArceeAiTrinityLargeThinking
4241            | Self::DeepseekDeepseekChatV30324
4242            | Self::DeepseekDeepseekChatV31
4243            | Self::DeepseekDeepseekR10528
4244            | Self::DeepseekDeepseekV31Terminus
4245            | Self::DeepseekDeepseekV32
4246            | Self::DeepseekDeepseekV4Flash
4247            | Self::DeepseekDeepseekV4Pro
4248            | Self::GoogleGemini25Flash
4249            | Self::GoogleGemini25FlashLite
4250            | Self::GoogleGemini25Pro
4251            | Self::GoogleGemini25ProPreview
4252            | Self::GoogleGemini25ProPreview0506
4253            | Self::GoogleGemini3FlashPreview
4254            | Self::GoogleGemini3ProImage
4255            | Self::GoogleGemini31FlashLite
4256            | Self::GoogleGemini31FlashLitePreview
4257            | Self::GoogleGemini31ProPreview
4258            | Self::GoogleGemini31ProPreviewCustomtools
4259            | Self::GoogleGemini35Flash
4260            | Self::GoogleGemma431bIt
4261            | Self::IbmGraniteGranite418b
4262            | Self::InceptionMercury2
4263            | Self::InclusionaiLing261t
4264            | Self::InclusionaiLing26Flash
4265            | Self::InclusionaiRing261t
4266            | Self::KwaipilotKatCoderAirV25
4267            | Self::KwaipilotKatCoderProV2
4268            | Self::KwaipilotKatCoderProV25
4269            | Self::MetaLlamaLlama318bInstruct
4270            | Self::MetaMuseSpark11
4271            | Self::MinimaxMinimaxM2
4272            | Self::MinimaxMinimaxM21
4273            | Self::MinimaxMinimaxM25
4274            | Self::MinimaxMinimaxM27
4275            | Self::MinimaxMinimaxM3
4276            | Self::MistralaiCodestral2508
4277            | Self::MistralaiDevstral2512
4278            | Self::MistralaiMinistral14b2512
4279            | Self::MistralaiMinistral3b2512
4280            | Self::MistralaiMinistral8b2512
4281            | Self::MistralaiMistralLarge
4282            | Self::MistralaiMistralLarge2407
4283            | Self::MistralaiMistralLarge2512
4284            | Self::MistralaiMistralMedium3
4285            | Self::MistralaiMistralMedium31
4286            | Self::MistralaiMistralSaba
4287            | Self::MistralaiMistralSmall2603
4288            | Self::MistralaiMistralSmall3224bInstruct
4289            | Self::MistralaiMixtral8x22bInstruct
4290            | Self::MistralaiVoxtralSmall24b2507
4291            | Self::MoonshotaiKimiK2Thinking
4292            | Self::MoonshotaiKimiK25
4293            | Self::MoonshotaiKimiK26
4294            | Self::MoonshotaiKimiK27Code
4295            | Self::MoonshotaiKimiK3
4296            | Self::NexAgiNexN2Mini
4297            | Self::NexAgiNexN2Pro
4298            | Self::NvidiaNemotron3Ultra550bA55b
4299            | Self::OpenaiGpt41
4300            | Self::OpenaiGpt41Mini
4301            | Self::OpenaiGpt41Nano
4302            | Self::OpenaiGpt4o
4303            | Self::OpenaiGpt4o20240806
4304            | Self::OpenaiGpt4o20241120
4305            | Self::OpenaiGpt4oMini
4306            | Self::OpenaiGpt4oMini20240718
4307            | Self::OpenaiGpt5
4308            | Self::OpenaiGpt5Codex
4309            | Self::OpenaiGpt5Mini
4310            | Self::OpenaiGpt5Nano
4311            | Self::OpenaiGpt51
4312            | Self::OpenaiGpt51Chat
4313            | Self::OpenaiGpt51Codex
4314            | Self::OpenaiGpt51CodexMax
4315            | Self::OpenaiGpt51CodexMini
4316            | Self::OpenaiGpt52
4317            | Self::OpenaiGpt52Chat
4318            | Self::OpenaiGpt52Codex
4319            | Self::OpenaiGpt53Chat
4320            | Self::OpenaiGpt53Codex
4321            | Self::OpenaiGpt54
4322            | Self::OpenaiGpt54Mini
4323            | Self::OpenaiGpt54Nano
4324            | Self::OpenaiGpt55
4325            | Self::OpenaiGpt56Luna
4326            | Self::OpenaiGpt56LunaPro
4327            | Self::OpenaiGpt56Sol
4328            | Self::OpenaiGpt56SolPro
4329            | Self::OpenaiGpt56Terra
4330            | Self::OpenaiGpt56TerraPro
4331            | Self::OpenaiGptOss20b
4332            | Self::OpenaiGptOssSafeguard20b
4333            | Self::OpenaiO1
4334            | Self::OpenaiO3
4335            | Self::OpenaiO3DeepResearch
4336            | Self::OpenaiO3Mini
4337            | Self::OpenaiO3MiniHigh
4338            | Self::OpenaiO4Mini
4339            | Self::OpenaiO4MiniDeepResearch
4340            | Self::OpenaiO4MiniHigh
4341            | Self::PoolsideLagunaM1
4342            | Self::PoolsideLagunaXs21
4343            | Self::QwenQwenPlus
4344            | Self::QwenQwenPlus20250728Thinking
4345            | Self::QwenQwen3Coder
4346            | Self::QwenQwen3CoderFlash
4347            | Self::QwenQwen3CoderNext
4348            | Self::QwenQwen3CoderPlus
4349            | Self::QwenQwen3Max
4350            | Self::QwenQwen3Next80bA3bInstruct
4351            | Self::QwenQwen3Vl235bA22bInstruct
4352            | Self::QwenQwen35Plus20260420
4353            | Self::QwenQwen36Flash
4354            | Self::QwenQwen36MaxPreview
4355            | Self::QwenQwen36Plus
4356            | Self::QwenQwen37Max
4357            | Self::QwenQwen37Plus
4358            | Self::SakanaFuguUltra
4359            | Self::StepfunStep37Flash
4360            | Self::TencentHy3
4361            | Self::TencentHy3Preview
4362            | Self::ThinkingmachinesInkling
4363            | Self::UpstageSolarPro3
4364            | Self::XAiGrok420
4365            | Self::XAiGrok43
4366            | Self::XAiGrok45
4367            | Self::XAiGrokBuild01
4368            | Self::XiaomiMimoV25
4369            | Self::XiaomiMimoV25Pro
4370            | Self::ZAiGlm45
4371            | Self::ZAiGlm45Air
4372            | Self::ZAiGlm45v
4373            | Self::ZAiGlm46
4374            | Self::ZAiGlm46v
4375            | Self::ZAiGlm47
4376            | Self::ZAiGlm5
4377            | Self::ZAiGlm5Turbo
4378            | Self::ZAiGlm51
4379            | Self::ZAiGlm52
4380            | Self::ZAiGlm5vTurbo => true,
4381        }
4382    }
4383    #[allow(clippy::too_many_lines)]
4384    pub fn supports_image(self) -> bool {
4385        match self {
4386            Self::Ai21JambaLarge17
4387            | Self::AionLabsAion20
4388            | Self::AionLabsAion30
4389            | Self::AionLabsAion30Mini
4390            | Self::AmazonNovaMicroV1
4391            | Self::ArceeAiTrinityLargeThinking
4392            | Self::ArceeAiVirtuosoLarge
4393            | Self::CohereCommandR082024
4394            | Self::CohereCommandRPlus082024
4395            | Self::CohereNorthMiniCodeFree
4396            | Self::DeepseekDeepseekChat
4397            | Self::DeepseekDeepseekChatV30324
4398            | Self::DeepseekDeepseekChatV31
4399            | Self::DeepseekDeepseekR1
4400            | Self::DeepseekDeepseekR10528
4401            | Self::DeepseekDeepseekV31Terminus
4402            | Self::DeepseekDeepseekV32
4403            | Self::DeepseekDeepseekV32Exp
4404            | Self::DeepseekDeepseekV4Flash
4405            | Self::DeepseekDeepseekV4Pro
4406            | Self::IbmGraniteGranite418b
4407            | Self::InceptionMercury2
4408            | Self::InclusionaiLing261t
4409            | Self::InclusionaiLing26Flash
4410            | Self::InclusionaiRing261t
4411            | Self::KwaipilotKatCoderAirV25
4412            | Self::KwaipilotKatCoderProV2
4413            | Self::KwaipilotKatCoderProV25
4414            | Self::MetaLlamaLlama3170bInstruct
4415            | Self::MetaLlamaLlama318bInstruct
4416            | Self::MetaLlamaLlama3370bInstruct
4417            | Self::MinimaxMinimaxM1
4418            | Self::MinimaxMinimaxM2
4419            | Self::MinimaxMinimaxM21
4420            | Self::MinimaxMinimaxM25
4421            | Self::MinimaxMinimaxM27
4422            | Self::MistralaiCodestral2508
4423            | Self::MistralaiDevstral2512
4424            | Self::MistralaiMistralLarge
4425            | Self::MistralaiMistralLarge2407
4426            | Self::MistralaiMistralNemo
4427            | Self::MistralaiMistralSaba
4428            | Self::MistralaiMixtral8x22bInstruct
4429            | Self::MistralaiVoxtralSmall24b2507
4430            | Self::MoonshotaiKimiK2
4431            | Self::MoonshotaiKimiK20905
4432            | Self::MoonshotaiKimiK2Thinking
4433            | Self::NvidiaNemotron3Nano30bA3b
4434            | Self::NvidiaNemotron3Nano30bA3bFree
4435            | Self::NvidiaNemotron3Super120bA12b
4436            | Self::NvidiaNemotron3Super120bA12bFree
4437            | Self::NvidiaNemotron3Ultra550bA55b
4438            | Self::NvidiaNemotron3Ultra550bA55bFree
4439            | Self::NvidiaNemotronNano9bV2Free
4440            | Self::OpenaiGpt35Turbo
4441            | Self::OpenaiGpt35Turbo0613
4442            | Self::OpenaiGpt35Turbo16k
4443            | Self::OpenaiGpt4
4444            | Self::OpenaiGpt4TurboPreview
4445            | Self::OpenaiGptAudio
4446            | Self::OpenaiGptAudioMini
4447            | Self::OpenaiGptOss120b
4448            | Self::OpenaiGptOss20b
4449            | Self::OpenaiGptOss20bFree
4450            | Self::OpenaiGptOssSafeguard20b
4451            | Self::OpenaiO3Mini
4452            | Self::OpenaiO3MiniHigh
4453            | Self::PoolsideLagunaM1
4454            | Self::PoolsideLagunaM1Free
4455            | Self::PoolsideLagunaXs21
4456            | Self::PoolsideLagunaXs21Free
4457            | Self::QwenQwen2572bInstruct
4458            | Self::QwenQwen257bInstruct
4459            | Self::QwenQwenPlus
4460            | Self::QwenQwenPlus20250728
4461            | Self::QwenQwenPlus20250728Thinking
4462            | Self::QwenQwen314b
4463            | Self::QwenQwen3235bA22b
4464            | Self::QwenQwen3235bA22b2507
4465            | Self::QwenQwen3235bA22bThinking2507
4466            | Self::QwenQwen330bA3b
4467            | Self::QwenQwen330bA3bInstruct2507
4468            | Self::QwenQwen330bA3bThinking2507
4469            | Self::QwenQwen332b
4470            | Self::QwenQwen38b
4471            | Self::QwenQwen3Coder
4472            | Self::QwenQwen3Coder30bA3bInstruct
4473            | Self::QwenQwen3CoderFlash
4474            | Self::QwenQwen3CoderNext
4475            | Self::QwenQwen3CoderPlus
4476            | Self::QwenQwen3Max
4477            | Self::QwenQwen3MaxThinking
4478            | Self::QwenQwen3Next80bA3bInstruct
4479            | Self::QwenQwen3Next80bA3bThinking
4480            | Self::QwenQwen36MaxPreview
4481            | Self::QwenQwen37Max
4482            | Self::RelaceRelaceSearch
4483            | Self::Sao10kL31Euryale70b
4484            | Self::StepfunStep35Flash
4485            | Self::TencentHy3
4486            | Self::TencentHy3Preview
4487            | Self::TencentHy3Free
4488            | Self::ThedrummerUnslopnemo12b
4489            | Self::UpstageSolarPro3
4490            | Self::XiaomiMimoV25Pro
4491            | Self::ZAiGlm45
4492            | Self::ZAiGlm45Air
4493            | Self::ZAiGlm46
4494            | Self::ZAiGlm47
4495            | Self::ZAiGlm47Flash
4496            | Self::ZAiGlm5
4497            | Self::ZAiGlm5Turbo
4498            | Self::ZAiGlm51
4499            | Self::ZAiGlm52 => false,
4500            Self::AmazonNova2LiteV1
4501            | Self::AmazonNovaLiteV1
4502            | Self::AmazonNovaPremierV1
4503            | Self::AmazonNovaProV1
4504            | Self::AnthropicClaude3Haiku
4505            | Self::AnthropicClaudeFable5
4506            | Self::AnthropicClaudeHaiku45
4507            | Self::AnthropicClaudeOpus4
4508            | Self::AnthropicClaudeOpus41
4509            | Self::AnthropicClaudeOpus45
4510            | Self::AnthropicClaudeOpus46
4511            | Self::AnthropicClaudeOpus47
4512            | Self::AnthropicClaudeOpus47Fast
4513            | Self::AnthropicClaudeOpus48
4514            | Self::AnthropicClaudeOpus48Fast
4515            | Self::AnthropicClaudeSonnet4
4516            | Self::AnthropicClaudeSonnet45
4517            | Self::AnthropicClaudeSonnet46
4518            | Self::AnthropicClaudeSonnet5
4519            | Self::BytedanceSeedSeed16
4520            | Self::BytedanceSeedSeed16Flash
4521            | Self::BytedanceSeedSeed20Lite
4522            | Self::BytedanceSeedSeed20Mini
4523            | Self::GoogleGemini25Flash
4524            | Self::GoogleGemini25FlashLite
4525            | Self::GoogleGemini25Pro
4526            | Self::GoogleGemini25ProPreview
4527            | Self::GoogleGemini25ProPreview0506
4528            | Self::GoogleGemini3FlashPreview
4529            | Self::GoogleGemini3ProImage
4530            | Self::GoogleGemini31FlashLite
4531            | Self::GoogleGemini31FlashLitePreview
4532            | Self::GoogleGemini31ProPreview
4533            | Self::GoogleGemini31ProPreviewCustomtools
4534            | Self::GoogleGemini35Flash
4535            | Self::GoogleGemma312bIt
4536            | Self::GoogleGemma327bIt
4537            | Self::GoogleGemma426bA4bIt
4538            | Self::GoogleGemma426bA4bItFree
4539            | Self::GoogleGemma431bIt
4540            | Self::GoogleGemma431bItFree
4541            | Self::MetaLlamaLlama4Maverick
4542            | Self::MetaLlamaLlama4Scout
4543            | Self::MetaMuseSpark11
4544            | Self::MinimaxMinimaxM3
4545            | Self::MistralaiMinistral14b2512
4546            | Self::MistralaiMinistral3b2512
4547            | Self::MistralaiMinistral8b2512
4548            | Self::MistralaiMistralLarge2512
4549            | Self::MistralaiMistralMedium3
4550            | Self::MistralaiMistralMedium35
4551            | Self::MistralaiMistralMedium31
4552            | Self::MistralaiMistralSmall2603
4553            | Self::MistralaiMistralSmall3224bInstruct
4554            | Self::MoonshotaiKimiK25
4555            | Self::MoonshotaiKimiK26
4556            | Self::MoonshotaiKimiK27Code
4557            | Self::MoonshotaiKimiK3
4558            | Self::NexAgiNexN2Mini
4559            | Self::NexAgiNexN2Pro
4560            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
4561            | Self::NvidiaNemotronNano12bV2VlFree
4562            | Self::OpenaiGpt4Turbo
4563            | Self::OpenaiGpt41
4564            | Self::OpenaiGpt41Mini
4565            | Self::OpenaiGpt41Nano
4566            | Self::OpenaiGpt4o
4567            | Self::OpenaiGpt4o20240513
4568            | Self::OpenaiGpt4o20240806
4569            | Self::OpenaiGpt4o20241120
4570            | Self::OpenaiGpt4oMini
4571            | Self::OpenaiGpt4oMini20240718
4572            | Self::OpenaiGpt5
4573            | Self::OpenaiGpt5Codex
4574            | Self::OpenaiGpt5Mini
4575            | Self::OpenaiGpt5Nano
4576            | Self::OpenaiGpt5Pro
4577            | Self::OpenaiGpt51
4578            | Self::OpenaiGpt51Chat
4579            | Self::OpenaiGpt51Codex
4580            | Self::OpenaiGpt51CodexMax
4581            | Self::OpenaiGpt51CodexMini
4582            | Self::OpenaiGpt52
4583            | Self::OpenaiGpt52Chat
4584            | Self::OpenaiGpt52Codex
4585            | Self::OpenaiGpt52Pro
4586            | Self::OpenaiGpt53Chat
4587            | Self::OpenaiGpt53Codex
4588            | Self::OpenaiGpt54
4589            | Self::OpenaiGpt54Mini
4590            | Self::OpenaiGpt54Nano
4591            | Self::OpenaiGpt54Pro
4592            | Self::OpenaiGpt55
4593            | Self::OpenaiGpt55Pro
4594            | Self::OpenaiGpt56Luna
4595            | Self::OpenaiGpt56LunaPro
4596            | Self::OpenaiGpt56Sol
4597            | Self::OpenaiGpt56SolPro
4598            | Self::OpenaiGpt56Terra
4599            | Self::OpenaiGpt56TerraPro
4600            | Self::OpenaiO1
4601            | Self::OpenaiO3
4602            | Self::OpenaiO3DeepResearch
4603            | Self::OpenaiO3Pro
4604            | Self::OpenaiO4Mini
4605            | Self::OpenaiO4MiniDeepResearch
4606            | Self::OpenaiO4MiniHigh
4607            | Self::OpenrouterAuto
4608            | Self::OpenrouterFree
4609            | Self::QwenQwen3Vl235bA22bInstruct
4610            | Self::QwenQwen3Vl235bA22bThinking
4611            | Self::QwenQwen3Vl30bA3bInstruct
4612            | Self::QwenQwen3Vl30bA3bThinking
4613            | Self::QwenQwen3Vl32bInstruct
4614            | Self::QwenQwen3Vl8bInstruct
4615            | Self::QwenQwen3Vl8bThinking
4616            | Self::QwenQwen35122bA10b
4617            | Self::QwenQwen3527b
4618            | Self::QwenQwen3535bA3b
4619            | Self::QwenQwen35397bA17b
4620            | Self::QwenQwen359b
4621            | Self::QwenQwen35Flash0223
4622            | Self::QwenQwen35Plus0215
4623            | Self::QwenQwen35Plus20260420
4624            | Self::QwenQwen3627b
4625            | Self::QwenQwen3635bA3b
4626            | Self::QwenQwen36Flash
4627            | Self::QwenQwen36Plus
4628            | Self::QwenQwen37Plus
4629            | Self::RekaaiRekaEdge
4630            | Self::SakanaFuguUltra
4631            | Self::StepfunStep37Flash
4632            | Self::ThinkingmachinesInkling
4633            | Self::XAiGrok420
4634            | Self::XAiGrok43
4635            | Self::XAiGrok45
4636            | Self::XAiGrokBuild01
4637            | Self::XiaomiMimoV25
4638            | Self::ZAiGlm45v
4639            | Self::ZAiGlm46v
4640            | Self::ZAiGlm5vTurbo => true,
4641        }
4642    }
4643    #[allow(clippy::too_many_lines)]
4644    pub fn supports_audio(self) -> bool {
4645        match self {
4646            Self::Ai21JambaLarge17
4647            | Self::AionLabsAion20
4648            | Self::AionLabsAion30
4649            | Self::AionLabsAion30Mini
4650            | Self::AmazonNova2LiteV1
4651            | Self::AmazonNovaLiteV1
4652            | Self::AmazonNovaMicroV1
4653            | Self::AmazonNovaPremierV1
4654            | Self::AmazonNovaProV1
4655            | Self::AnthropicClaude3Haiku
4656            | Self::AnthropicClaudeFable5
4657            | Self::AnthropicClaudeHaiku45
4658            | Self::AnthropicClaudeOpus4
4659            | Self::AnthropicClaudeOpus41
4660            | Self::AnthropicClaudeOpus45
4661            | Self::AnthropicClaudeOpus46
4662            | Self::AnthropicClaudeOpus47
4663            | Self::AnthropicClaudeOpus47Fast
4664            | Self::AnthropicClaudeOpus48
4665            | Self::AnthropicClaudeOpus48Fast
4666            | Self::AnthropicClaudeSonnet4
4667            | Self::AnthropicClaudeSonnet45
4668            | Self::AnthropicClaudeSonnet46
4669            | Self::AnthropicClaudeSonnet5
4670            | Self::ArceeAiTrinityLargeThinking
4671            | Self::ArceeAiVirtuosoLarge
4672            | Self::BytedanceSeedSeed16
4673            | Self::BytedanceSeedSeed16Flash
4674            | Self::BytedanceSeedSeed20Lite
4675            | Self::BytedanceSeedSeed20Mini
4676            | Self::CohereCommandR082024
4677            | Self::CohereCommandRPlus082024
4678            | Self::CohereNorthMiniCodeFree
4679            | Self::DeepseekDeepseekChat
4680            | Self::DeepseekDeepseekChatV30324
4681            | Self::DeepseekDeepseekChatV31
4682            | Self::DeepseekDeepseekR1
4683            | Self::DeepseekDeepseekR10528
4684            | Self::DeepseekDeepseekV31Terminus
4685            | Self::DeepseekDeepseekV32
4686            | Self::DeepseekDeepseekV32Exp
4687            | Self::DeepseekDeepseekV4Flash
4688            | Self::DeepseekDeepseekV4Pro
4689            | Self::GoogleGemini3ProImage
4690            | Self::GoogleGemma312bIt
4691            | Self::GoogleGemma327bIt
4692            | Self::GoogleGemma426bA4bIt
4693            | Self::GoogleGemma426bA4bItFree
4694            | Self::GoogleGemma431bIt
4695            | Self::GoogleGemma431bItFree
4696            | Self::IbmGraniteGranite418b
4697            | Self::InceptionMercury2
4698            | Self::InclusionaiLing261t
4699            | Self::InclusionaiLing26Flash
4700            | Self::InclusionaiRing261t
4701            | Self::KwaipilotKatCoderAirV25
4702            | Self::KwaipilotKatCoderProV2
4703            | Self::KwaipilotKatCoderProV25
4704            | Self::MetaLlamaLlama3170bInstruct
4705            | Self::MetaLlamaLlama318bInstruct
4706            | Self::MetaLlamaLlama3370bInstruct
4707            | Self::MetaLlamaLlama4Maverick
4708            | Self::MetaLlamaLlama4Scout
4709            | Self::MinimaxMinimaxM1
4710            | Self::MinimaxMinimaxM2
4711            | Self::MinimaxMinimaxM21
4712            | Self::MinimaxMinimaxM25
4713            | Self::MinimaxMinimaxM27
4714            | Self::MinimaxMinimaxM3
4715            | Self::MistralaiCodestral2508
4716            | Self::MistralaiDevstral2512
4717            | Self::MistralaiMinistral14b2512
4718            | Self::MistralaiMinistral3b2512
4719            | Self::MistralaiMinistral8b2512
4720            | Self::MistralaiMistralLarge
4721            | Self::MistralaiMistralLarge2407
4722            | Self::MistralaiMistralLarge2512
4723            | Self::MistralaiMistralMedium3
4724            | Self::MistralaiMistralMedium35
4725            | Self::MistralaiMistralMedium31
4726            | Self::MistralaiMistralNemo
4727            | Self::MistralaiMistralSaba
4728            | Self::MistralaiMistralSmall2603
4729            | Self::MistralaiMistralSmall3224bInstruct
4730            | Self::MistralaiMixtral8x22bInstruct
4731            | Self::MoonshotaiKimiK2
4732            | Self::MoonshotaiKimiK20905
4733            | Self::MoonshotaiKimiK2Thinking
4734            | Self::MoonshotaiKimiK25
4735            | Self::MoonshotaiKimiK26
4736            | Self::MoonshotaiKimiK27Code
4737            | Self::MoonshotaiKimiK3
4738            | Self::NexAgiNexN2Mini
4739            | Self::NexAgiNexN2Pro
4740            | Self::NvidiaNemotron3Nano30bA3b
4741            | Self::NvidiaNemotron3Nano30bA3bFree
4742            | Self::NvidiaNemotron3Super120bA12b
4743            | Self::NvidiaNemotron3Super120bA12bFree
4744            | Self::NvidiaNemotron3Ultra550bA55b
4745            | Self::NvidiaNemotron3Ultra550bA55bFree
4746            | Self::NvidiaNemotronNano12bV2VlFree
4747            | Self::NvidiaNemotronNano9bV2Free
4748            | Self::OpenaiGpt35Turbo
4749            | Self::OpenaiGpt35Turbo0613
4750            | Self::OpenaiGpt35Turbo16k
4751            | Self::OpenaiGpt4
4752            | Self::OpenaiGpt4Turbo
4753            | Self::OpenaiGpt4TurboPreview
4754            | Self::OpenaiGpt41
4755            | Self::OpenaiGpt41Mini
4756            | Self::OpenaiGpt41Nano
4757            | Self::OpenaiGpt4o
4758            | Self::OpenaiGpt4o20240513
4759            | Self::OpenaiGpt4o20240806
4760            | Self::OpenaiGpt4o20241120
4761            | Self::OpenaiGpt4oMini
4762            | Self::OpenaiGpt4oMini20240718
4763            | Self::OpenaiGpt5
4764            | Self::OpenaiGpt5Codex
4765            | Self::OpenaiGpt5Mini
4766            | Self::OpenaiGpt5Nano
4767            | Self::OpenaiGpt5Pro
4768            | Self::OpenaiGpt51
4769            | Self::OpenaiGpt51Chat
4770            | Self::OpenaiGpt51Codex
4771            | Self::OpenaiGpt51CodexMax
4772            | Self::OpenaiGpt51CodexMini
4773            | Self::OpenaiGpt52
4774            | Self::OpenaiGpt52Chat
4775            | Self::OpenaiGpt52Codex
4776            | Self::OpenaiGpt52Pro
4777            | Self::OpenaiGpt53Chat
4778            | Self::OpenaiGpt53Codex
4779            | Self::OpenaiGpt54
4780            | Self::OpenaiGpt54Mini
4781            | Self::OpenaiGpt54Nano
4782            | Self::OpenaiGpt54Pro
4783            | Self::OpenaiGpt55
4784            | Self::OpenaiGpt55Pro
4785            | Self::OpenaiGpt56Luna
4786            | Self::OpenaiGpt56LunaPro
4787            | Self::OpenaiGpt56Sol
4788            | Self::OpenaiGpt56SolPro
4789            | Self::OpenaiGpt56Terra
4790            | Self::OpenaiGpt56TerraPro
4791            | Self::OpenaiGptOss120b
4792            | Self::OpenaiGptOss20b
4793            | Self::OpenaiGptOss20bFree
4794            | Self::OpenaiGptOssSafeguard20b
4795            | Self::OpenaiO1
4796            | Self::OpenaiO3
4797            | Self::OpenaiO3DeepResearch
4798            | Self::OpenaiO3Mini
4799            | Self::OpenaiO3MiniHigh
4800            | Self::OpenaiO3Pro
4801            | Self::OpenaiO4Mini
4802            | Self::OpenaiO4MiniDeepResearch
4803            | Self::OpenaiO4MiniHigh
4804            | Self::OpenrouterFree
4805            | Self::PoolsideLagunaM1
4806            | Self::PoolsideLagunaM1Free
4807            | Self::PoolsideLagunaXs21
4808            | Self::PoolsideLagunaXs21Free
4809            | Self::QwenQwen2572bInstruct
4810            | Self::QwenQwen257bInstruct
4811            | Self::QwenQwenPlus
4812            | Self::QwenQwenPlus20250728
4813            | Self::QwenQwenPlus20250728Thinking
4814            | Self::QwenQwen314b
4815            | Self::QwenQwen3235bA22b
4816            | Self::QwenQwen3235bA22b2507
4817            | Self::QwenQwen3235bA22bThinking2507
4818            | Self::QwenQwen330bA3b
4819            | Self::QwenQwen330bA3bInstruct2507
4820            | Self::QwenQwen330bA3bThinking2507
4821            | Self::QwenQwen332b
4822            | Self::QwenQwen38b
4823            | Self::QwenQwen3Coder
4824            | Self::QwenQwen3Coder30bA3bInstruct
4825            | Self::QwenQwen3CoderFlash
4826            | Self::QwenQwen3CoderNext
4827            | Self::QwenQwen3CoderPlus
4828            | Self::QwenQwen3Max
4829            | Self::QwenQwen3MaxThinking
4830            | Self::QwenQwen3Next80bA3bInstruct
4831            | Self::QwenQwen3Next80bA3bThinking
4832            | Self::QwenQwen3Vl235bA22bInstruct
4833            | Self::QwenQwen3Vl235bA22bThinking
4834            | Self::QwenQwen3Vl30bA3bInstruct
4835            | Self::QwenQwen3Vl30bA3bThinking
4836            | Self::QwenQwen3Vl32bInstruct
4837            | Self::QwenQwen3Vl8bInstruct
4838            | Self::QwenQwen3Vl8bThinking
4839            | Self::QwenQwen35122bA10b
4840            | Self::QwenQwen3527b
4841            | Self::QwenQwen3535bA3b
4842            | Self::QwenQwen35397bA17b
4843            | Self::QwenQwen359b
4844            | Self::QwenQwen35Flash0223
4845            | Self::QwenQwen35Plus0215
4846            | Self::QwenQwen35Plus20260420
4847            | Self::QwenQwen3627b
4848            | Self::QwenQwen3635bA3b
4849            | Self::QwenQwen36Flash
4850            | Self::QwenQwen36MaxPreview
4851            | Self::QwenQwen36Plus
4852            | Self::QwenQwen37Max
4853            | Self::QwenQwen37Plus
4854            | Self::RekaaiRekaEdge
4855            | Self::RelaceRelaceSearch
4856            | Self::SakanaFuguUltra
4857            | Self::Sao10kL31Euryale70b
4858            | Self::StepfunStep35Flash
4859            | Self::StepfunStep37Flash
4860            | Self::TencentHy3
4861            | Self::TencentHy3Preview
4862            | Self::TencentHy3Free
4863            | Self::ThedrummerUnslopnemo12b
4864            | Self::UpstageSolarPro3
4865            | Self::XAiGrok420
4866            | Self::XAiGrok43
4867            | Self::XAiGrok45
4868            | Self::XAiGrokBuild01
4869            | Self::XiaomiMimoV25Pro
4870            | Self::ZAiGlm45
4871            | Self::ZAiGlm45Air
4872            | Self::ZAiGlm45v
4873            | Self::ZAiGlm46
4874            | Self::ZAiGlm46v
4875            | Self::ZAiGlm47
4876            | Self::ZAiGlm47Flash
4877            | Self::ZAiGlm5
4878            | Self::ZAiGlm5Turbo
4879            | Self::ZAiGlm51
4880            | Self::ZAiGlm52
4881            | Self::ZAiGlm5vTurbo => false,
4882            Self::GoogleGemini25Flash
4883            | Self::GoogleGemini25FlashLite
4884            | Self::GoogleGemini25Pro
4885            | Self::GoogleGemini25ProPreview
4886            | Self::GoogleGemini25ProPreview0506
4887            | Self::GoogleGemini3FlashPreview
4888            | Self::GoogleGemini31FlashLite
4889            | Self::GoogleGemini31FlashLitePreview
4890            | Self::GoogleGemini31ProPreview
4891            | Self::GoogleGemini31ProPreviewCustomtools
4892            | Self::GoogleGemini35Flash
4893            | Self::MetaMuseSpark11
4894            | Self::MistralaiVoxtralSmall24b2507
4895            | Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree
4896            | Self::OpenaiGptAudio
4897            | Self::OpenaiGptAudioMini
4898            | Self::OpenrouterAuto
4899            | Self::ThinkingmachinesInkling
4900            | Self::XiaomiMimoV25 => true,
4901        }
4902    }
4903    const ALL: &[OpenRouterModel] = &[
4904        Self::Ai21JambaLarge17,
4905        Self::AionLabsAion20,
4906        Self::AionLabsAion30,
4907        Self::AionLabsAion30Mini,
4908        Self::AmazonNova2LiteV1,
4909        Self::AmazonNovaLiteV1,
4910        Self::AmazonNovaMicroV1,
4911        Self::AmazonNovaPremierV1,
4912        Self::AmazonNovaProV1,
4913        Self::AnthropicClaude3Haiku,
4914        Self::AnthropicClaudeFable5,
4915        Self::AnthropicClaudeHaiku45,
4916        Self::AnthropicClaudeOpus4,
4917        Self::AnthropicClaudeOpus41,
4918        Self::AnthropicClaudeOpus45,
4919        Self::AnthropicClaudeOpus46,
4920        Self::AnthropicClaudeOpus47,
4921        Self::AnthropicClaudeOpus47Fast,
4922        Self::AnthropicClaudeOpus48,
4923        Self::AnthropicClaudeOpus48Fast,
4924        Self::AnthropicClaudeSonnet4,
4925        Self::AnthropicClaudeSonnet45,
4926        Self::AnthropicClaudeSonnet46,
4927        Self::AnthropicClaudeSonnet5,
4928        Self::ArceeAiTrinityLargeThinking,
4929        Self::ArceeAiVirtuosoLarge,
4930        Self::BytedanceSeedSeed16,
4931        Self::BytedanceSeedSeed16Flash,
4932        Self::BytedanceSeedSeed20Lite,
4933        Self::BytedanceSeedSeed20Mini,
4934        Self::CohereCommandR082024,
4935        Self::CohereCommandRPlus082024,
4936        Self::CohereNorthMiniCodeFree,
4937        Self::DeepseekDeepseekChat,
4938        Self::DeepseekDeepseekChatV30324,
4939        Self::DeepseekDeepseekChatV31,
4940        Self::DeepseekDeepseekR1,
4941        Self::DeepseekDeepseekR10528,
4942        Self::DeepseekDeepseekV31Terminus,
4943        Self::DeepseekDeepseekV32,
4944        Self::DeepseekDeepseekV32Exp,
4945        Self::DeepseekDeepseekV4Flash,
4946        Self::DeepseekDeepseekV4Pro,
4947        Self::GoogleGemini25Flash,
4948        Self::GoogleGemini25FlashLite,
4949        Self::GoogleGemini25Pro,
4950        Self::GoogleGemini25ProPreview,
4951        Self::GoogleGemini25ProPreview0506,
4952        Self::GoogleGemini3FlashPreview,
4953        Self::GoogleGemini3ProImage,
4954        Self::GoogleGemini31FlashLite,
4955        Self::GoogleGemini31FlashLitePreview,
4956        Self::GoogleGemini31ProPreview,
4957        Self::GoogleGemini31ProPreviewCustomtools,
4958        Self::GoogleGemini35Flash,
4959        Self::GoogleGemma312bIt,
4960        Self::GoogleGemma327bIt,
4961        Self::GoogleGemma426bA4bIt,
4962        Self::GoogleGemma426bA4bItFree,
4963        Self::GoogleGemma431bIt,
4964        Self::GoogleGemma431bItFree,
4965        Self::IbmGraniteGranite418b,
4966        Self::InceptionMercury2,
4967        Self::InclusionaiLing261t,
4968        Self::InclusionaiLing26Flash,
4969        Self::InclusionaiRing261t,
4970        Self::KwaipilotKatCoderAirV25,
4971        Self::KwaipilotKatCoderProV2,
4972        Self::KwaipilotKatCoderProV25,
4973        Self::MetaLlamaLlama3170bInstruct,
4974        Self::MetaLlamaLlama318bInstruct,
4975        Self::MetaLlamaLlama3370bInstruct,
4976        Self::MetaLlamaLlama4Maverick,
4977        Self::MetaLlamaLlama4Scout,
4978        Self::MetaMuseSpark11,
4979        Self::MinimaxMinimaxM1,
4980        Self::MinimaxMinimaxM2,
4981        Self::MinimaxMinimaxM21,
4982        Self::MinimaxMinimaxM25,
4983        Self::MinimaxMinimaxM27,
4984        Self::MinimaxMinimaxM3,
4985        Self::MistralaiCodestral2508,
4986        Self::MistralaiDevstral2512,
4987        Self::MistralaiMinistral14b2512,
4988        Self::MistralaiMinistral3b2512,
4989        Self::MistralaiMinistral8b2512,
4990        Self::MistralaiMistralLarge,
4991        Self::MistralaiMistralLarge2407,
4992        Self::MistralaiMistralLarge2512,
4993        Self::MistralaiMistralMedium3,
4994        Self::MistralaiMistralMedium35,
4995        Self::MistralaiMistralMedium31,
4996        Self::MistralaiMistralNemo,
4997        Self::MistralaiMistralSaba,
4998        Self::MistralaiMistralSmall2603,
4999        Self::MistralaiMistralSmall3224bInstruct,
5000        Self::MistralaiMixtral8x22bInstruct,
5001        Self::MistralaiVoxtralSmall24b2507,
5002        Self::MoonshotaiKimiK2,
5003        Self::MoonshotaiKimiK20905,
5004        Self::MoonshotaiKimiK2Thinking,
5005        Self::MoonshotaiKimiK25,
5006        Self::MoonshotaiKimiK26,
5007        Self::MoonshotaiKimiK27Code,
5008        Self::MoonshotaiKimiK3,
5009        Self::NexAgiNexN2Mini,
5010        Self::NexAgiNexN2Pro,
5011        Self::NvidiaNemotron3Nano30bA3b,
5012        Self::NvidiaNemotron3Nano30bA3bFree,
5013        Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree,
5014        Self::NvidiaNemotron3Super120bA12b,
5015        Self::NvidiaNemotron3Super120bA12bFree,
5016        Self::NvidiaNemotron3Ultra550bA55b,
5017        Self::NvidiaNemotron3Ultra550bA55bFree,
5018        Self::NvidiaNemotronNano12bV2VlFree,
5019        Self::NvidiaNemotronNano9bV2Free,
5020        Self::OpenaiGpt35Turbo,
5021        Self::OpenaiGpt35Turbo0613,
5022        Self::OpenaiGpt35Turbo16k,
5023        Self::OpenaiGpt4,
5024        Self::OpenaiGpt4Turbo,
5025        Self::OpenaiGpt4TurboPreview,
5026        Self::OpenaiGpt41,
5027        Self::OpenaiGpt41Mini,
5028        Self::OpenaiGpt41Nano,
5029        Self::OpenaiGpt4o,
5030        Self::OpenaiGpt4o20240513,
5031        Self::OpenaiGpt4o20240806,
5032        Self::OpenaiGpt4o20241120,
5033        Self::OpenaiGpt4oMini,
5034        Self::OpenaiGpt4oMini20240718,
5035        Self::OpenaiGpt5,
5036        Self::OpenaiGpt5Codex,
5037        Self::OpenaiGpt5Mini,
5038        Self::OpenaiGpt5Nano,
5039        Self::OpenaiGpt5Pro,
5040        Self::OpenaiGpt51,
5041        Self::OpenaiGpt51Chat,
5042        Self::OpenaiGpt51Codex,
5043        Self::OpenaiGpt51CodexMax,
5044        Self::OpenaiGpt51CodexMini,
5045        Self::OpenaiGpt52,
5046        Self::OpenaiGpt52Chat,
5047        Self::OpenaiGpt52Codex,
5048        Self::OpenaiGpt52Pro,
5049        Self::OpenaiGpt53Chat,
5050        Self::OpenaiGpt53Codex,
5051        Self::OpenaiGpt54,
5052        Self::OpenaiGpt54Mini,
5053        Self::OpenaiGpt54Nano,
5054        Self::OpenaiGpt54Pro,
5055        Self::OpenaiGpt55,
5056        Self::OpenaiGpt55Pro,
5057        Self::OpenaiGpt56Luna,
5058        Self::OpenaiGpt56LunaPro,
5059        Self::OpenaiGpt56Sol,
5060        Self::OpenaiGpt56SolPro,
5061        Self::OpenaiGpt56Terra,
5062        Self::OpenaiGpt56TerraPro,
5063        Self::OpenaiGptAudio,
5064        Self::OpenaiGptAudioMini,
5065        Self::OpenaiGptOss120b,
5066        Self::OpenaiGptOss20b,
5067        Self::OpenaiGptOss20bFree,
5068        Self::OpenaiGptOssSafeguard20b,
5069        Self::OpenaiO1,
5070        Self::OpenaiO3,
5071        Self::OpenaiO3DeepResearch,
5072        Self::OpenaiO3Mini,
5073        Self::OpenaiO3MiniHigh,
5074        Self::OpenaiO3Pro,
5075        Self::OpenaiO4Mini,
5076        Self::OpenaiO4MiniDeepResearch,
5077        Self::OpenaiO4MiniHigh,
5078        Self::OpenrouterAuto,
5079        Self::OpenrouterFree,
5080        Self::PoolsideLagunaM1,
5081        Self::PoolsideLagunaM1Free,
5082        Self::PoolsideLagunaXs21,
5083        Self::PoolsideLagunaXs21Free,
5084        Self::QwenQwen2572bInstruct,
5085        Self::QwenQwen257bInstruct,
5086        Self::QwenQwenPlus,
5087        Self::QwenQwenPlus20250728,
5088        Self::QwenQwenPlus20250728Thinking,
5089        Self::QwenQwen314b,
5090        Self::QwenQwen3235bA22b,
5091        Self::QwenQwen3235bA22b2507,
5092        Self::QwenQwen3235bA22bThinking2507,
5093        Self::QwenQwen330bA3b,
5094        Self::QwenQwen330bA3bInstruct2507,
5095        Self::QwenQwen330bA3bThinking2507,
5096        Self::QwenQwen332b,
5097        Self::QwenQwen38b,
5098        Self::QwenQwen3Coder,
5099        Self::QwenQwen3Coder30bA3bInstruct,
5100        Self::QwenQwen3CoderFlash,
5101        Self::QwenQwen3CoderNext,
5102        Self::QwenQwen3CoderPlus,
5103        Self::QwenQwen3Max,
5104        Self::QwenQwen3MaxThinking,
5105        Self::QwenQwen3Next80bA3bInstruct,
5106        Self::QwenQwen3Next80bA3bThinking,
5107        Self::QwenQwen3Vl235bA22bInstruct,
5108        Self::QwenQwen3Vl235bA22bThinking,
5109        Self::QwenQwen3Vl30bA3bInstruct,
5110        Self::QwenQwen3Vl30bA3bThinking,
5111        Self::QwenQwen3Vl32bInstruct,
5112        Self::QwenQwen3Vl8bInstruct,
5113        Self::QwenQwen3Vl8bThinking,
5114        Self::QwenQwen35122bA10b,
5115        Self::QwenQwen3527b,
5116        Self::QwenQwen3535bA3b,
5117        Self::QwenQwen35397bA17b,
5118        Self::QwenQwen359b,
5119        Self::QwenQwen35Flash0223,
5120        Self::QwenQwen35Plus0215,
5121        Self::QwenQwen35Plus20260420,
5122        Self::QwenQwen3627b,
5123        Self::QwenQwen3635bA3b,
5124        Self::QwenQwen36Flash,
5125        Self::QwenQwen36MaxPreview,
5126        Self::QwenQwen36Plus,
5127        Self::QwenQwen37Max,
5128        Self::QwenQwen37Plus,
5129        Self::RekaaiRekaEdge,
5130        Self::RelaceRelaceSearch,
5131        Self::SakanaFuguUltra,
5132        Self::Sao10kL31Euryale70b,
5133        Self::StepfunStep35Flash,
5134        Self::StepfunStep37Flash,
5135        Self::TencentHy3,
5136        Self::TencentHy3Preview,
5137        Self::TencentHy3Free,
5138        Self::ThedrummerUnslopnemo12b,
5139        Self::ThinkingmachinesInkling,
5140        Self::UpstageSolarPro3,
5141        Self::XAiGrok420,
5142        Self::XAiGrok43,
5143        Self::XAiGrok45,
5144        Self::XAiGrokBuild01,
5145        Self::XiaomiMimoV25,
5146        Self::XiaomiMimoV25Pro,
5147        Self::ZAiGlm45,
5148        Self::ZAiGlm45Air,
5149        Self::ZAiGlm45v,
5150        Self::ZAiGlm46,
5151        Self::ZAiGlm46v,
5152        Self::ZAiGlm47,
5153        Self::ZAiGlm47Flash,
5154        Self::ZAiGlm5,
5155        Self::ZAiGlm5Turbo,
5156        Self::ZAiGlm51,
5157        Self::ZAiGlm52,
5158        Self::ZAiGlm5vTurbo,
5159    ];
5160}
5161impl std::str::FromStr for OpenRouterModel {
5162    type Err = String;
5163    #[allow(clippy::too_many_lines)]
5164    fn from_str(s: &str) -> Result<Self, Self::Err> {
5165        match s {
5166            "ai21/jamba-large-1.7" => Ok(Self::Ai21JambaLarge17),
5167            "aion-labs/aion-2.0" => Ok(Self::AionLabsAion20),
5168            "aion-labs/aion-3.0" => Ok(Self::AionLabsAion30),
5169            "aion-labs/aion-3.0-mini" => Ok(Self::AionLabsAion30Mini),
5170            "amazon/nova-2-lite-v1" => Ok(Self::AmazonNova2LiteV1),
5171            "amazon/nova-lite-v1" => Ok(Self::AmazonNovaLiteV1),
5172            "amazon/nova-micro-v1" => Ok(Self::AmazonNovaMicroV1),
5173            "amazon/nova-premier-v1" => Ok(Self::AmazonNovaPremierV1),
5174            "amazon/nova-pro-v1" => Ok(Self::AmazonNovaProV1),
5175            "anthropic/claude-3-haiku" => Ok(Self::AnthropicClaude3Haiku),
5176            "anthropic/claude-fable-5" => Ok(Self::AnthropicClaudeFable5),
5177            "anthropic/claude-haiku-4.5" => Ok(Self::AnthropicClaudeHaiku45),
5178            "anthropic/claude-opus-4" => Ok(Self::AnthropicClaudeOpus4),
5179            "anthropic/claude-opus-4.1" => Ok(Self::AnthropicClaudeOpus41),
5180            "anthropic/claude-opus-4.5" => Ok(Self::AnthropicClaudeOpus45),
5181            "anthropic/claude-opus-4.6" => Ok(Self::AnthropicClaudeOpus46),
5182            "anthropic/claude-opus-4.7" => Ok(Self::AnthropicClaudeOpus47),
5183            "anthropic/claude-opus-4.7-fast" => Ok(Self::AnthropicClaudeOpus47Fast),
5184            "anthropic/claude-opus-4.8" => Ok(Self::AnthropicClaudeOpus48),
5185            "anthropic/claude-opus-4.8-fast" => Ok(Self::AnthropicClaudeOpus48Fast),
5186            "anthropic/claude-sonnet-4" => Ok(Self::AnthropicClaudeSonnet4),
5187            "anthropic/claude-sonnet-4.5" => Ok(Self::AnthropicClaudeSonnet45),
5188            "anthropic/claude-sonnet-4.6" => Ok(Self::AnthropicClaudeSonnet46),
5189            "anthropic/claude-sonnet-5" => Ok(Self::AnthropicClaudeSonnet5),
5190            "arcee-ai/trinity-large-thinking" => Ok(Self::ArceeAiTrinityLargeThinking),
5191            "arcee-ai/virtuoso-large" => Ok(Self::ArceeAiVirtuosoLarge),
5192            "bytedance-seed/seed-1.6" => Ok(Self::BytedanceSeedSeed16),
5193            "bytedance-seed/seed-1.6-flash" => Ok(Self::BytedanceSeedSeed16Flash),
5194            "bytedance-seed/seed-2.0-lite" => Ok(Self::BytedanceSeedSeed20Lite),
5195            "bytedance-seed/seed-2.0-mini" => Ok(Self::BytedanceSeedSeed20Mini),
5196            "cohere/command-r-08-2024" => Ok(Self::CohereCommandR082024),
5197            "cohere/command-r-plus-08-2024" => Ok(Self::CohereCommandRPlus082024),
5198            "cohere/north-mini-code:free" => Ok(Self::CohereNorthMiniCodeFree),
5199            "deepseek/deepseek-chat" => Ok(Self::DeepseekDeepseekChat),
5200            "deepseek/deepseek-chat-v3-0324" => Ok(Self::DeepseekDeepseekChatV30324),
5201            "deepseek/deepseek-chat-v3.1" => Ok(Self::DeepseekDeepseekChatV31),
5202            "deepseek/deepseek-r1" => Ok(Self::DeepseekDeepseekR1),
5203            "deepseek/deepseek-r1-0528" => Ok(Self::DeepseekDeepseekR10528),
5204            "deepseek/deepseek-v3.1-terminus" => Ok(Self::DeepseekDeepseekV31Terminus),
5205            "deepseek/deepseek-v3.2" => Ok(Self::DeepseekDeepseekV32),
5206            "deepseek/deepseek-v3.2-exp" => Ok(Self::DeepseekDeepseekV32Exp),
5207            "deepseek/deepseek-v4-flash" => Ok(Self::DeepseekDeepseekV4Flash),
5208            "deepseek/deepseek-v4-pro" => Ok(Self::DeepseekDeepseekV4Pro),
5209            "google/gemini-2.5-flash" => Ok(Self::GoogleGemini25Flash),
5210            "google/gemini-2.5-flash-lite" => Ok(Self::GoogleGemini25FlashLite),
5211            "google/gemini-2.5-pro" => Ok(Self::GoogleGemini25Pro),
5212            "google/gemini-2.5-pro-preview" => Ok(Self::GoogleGemini25ProPreview),
5213            "google/gemini-2.5-pro-preview-05-06" => {
5214                Ok(Self::GoogleGemini25ProPreview0506)
5215            }
5216            "google/gemini-3-flash-preview" => Ok(Self::GoogleGemini3FlashPreview),
5217            "google/gemini-3-pro-image" => Ok(Self::GoogleGemini3ProImage),
5218            "google/gemini-3.1-flash-lite" => Ok(Self::GoogleGemini31FlashLite),
5219            "google/gemini-3.1-flash-lite-preview" => {
5220                Ok(Self::GoogleGemini31FlashLitePreview)
5221            }
5222            "google/gemini-3.1-pro-preview" => Ok(Self::GoogleGemini31ProPreview),
5223            "google/gemini-3.1-pro-preview-customtools" => {
5224                Ok(Self::GoogleGemini31ProPreviewCustomtools)
5225            }
5226            "google/gemini-3.5-flash" => Ok(Self::GoogleGemini35Flash),
5227            "google/gemma-3-12b-it" => Ok(Self::GoogleGemma312bIt),
5228            "google/gemma-3-27b-it" => Ok(Self::GoogleGemma327bIt),
5229            "google/gemma-4-26b-a4b-it" => Ok(Self::GoogleGemma426bA4bIt),
5230            "google/gemma-4-26b-a4b-it:free" => Ok(Self::GoogleGemma426bA4bItFree),
5231            "google/gemma-4-31b-it" => Ok(Self::GoogleGemma431bIt),
5232            "google/gemma-4-31b-it:free" => Ok(Self::GoogleGemma431bItFree),
5233            "ibm-granite/granite-4.1-8b" => Ok(Self::IbmGraniteGranite418b),
5234            "inception/mercury-2" => Ok(Self::InceptionMercury2),
5235            "inclusionai/ling-2.6-1t" => Ok(Self::InclusionaiLing261t),
5236            "inclusionai/ling-2.6-flash" => Ok(Self::InclusionaiLing26Flash),
5237            "inclusionai/ring-2.6-1t" => Ok(Self::InclusionaiRing261t),
5238            "kwaipilot/kat-coder-air-v2.5" => Ok(Self::KwaipilotKatCoderAirV25),
5239            "kwaipilot/kat-coder-pro-v2" => Ok(Self::KwaipilotKatCoderProV2),
5240            "kwaipilot/kat-coder-pro-v2.5" => Ok(Self::KwaipilotKatCoderProV25),
5241            "meta-llama/llama-3.1-70b-instruct" => Ok(Self::MetaLlamaLlama3170bInstruct),
5242            "meta-llama/llama-3.1-8b-instruct" => Ok(Self::MetaLlamaLlama318bInstruct),
5243            "meta-llama/llama-3.3-70b-instruct" => Ok(Self::MetaLlamaLlama3370bInstruct),
5244            "meta-llama/llama-4-maverick" => Ok(Self::MetaLlamaLlama4Maverick),
5245            "meta-llama/llama-4-scout" => Ok(Self::MetaLlamaLlama4Scout),
5246            "meta/muse-spark-1.1" => Ok(Self::MetaMuseSpark11),
5247            "minimax/minimax-m1" => Ok(Self::MinimaxMinimaxM1),
5248            "minimax/minimax-m2" => Ok(Self::MinimaxMinimaxM2),
5249            "minimax/minimax-m2.1" => Ok(Self::MinimaxMinimaxM21),
5250            "minimax/minimax-m2.5" => Ok(Self::MinimaxMinimaxM25),
5251            "minimax/minimax-m2.7" => Ok(Self::MinimaxMinimaxM27),
5252            "minimax/minimax-m3" => Ok(Self::MinimaxMinimaxM3),
5253            "mistralai/codestral-2508" => Ok(Self::MistralaiCodestral2508),
5254            "mistralai/devstral-2512" => Ok(Self::MistralaiDevstral2512),
5255            "mistralai/ministral-14b-2512" => Ok(Self::MistralaiMinistral14b2512),
5256            "mistralai/ministral-3b-2512" => Ok(Self::MistralaiMinistral3b2512),
5257            "mistralai/ministral-8b-2512" => Ok(Self::MistralaiMinistral8b2512),
5258            "mistralai/mistral-large" => Ok(Self::MistralaiMistralLarge),
5259            "mistralai/mistral-large-2407" => Ok(Self::MistralaiMistralLarge2407),
5260            "mistralai/mistral-large-2512" => Ok(Self::MistralaiMistralLarge2512),
5261            "mistralai/mistral-medium-3" => Ok(Self::MistralaiMistralMedium3),
5262            "mistralai/mistral-medium-3-5" => Ok(Self::MistralaiMistralMedium35),
5263            "mistralai/mistral-medium-3.1" => Ok(Self::MistralaiMistralMedium31),
5264            "mistralai/mistral-nemo" => Ok(Self::MistralaiMistralNemo),
5265            "mistralai/mistral-saba" => Ok(Self::MistralaiMistralSaba),
5266            "mistralai/mistral-small-2603" => Ok(Self::MistralaiMistralSmall2603),
5267            "mistralai/mistral-small-3.2-24b-instruct" => {
5268                Ok(Self::MistralaiMistralSmall3224bInstruct)
5269            }
5270            "mistralai/mixtral-8x22b-instruct" => Ok(Self::MistralaiMixtral8x22bInstruct),
5271            "mistralai/voxtral-small-24b-2507" => Ok(Self::MistralaiVoxtralSmall24b2507),
5272            "moonshotai/kimi-k2" => Ok(Self::MoonshotaiKimiK2),
5273            "moonshotai/kimi-k2-0905" => Ok(Self::MoonshotaiKimiK20905),
5274            "moonshotai/kimi-k2-thinking" => Ok(Self::MoonshotaiKimiK2Thinking),
5275            "moonshotai/kimi-k2.5" => Ok(Self::MoonshotaiKimiK25),
5276            "moonshotai/kimi-k2.6" => Ok(Self::MoonshotaiKimiK26),
5277            "moonshotai/kimi-k2.7-code" => Ok(Self::MoonshotaiKimiK27Code),
5278            "moonshotai/kimi-k3" => Ok(Self::MoonshotaiKimiK3),
5279            "nex-agi/nex-n2-mini" => Ok(Self::NexAgiNexN2Mini),
5280            "nex-agi/nex-n2-pro" => Ok(Self::NexAgiNexN2Pro),
5281            "nvidia/nemotron-3-nano-30b-a3b" => Ok(Self::NvidiaNemotron3Nano30bA3b),
5282            "nvidia/nemotron-3-nano-30b-a3b:free" => {
5283                Ok(Self::NvidiaNemotron3Nano30bA3bFree)
5284            }
5285            "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free" => {
5286                Ok(Self::NvidiaNemotron3NanoOmni30bA3bReasoningFree)
5287            }
5288            "nvidia/nemotron-3-super-120b-a12b" => Ok(Self::NvidiaNemotron3Super120bA12b),
5289            "nvidia/nemotron-3-super-120b-a12b:free" => {
5290                Ok(Self::NvidiaNemotron3Super120bA12bFree)
5291            }
5292            "nvidia/nemotron-3-ultra-550b-a55b" => Ok(Self::NvidiaNemotron3Ultra550bA55b),
5293            "nvidia/nemotron-3-ultra-550b-a55b:free" => {
5294                Ok(Self::NvidiaNemotron3Ultra550bA55bFree)
5295            }
5296            "nvidia/nemotron-nano-12b-v2-vl:free" => {
5297                Ok(Self::NvidiaNemotronNano12bV2VlFree)
5298            }
5299            "nvidia/nemotron-nano-9b-v2:free" => Ok(Self::NvidiaNemotronNano9bV2Free),
5300            "openai/gpt-3.5-turbo" => Ok(Self::OpenaiGpt35Turbo),
5301            "openai/gpt-3.5-turbo-0613" => Ok(Self::OpenaiGpt35Turbo0613),
5302            "openai/gpt-3.5-turbo-16k" => Ok(Self::OpenaiGpt35Turbo16k),
5303            "openai/gpt-4" => Ok(Self::OpenaiGpt4),
5304            "openai/gpt-4-turbo" => Ok(Self::OpenaiGpt4Turbo),
5305            "openai/gpt-4-turbo-preview" => Ok(Self::OpenaiGpt4TurboPreview),
5306            "openai/gpt-4.1" => Ok(Self::OpenaiGpt41),
5307            "openai/gpt-4.1-mini" => Ok(Self::OpenaiGpt41Mini),
5308            "openai/gpt-4.1-nano" => Ok(Self::OpenaiGpt41Nano),
5309            "openai/gpt-4o" => Ok(Self::OpenaiGpt4o),
5310            "openai/gpt-4o-2024-05-13" => Ok(Self::OpenaiGpt4o20240513),
5311            "openai/gpt-4o-2024-08-06" => Ok(Self::OpenaiGpt4o20240806),
5312            "openai/gpt-4o-2024-11-20" => Ok(Self::OpenaiGpt4o20241120),
5313            "openai/gpt-4o-mini" => Ok(Self::OpenaiGpt4oMini),
5314            "openai/gpt-4o-mini-2024-07-18" => Ok(Self::OpenaiGpt4oMini20240718),
5315            "openai/gpt-5" => Ok(Self::OpenaiGpt5),
5316            "openai/gpt-5-codex" => Ok(Self::OpenaiGpt5Codex),
5317            "openai/gpt-5-mini" => Ok(Self::OpenaiGpt5Mini),
5318            "openai/gpt-5-nano" => Ok(Self::OpenaiGpt5Nano),
5319            "openai/gpt-5-pro" => Ok(Self::OpenaiGpt5Pro),
5320            "openai/gpt-5.1" => Ok(Self::OpenaiGpt51),
5321            "openai/gpt-5.1-chat" => Ok(Self::OpenaiGpt51Chat),
5322            "openai/gpt-5.1-codex" => Ok(Self::OpenaiGpt51Codex),
5323            "openai/gpt-5.1-codex-max" => Ok(Self::OpenaiGpt51CodexMax),
5324            "openai/gpt-5.1-codex-mini" => Ok(Self::OpenaiGpt51CodexMini),
5325            "openai/gpt-5.2" => Ok(Self::OpenaiGpt52),
5326            "openai/gpt-5.2-chat" => Ok(Self::OpenaiGpt52Chat),
5327            "openai/gpt-5.2-codex" => Ok(Self::OpenaiGpt52Codex),
5328            "openai/gpt-5.2-pro" => Ok(Self::OpenaiGpt52Pro),
5329            "openai/gpt-5.3-chat" => Ok(Self::OpenaiGpt53Chat),
5330            "openai/gpt-5.3-codex" => Ok(Self::OpenaiGpt53Codex),
5331            "openai/gpt-5.4" => Ok(Self::OpenaiGpt54),
5332            "openai/gpt-5.4-mini" => Ok(Self::OpenaiGpt54Mini),
5333            "openai/gpt-5.4-nano" => Ok(Self::OpenaiGpt54Nano),
5334            "openai/gpt-5.4-pro" => Ok(Self::OpenaiGpt54Pro),
5335            "openai/gpt-5.5" => Ok(Self::OpenaiGpt55),
5336            "openai/gpt-5.5-pro" => Ok(Self::OpenaiGpt55Pro),
5337            "openai/gpt-5.6-luna" => Ok(Self::OpenaiGpt56Luna),
5338            "openai/gpt-5.6-luna-pro" => Ok(Self::OpenaiGpt56LunaPro),
5339            "openai/gpt-5.6-sol" => Ok(Self::OpenaiGpt56Sol),
5340            "openai/gpt-5.6-sol-pro" => Ok(Self::OpenaiGpt56SolPro),
5341            "openai/gpt-5.6-terra" => Ok(Self::OpenaiGpt56Terra),
5342            "openai/gpt-5.6-terra-pro" => Ok(Self::OpenaiGpt56TerraPro),
5343            "openai/gpt-audio" => Ok(Self::OpenaiGptAudio),
5344            "openai/gpt-audio-mini" => Ok(Self::OpenaiGptAudioMini),
5345            "openai/gpt-oss-120b" => Ok(Self::OpenaiGptOss120b),
5346            "openai/gpt-oss-20b" => Ok(Self::OpenaiGptOss20b),
5347            "openai/gpt-oss-20b:free" => Ok(Self::OpenaiGptOss20bFree),
5348            "openai/gpt-oss-safeguard-20b" => Ok(Self::OpenaiGptOssSafeguard20b),
5349            "openai/o1" => Ok(Self::OpenaiO1),
5350            "openai/o3" => Ok(Self::OpenaiO3),
5351            "openai/o3-deep-research" => Ok(Self::OpenaiO3DeepResearch),
5352            "openai/o3-mini" => Ok(Self::OpenaiO3Mini),
5353            "openai/o3-mini-high" => Ok(Self::OpenaiO3MiniHigh),
5354            "openai/o3-pro" => Ok(Self::OpenaiO3Pro),
5355            "openai/o4-mini" => Ok(Self::OpenaiO4Mini),
5356            "openai/o4-mini-deep-research" => Ok(Self::OpenaiO4MiniDeepResearch),
5357            "openai/o4-mini-high" => Ok(Self::OpenaiO4MiniHigh),
5358            "openrouter/auto" => Ok(Self::OpenrouterAuto),
5359            "openrouter/free" => Ok(Self::OpenrouterFree),
5360            "poolside/laguna-m.1" => Ok(Self::PoolsideLagunaM1),
5361            "poolside/laguna-m.1:free" => Ok(Self::PoolsideLagunaM1Free),
5362            "poolside/laguna-xs-2.1" => Ok(Self::PoolsideLagunaXs21),
5363            "poolside/laguna-xs-2.1:free" => Ok(Self::PoolsideLagunaXs21Free),
5364            "qwen/qwen-2.5-72b-instruct" => Ok(Self::QwenQwen2572bInstruct),
5365            "qwen/qwen-2.5-7b-instruct" => Ok(Self::QwenQwen257bInstruct),
5366            "qwen/qwen-plus" => Ok(Self::QwenQwenPlus),
5367            "qwen/qwen-plus-2025-07-28" => Ok(Self::QwenQwenPlus20250728),
5368            "qwen/qwen-plus-2025-07-28:thinking" => {
5369                Ok(Self::QwenQwenPlus20250728Thinking)
5370            }
5371            "qwen/qwen3-14b" => Ok(Self::QwenQwen314b),
5372            "qwen/qwen3-235b-a22b" => Ok(Self::QwenQwen3235bA22b),
5373            "qwen/qwen3-235b-a22b-2507" => Ok(Self::QwenQwen3235bA22b2507),
5374            "qwen/qwen3-235b-a22b-thinking-2507" => {
5375                Ok(Self::QwenQwen3235bA22bThinking2507)
5376            }
5377            "qwen/qwen3-30b-a3b" => Ok(Self::QwenQwen330bA3b),
5378            "qwen/qwen3-30b-a3b-instruct-2507" => Ok(Self::QwenQwen330bA3bInstruct2507),
5379            "qwen/qwen3-30b-a3b-thinking-2507" => Ok(Self::QwenQwen330bA3bThinking2507),
5380            "qwen/qwen3-32b" => Ok(Self::QwenQwen332b),
5381            "qwen/qwen3-8b" => Ok(Self::QwenQwen38b),
5382            "qwen/qwen3-coder" => Ok(Self::QwenQwen3Coder),
5383            "qwen/qwen3-coder-30b-a3b-instruct" => Ok(Self::QwenQwen3Coder30bA3bInstruct),
5384            "qwen/qwen3-coder-flash" => Ok(Self::QwenQwen3CoderFlash),
5385            "qwen/qwen3-coder-next" => Ok(Self::QwenQwen3CoderNext),
5386            "qwen/qwen3-coder-plus" => Ok(Self::QwenQwen3CoderPlus),
5387            "qwen/qwen3-max" => Ok(Self::QwenQwen3Max),
5388            "qwen/qwen3-max-thinking" => Ok(Self::QwenQwen3MaxThinking),
5389            "qwen/qwen3-next-80b-a3b-instruct" => Ok(Self::QwenQwen3Next80bA3bInstruct),
5390            "qwen/qwen3-next-80b-a3b-thinking" => Ok(Self::QwenQwen3Next80bA3bThinking),
5391            "qwen/qwen3-vl-235b-a22b-instruct" => Ok(Self::QwenQwen3Vl235bA22bInstruct),
5392            "qwen/qwen3-vl-235b-a22b-thinking" => Ok(Self::QwenQwen3Vl235bA22bThinking),
5393            "qwen/qwen3-vl-30b-a3b-instruct" => Ok(Self::QwenQwen3Vl30bA3bInstruct),
5394            "qwen/qwen3-vl-30b-a3b-thinking" => Ok(Self::QwenQwen3Vl30bA3bThinking),
5395            "qwen/qwen3-vl-32b-instruct" => Ok(Self::QwenQwen3Vl32bInstruct),
5396            "qwen/qwen3-vl-8b-instruct" => Ok(Self::QwenQwen3Vl8bInstruct),
5397            "qwen/qwen3-vl-8b-thinking" => Ok(Self::QwenQwen3Vl8bThinking),
5398            "qwen/qwen3.5-122b-a10b" => Ok(Self::QwenQwen35122bA10b),
5399            "qwen/qwen3.5-27b" => Ok(Self::QwenQwen3527b),
5400            "qwen/qwen3.5-35b-a3b" => Ok(Self::QwenQwen3535bA3b),
5401            "qwen/qwen3.5-397b-a17b" => Ok(Self::QwenQwen35397bA17b),
5402            "qwen/qwen3.5-9b" => Ok(Self::QwenQwen359b),
5403            "qwen/qwen3.5-flash-02-23" => Ok(Self::QwenQwen35Flash0223),
5404            "qwen/qwen3.5-plus-02-15" => Ok(Self::QwenQwen35Plus0215),
5405            "qwen/qwen3.5-plus-20260420" => Ok(Self::QwenQwen35Plus20260420),
5406            "qwen/qwen3.6-27b" => Ok(Self::QwenQwen3627b),
5407            "qwen/qwen3.6-35b-a3b" => Ok(Self::QwenQwen3635bA3b),
5408            "qwen/qwen3.6-flash" => Ok(Self::QwenQwen36Flash),
5409            "qwen/qwen3.6-max-preview" => Ok(Self::QwenQwen36MaxPreview),
5410            "qwen/qwen3.6-plus" => Ok(Self::QwenQwen36Plus),
5411            "qwen/qwen3.7-max" => Ok(Self::QwenQwen37Max),
5412            "qwen/qwen3.7-plus" => Ok(Self::QwenQwen37Plus),
5413            "rekaai/reka-edge" => Ok(Self::RekaaiRekaEdge),
5414            "relace/relace-search" => Ok(Self::RelaceRelaceSearch),
5415            "sakana/fugu-ultra" => Ok(Self::SakanaFuguUltra),
5416            "sao10k/l3.1-euryale-70b" => Ok(Self::Sao10kL31Euryale70b),
5417            "stepfun/step-3.5-flash" => Ok(Self::StepfunStep35Flash),
5418            "stepfun/step-3.7-flash" => Ok(Self::StepfunStep37Flash),
5419            "tencent/hy3" => Ok(Self::TencentHy3),
5420            "tencent/hy3-preview" => Ok(Self::TencentHy3Preview),
5421            "tencent/hy3:free" => Ok(Self::TencentHy3Free),
5422            "thedrummer/unslopnemo-12b" => Ok(Self::ThedrummerUnslopnemo12b),
5423            "thinkingmachines/inkling" => Ok(Self::ThinkingmachinesInkling),
5424            "upstage/solar-pro-3" => Ok(Self::UpstageSolarPro3),
5425            "x-ai/grok-4.20" => Ok(Self::XAiGrok420),
5426            "x-ai/grok-4.3" => Ok(Self::XAiGrok43),
5427            "x-ai/grok-4.5" => Ok(Self::XAiGrok45),
5428            "x-ai/grok-build-0.1" => Ok(Self::XAiGrokBuild01),
5429            "xiaomi/mimo-v2.5" => Ok(Self::XiaomiMimoV25),
5430            "xiaomi/mimo-v2.5-pro" => Ok(Self::XiaomiMimoV25Pro),
5431            "z-ai/glm-4.5" => Ok(Self::ZAiGlm45),
5432            "z-ai/glm-4.5-air" => Ok(Self::ZAiGlm45Air),
5433            "z-ai/glm-4.5v" => Ok(Self::ZAiGlm45v),
5434            "z-ai/glm-4.6" => Ok(Self::ZAiGlm46),
5435            "z-ai/glm-4.6v" => Ok(Self::ZAiGlm46v),
5436            "z-ai/glm-4.7" => Ok(Self::ZAiGlm47),
5437            "z-ai/glm-4.7-flash" => Ok(Self::ZAiGlm47Flash),
5438            "z-ai/glm-5" => Ok(Self::ZAiGlm5),
5439            "z-ai/glm-5-turbo" => Ok(Self::ZAiGlm5Turbo),
5440            "z-ai/glm-5.1" => Ok(Self::ZAiGlm51),
5441            "z-ai/glm-5.2" => Ok(Self::ZAiGlm52),
5442            "z-ai/glm-5v-turbo" => Ok(Self::ZAiGlm5vTurbo),
5443            _ => Err(format!("Unknown openrouter model: '{s}'")),
5444        }
5445    }
5446}
5447impl ZAiModel {
5448    #[allow(clippy::too_many_lines)]
5449    fn model_id(self) -> &'static str {
5450        match self {
5451            Self::Glm45 => "glm-4.5",
5452            Self::Glm45Air => "glm-4.5-air",
5453            Self::Glm45Flash => "glm-4.5-flash",
5454            Self::Glm45v => "glm-4.5v",
5455            Self::Glm46 => "glm-4.6",
5456            Self::Glm46v => "glm-4.6v",
5457            Self::Glm47 => "glm-4.7",
5458            Self::Glm47Flash => "glm-4.7-flash",
5459            Self::Glm47Flashx => "glm-4.7-flashx",
5460            Self::Glm5 => "glm-5",
5461            Self::Glm5Turbo => "glm-5-turbo",
5462            Self::Glm51 => "glm-5.1",
5463            Self::Glm52 => "glm-5.2",
5464            Self::Glm5vTurbo => "glm-5v-turbo",
5465        }
5466    }
5467    #[allow(clippy::too_many_lines)]
5468    fn display_name(self) -> &'static str {
5469        match self {
5470            Self::Glm45 => "GLM-4.5",
5471            Self::Glm45Air => "GLM-4.5-Air",
5472            Self::Glm45Flash => "GLM-4.5-Flash",
5473            Self::Glm45v => "GLM-4.5V",
5474            Self::Glm46 => "GLM-4.6",
5475            Self::Glm46v => "GLM-4.6V",
5476            Self::Glm47 => "GLM-4.7",
5477            Self::Glm47Flash => "GLM-4.7-Flash",
5478            Self::Glm47Flashx => "GLM-4.7-FlashX",
5479            Self::Glm5 => "GLM-5",
5480            Self::Glm5Turbo => "GLM-5-Turbo",
5481            Self::Glm51 => "GLM-5.1",
5482            Self::Glm52 => "GLM-5.2",
5483            Self::Glm5vTurbo => "GLM-5V-Turbo",
5484        }
5485    }
5486    #[allow(clippy::too_many_lines)]
5487    fn context_window(self) -> u32 {
5488        match self {
5489            Self::Glm45v => 64_000,
5490            Self::Glm46v => 128_000,
5491            Self::Glm45 | Self::Glm45Air | Self::Glm45Flash => 131_072,
5492            Self::Glm47Flash
5493            | Self::Glm47Flashx
5494            | Self::Glm5Turbo
5495            | Self::Glm51
5496            | Self::Glm5vTurbo => 200_000,
5497            Self::Glm46 | Self::Glm47 | Self::Glm5 => 204_800,
5498            Self::Glm52 => 1_000_000,
5499        }
5500    }
5501    #[allow(clippy::too_many_lines)]
5502    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
5503        match self {
5504            Self::Glm52 => &[ReasoningEffort::High, ReasoningEffort::Max],
5505            Self::Glm45
5506            | Self::Glm45Air
5507            | Self::Glm45Flash
5508            | Self::Glm45v
5509            | Self::Glm46
5510            | Self::Glm46v
5511            | Self::Glm47
5512            | Self::Glm47Flash
5513            | Self::Glm47Flashx
5514            | Self::Glm5
5515            | Self::Glm5Turbo
5516            | Self::Glm51
5517            | Self::Glm5vTurbo => {
5518                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
5519            }
5520        }
5521    }
5522    pub fn supports_reasoning(self) -> bool {
5523        !self.reasoning_levels().is_empty()
5524    }
5525    #[allow(clippy::too_many_lines)]
5526    pub fn supports_prompt_caching(self) -> bool {
5527        match self {
5528            Self::Glm45v | Self::Glm46v => false,
5529            Self::Glm45
5530            | Self::Glm45Air
5531            | Self::Glm45Flash
5532            | Self::Glm46
5533            | Self::Glm47
5534            | Self::Glm47Flash
5535            | Self::Glm47Flashx
5536            | Self::Glm5
5537            | Self::Glm5Turbo
5538            | Self::Glm51
5539            | Self::Glm52
5540            | Self::Glm5vTurbo => true,
5541        }
5542    }
5543    #[allow(clippy::too_many_lines)]
5544    pub fn supports_image(self) -> bool {
5545        match self {
5546            Self::Glm45
5547            | Self::Glm45Air
5548            | Self::Glm45Flash
5549            | Self::Glm46
5550            | Self::Glm47
5551            | Self::Glm47Flash
5552            | Self::Glm47Flashx
5553            | Self::Glm5
5554            | Self::Glm5Turbo
5555            | Self::Glm51
5556            | Self::Glm52 => false,
5557            Self::Glm45v | Self::Glm46v | Self::Glm5vTurbo => true,
5558        }
5559    }
5560    #[allow(clippy::too_many_lines)]
5561    pub fn supports_audio(self) -> bool {
5562        match self {
5563            Self::Glm45
5564            | Self::Glm45Air
5565            | Self::Glm45Flash
5566            | Self::Glm45v
5567            | Self::Glm46
5568            | Self::Glm46v
5569            | Self::Glm47
5570            | Self::Glm47Flash
5571            | Self::Glm47Flashx
5572            | Self::Glm5
5573            | Self::Glm5Turbo
5574            | Self::Glm51
5575            | Self::Glm52
5576            | Self::Glm5vTurbo => false,
5577        }
5578    }
5579    const ALL: &[ZAiModel] = &[
5580        Self::Glm45,
5581        Self::Glm45Air,
5582        Self::Glm45Flash,
5583        Self::Glm45v,
5584        Self::Glm46,
5585        Self::Glm46v,
5586        Self::Glm47,
5587        Self::Glm47Flash,
5588        Self::Glm47Flashx,
5589        Self::Glm5,
5590        Self::Glm5Turbo,
5591        Self::Glm51,
5592        Self::Glm52,
5593        Self::Glm5vTurbo,
5594    ];
5595}
5596impl std::str::FromStr for ZAiModel {
5597    type Err = String;
5598    #[allow(clippy::too_many_lines)]
5599    fn from_str(s: &str) -> Result<Self, Self::Err> {
5600        match s {
5601            "glm-4.5" => Ok(Self::Glm45),
5602            "glm-4.5-air" => Ok(Self::Glm45Air),
5603            "glm-4.5-flash" => Ok(Self::Glm45Flash),
5604            "glm-4.5v" => Ok(Self::Glm45v),
5605            "glm-4.6" => Ok(Self::Glm46),
5606            "glm-4.6v" => Ok(Self::Glm46v),
5607            "glm-4.7" => Ok(Self::Glm47),
5608            "glm-4.7-flash" => Ok(Self::Glm47Flash),
5609            "glm-4.7-flashx" => Ok(Self::Glm47Flashx),
5610            "glm-5" => Ok(Self::Glm5),
5611            "glm-5-turbo" => Ok(Self::Glm5Turbo),
5612            "glm-5.1" => Ok(Self::Glm51),
5613            "glm-5.2" => Ok(Self::Glm52),
5614            "glm-5v-turbo" => Ok(Self::Glm5vTurbo),
5615            _ => Err(format!("Unknown zai model: '{s}'")),
5616        }
5617    }
5618}
5619impl BedrockFoundationModel {
5620    #[allow(clippy::too_many_lines)]
5621    fn model_id(self) -> &'static str {
5622        match self {
5623            Self::AmazonNova2LiteV10 => "amazon.nova-2-lite-v1:0",
5624            Self::AmazonNovaLiteV10 => "amazon.nova-lite-v1:0",
5625            Self::AmazonNovaMicroV10 => "amazon.nova-micro-v1:0",
5626            Self::AmazonNovaProV10 => "amazon.nova-pro-v1:0",
5627            Self::AnthropicClaudeFable5 => "anthropic.claude-fable-5",
5628            Self::AnthropicClaudeHaiku4520251001V10 => {
5629                "anthropic.claude-haiku-4-5-20251001-v1:0"
5630            }
5631            Self::AnthropicClaudeOpus4120250805V10 => {
5632                "anthropic.claude-opus-4-1-20250805-v1:0"
5633            }
5634            Self::AnthropicClaudeOpus4520251101V10 => {
5635                "anthropic.claude-opus-4-5-20251101-v1:0"
5636            }
5637            Self::AnthropicClaudeOpus46V1 => "anthropic.claude-opus-4-6-v1",
5638            Self::AnthropicClaudeOpus47 => "anthropic.claude-opus-4-7",
5639            Self::AnthropicClaudeOpus48 => "anthropic.claude-opus-4-8",
5640            Self::AnthropicClaudeSonnet4520250929V10 => {
5641                "anthropic.claude-sonnet-4-5-20250929-v1:0"
5642            }
5643            Self::AnthropicClaudeSonnet46 => "anthropic.claude-sonnet-4-6",
5644            Self::AnthropicClaudeSonnet5 => "anthropic.claude-sonnet-5",
5645            Self::AuAnthropicClaudeHaiku4520251001V10 => {
5646                "au.anthropic.claude-haiku-4-5-20251001-v1:0"
5647            }
5648            Self::AuAnthropicClaudeOpus46V1 => "au.anthropic.claude-opus-4-6-v1",
5649            Self::AuAnthropicClaudeOpus48 => "au.anthropic.claude-opus-4-8",
5650            Self::AuAnthropicClaudeSonnet4520250929V10 => {
5651                "au.anthropic.claude-sonnet-4-5-20250929-v1:0"
5652            }
5653            Self::AuAnthropicClaudeSonnet46 => "au.anthropic.claude-sonnet-4-6",
5654            Self::AuAnthropicClaudeSonnet5 => "au.anthropic.claude-sonnet-5",
5655            Self::DeepseekR1V10 => "deepseek.r1-v1:0",
5656            Self::DeepseekV3V10 => "deepseek.v3-v1:0",
5657            Self::DeepseekV32 => "deepseek.v3.2",
5658            Self::EuAnthropicClaudeFable5 => "eu.anthropic.claude-fable-5",
5659            Self::EuAnthropicClaudeHaiku4520251001V10 => {
5660                "eu.anthropic.claude-haiku-4-5-20251001-v1:0"
5661            }
5662            Self::EuAnthropicClaudeOpus4520251101V10 => {
5663                "eu.anthropic.claude-opus-4-5-20251101-v1:0"
5664            }
5665            Self::EuAnthropicClaudeOpus46V1 => "eu.anthropic.claude-opus-4-6-v1",
5666            Self::EuAnthropicClaudeOpus47 => "eu.anthropic.claude-opus-4-7",
5667            Self::EuAnthropicClaudeOpus48 => "eu.anthropic.claude-opus-4-8",
5668            Self::EuAnthropicClaudeSonnet4520250929V10 => {
5669                "eu.anthropic.claude-sonnet-4-5-20250929-v1:0"
5670            }
5671            Self::EuAnthropicClaudeSonnet46 => "eu.anthropic.claude-sonnet-4-6",
5672            Self::EuAnthropicClaudeSonnet5 => "eu.anthropic.claude-sonnet-5",
5673            Self::GlobalAnthropicClaudeFable5 => "global.anthropic.claude-fable-5",
5674            Self::GlobalAnthropicClaudeHaiku4520251001V10 => {
5675                "global.anthropic.claude-haiku-4-5-20251001-v1:0"
5676            }
5677            Self::GlobalAnthropicClaudeOpus4520251101V10 => {
5678                "global.anthropic.claude-opus-4-5-20251101-v1:0"
5679            }
5680            Self::GlobalAnthropicClaudeOpus46V1 => "global.anthropic.claude-opus-4-6-v1",
5681            Self::GlobalAnthropicClaudeOpus47 => "global.anthropic.claude-opus-4-7",
5682            Self::GlobalAnthropicClaudeOpus48 => "global.anthropic.claude-opus-4-8",
5683            Self::GlobalAnthropicClaudeSonnet4520250929V10 => {
5684                "global.anthropic.claude-sonnet-4-5-20250929-v1:0"
5685            }
5686            Self::GlobalAnthropicClaudeSonnet46 => "global.anthropic.claude-sonnet-4-6",
5687            Self::GlobalAnthropicClaudeSonnet5 => "global.anthropic.claude-sonnet-5",
5688            Self::GoogleGemma327bIt => "google.gemma-3-27b-it",
5689            Self::GoogleGemma34bIt => "google.gemma-3-4b-it",
5690            Self::JpAnthropicClaudeHaiku4520251001V10 => {
5691                "jp.anthropic.claude-haiku-4-5-20251001-v1:0"
5692            }
5693            Self::JpAnthropicClaudeOpus47 => "jp.anthropic.claude-opus-4-7",
5694            Self::JpAnthropicClaudeOpus48 => "jp.anthropic.claude-opus-4-8",
5695            Self::JpAnthropicClaudeSonnet4520250929V10 => {
5696                "jp.anthropic.claude-sonnet-4-5-20250929-v1:0"
5697            }
5698            Self::JpAnthropicClaudeSonnet46 => "jp.anthropic.claude-sonnet-4-6",
5699            Self::JpAnthropicClaudeSonnet5 => "jp.anthropic.claude-sonnet-5",
5700            Self::MetaLlama3170bInstructV10 => "meta.llama3-1-70b-instruct-v1:0",
5701            Self::MetaLlama318bInstructV10 => "meta.llama3-1-8b-instruct-v1:0",
5702            Self::MetaLlama3370bInstructV10 => "meta.llama3-3-70b-instruct-v1:0",
5703            Self::MetaLlama4Maverick17bInstructV10 => {
5704                "meta.llama4-maverick-17b-instruct-v1:0"
5705            }
5706            Self::MetaLlama4Scout17bInstructV10 => "meta.llama4-scout-17b-instruct-v1:0",
5707            Self::MinimaxMinimaxM2 => "minimax.minimax-m2",
5708            Self::MinimaxMinimaxM21 => "minimax.minimax-m2.1",
5709            Self::MinimaxMinimaxM25 => "minimax.minimax-m2.5",
5710            Self::MistralDevstral2123b => "mistral.devstral-2-123b",
5711            Self::MistralMagistralSmall2509 => "mistral.magistral-small-2509",
5712            Self::MistralMinistral314bInstruct => "mistral.ministral-3-14b-instruct",
5713            Self::MistralMinistral33bInstruct => "mistral.ministral-3-3b-instruct",
5714            Self::MistralMinistral38bInstruct => "mistral.ministral-3-8b-instruct",
5715            Self::MistralMistralLarge3675bInstruct => {
5716                "mistral.mistral-large-3-675b-instruct"
5717            }
5718            Self::MistralPixtralLarge2502V10 => "mistral.pixtral-large-2502-v1:0",
5719            Self::MistralVoxtralMini3b2507 => "mistral.voxtral-mini-3b-2507",
5720            Self::MistralVoxtralSmall24b2507 => "mistral.voxtral-small-24b-2507",
5721            Self::MoonshotKimiK2Thinking => "moonshot.kimi-k2-thinking",
5722            Self::MoonshotaiKimiK25 => "moonshotai.kimi-k2.5",
5723            Self::NvidiaNemotronNano12bV2 => "nvidia.nemotron-nano-12b-v2",
5724            Self::NvidiaNemotronNano330b => "nvidia.nemotron-nano-3-30b",
5725            Self::NvidiaNemotronNano9bV2 => "nvidia.nemotron-nano-9b-v2",
5726            Self::NvidiaNemotronSuper3120b => "nvidia.nemotron-super-3-120b",
5727            Self::OpenaiGpt54 => "openai.gpt-5.4",
5728            Self::OpenaiGpt55 => "openai.gpt-5.5",
5729            Self::OpenaiGpt56Luna => "openai.gpt-5.6-luna",
5730            Self::OpenaiGpt56Sol => "openai.gpt-5.6-sol",
5731            Self::OpenaiGpt56Terra => "openai.gpt-5.6-terra",
5732            Self::OpenaiGptOss120b => "openai.gpt-oss-120b",
5733            Self::OpenaiGptOss120b10 => "openai.gpt-oss-120b-1:0",
5734            Self::OpenaiGptOss20b => "openai.gpt-oss-20b",
5735            Self::OpenaiGptOss20b10 => "openai.gpt-oss-20b-1:0",
5736            Self::OpenaiGptOssSafeguard120b => "openai.gpt-oss-safeguard-120b",
5737            Self::OpenaiGptOssSafeguard20b => "openai.gpt-oss-safeguard-20b",
5738            Self::QwenQwen3235bA22b2507V10 => "qwen.qwen3-235b-a22b-2507-v1:0",
5739            Self::QwenQwen332bV10 => "qwen.qwen3-32b-v1:0",
5740            Self::QwenQwen3Coder30bA3bV10 => "qwen.qwen3-coder-30b-a3b-v1:0",
5741            Self::QwenQwen3Coder480bA35bV10 => "qwen.qwen3-coder-480b-a35b-v1:0",
5742            Self::QwenQwen3CoderNext => "qwen.qwen3-coder-next",
5743            Self::QwenQwen3Next80bA3b => "qwen.qwen3-next-80b-a3b",
5744            Self::QwenQwen3Vl235bA22b => "qwen.qwen3-vl-235b-a22b",
5745            Self::UsAnthropicClaudeFable5 => "us.anthropic.claude-fable-5",
5746            Self::UsAnthropicClaudeHaiku4520251001V10 => {
5747                "us.anthropic.claude-haiku-4-5-20251001-v1:0"
5748            }
5749            Self::UsAnthropicClaudeOpus4120250805V10 => {
5750                "us.anthropic.claude-opus-4-1-20250805-v1:0"
5751            }
5752            Self::UsAnthropicClaudeOpus4520251101V10 => {
5753                "us.anthropic.claude-opus-4-5-20251101-v1:0"
5754            }
5755            Self::UsAnthropicClaudeOpus46V1 => "us.anthropic.claude-opus-4-6-v1",
5756            Self::UsAnthropicClaudeOpus47 => "us.anthropic.claude-opus-4-7",
5757            Self::UsAnthropicClaudeOpus48 => "us.anthropic.claude-opus-4-8",
5758            Self::UsAnthropicClaudeSonnet4520250929V10 => {
5759                "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
5760            }
5761            Self::UsAnthropicClaudeSonnet46 => "us.anthropic.claude-sonnet-4-6",
5762            Self::UsAnthropicClaudeSonnet5 => "us.anthropic.claude-sonnet-5",
5763            Self::UsDeepseekR1V10 => "us.deepseek.r1-v1:0",
5764            Self::UsMetaLlama4Maverick17bInstructV10 => {
5765                "us.meta.llama4-maverick-17b-instruct-v1:0"
5766            }
5767            Self::UsMetaLlama4Scout17bInstructV10 => {
5768                "us.meta.llama4-scout-17b-instruct-v1:0"
5769            }
5770            Self::WriterPalmyraX4V10 => "writer.palmyra-x4-v1:0",
5771            Self::WriterPalmyraX5V10 => "writer.palmyra-x5-v1:0",
5772            Self::XaiGrok43 => "xai.grok-4.3",
5773            Self::ZaiGlm47 => "zai.glm-4.7",
5774            Self::ZaiGlm47Flash => "zai.glm-4.7-flash",
5775            Self::ZaiGlm5 => "zai.glm-5",
5776        }
5777    }
5778    #[allow(clippy::too_many_lines)]
5779    fn display_name(self) -> &'static str {
5780        match self {
5781            Self::AuAnthropicClaudeOpus46V1 => "AU Anthropic Claude Opus 4.6",
5782            Self::AuAnthropicClaudeSonnet46 => "AU Anthropic Claude Sonnet 4.6",
5783            Self::AnthropicClaudeFable5 => "Claude Fable 5",
5784            Self::EuAnthropicClaudeFable5 => "Claude Fable 5 (EU)",
5785            Self::GlobalAnthropicClaudeFable5 => "Claude Fable 5 (Global)",
5786            Self::UsAnthropicClaudeFable5 => "Claude Fable 5 (US)",
5787            Self::AnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5",
5788            Self::AuAnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5 (AU)",
5789            Self::EuAnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5 (EU)",
5790            Self::GlobalAnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5 (Global)",
5791            Self::JpAnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5 (JP)",
5792            Self::UsAnthropicClaudeHaiku4520251001V10 => "Claude Haiku 4.5 (US)",
5793            Self::AnthropicClaudeOpus4120250805V10 => "Claude Opus 4.1",
5794            Self::UsAnthropicClaudeOpus4120250805V10 => "Claude Opus 4.1 (US)",
5795            Self::AnthropicClaudeOpus4520251101V10 => "Claude Opus 4.5",
5796            Self::EuAnthropicClaudeOpus4520251101V10 => "Claude Opus 4.5 (EU)",
5797            Self::GlobalAnthropicClaudeOpus4520251101V10 => "Claude Opus 4.5 (Global)",
5798            Self::UsAnthropicClaudeOpus4520251101V10 => "Claude Opus 4.5 (US)",
5799            Self::AnthropicClaudeOpus46V1 => "Claude Opus 4.6",
5800            Self::EuAnthropicClaudeOpus46V1 => "Claude Opus 4.6 (EU)",
5801            Self::GlobalAnthropicClaudeOpus46V1 => "Claude Opus 4.6 (Global)",
5802            Self::UsAnthropicClaudeOpus46V1 => "Claude Opus 4.6 (US)",
5803            Self::AnthropicClaudeOpus47 => "Claude Opus 4.7",
5804            Self::EuAnthropicClaudeOpus47 => "Claude Opus 4.7 (EU)",
5805            Self::GlobalAnthropicClaudeOpus47 => "Claude Opus 4.7 (Global)",
5806            Self::JpAnthropicClaudeOpus47 => "Claude Opus 4.7 (JP)",
5807            Self::UsAnthropicClaudeOpus47 => "Claude Opus 4.7 (US)",
5808            Self::AnthropicClaudeOpus48 => "Claude Opus 4.8",
5809            Self::AuAnthropicClaudeOpus48 => "Claude Opus 4.8 (AU)",
5810            Self::EuAnthropicClaudeOpus48 => "Claude Opus 4.8 (EU)",
5811            Self::GlobalAnthropicClaudeOpus48 => "Claude Opus 4.8 (Global)",
5812            Self::JpAnthropicClaudeOpus48 => "Claude Opus 4.8 (JP)",
5813            Self::UsAnthropicClaudeOpus48 => "Claude Opus 4.8 (US)",
5814            Self::AnthropicClaudeSonnet4520250929V10 => "Claude Sonnet 4.5",
5815            Self::AuAnthropicClaudeSonnet4520250929V10 => "Claude Sonnet 4.5 (AU)",
5816            Self::EuAnthropicClaudeSonnet4520250929V10 => "Claude Sonnet 4.5 (EU)",
5817            Self::GlobalAnthropicClaudeSonnet4520250929V10 => {
5818                "Claude Sonnet 4.5 (Global)"
5819            }
5820            Self::JpAnthropicClaudeSonnet4520250929V10 => "Claude Sonnet 4.5 (JP)",
5821            Self::UsAnthropicClaudeSonnet4520250929V10 => "Claude Sonnet 4.5 (US)",
5822            Self::AnthropicClaudeSonnet46 => "Claude Sonnet 4.6",
5823            Self::EuAnthropicClaudeSonnet46 => "Claude Sonnet 4.6 (EU)",
5824            Self::GlobalAnthropicClaudeSonnet46 => "Claude Sonnet 4.6 (Global)",
5825            Self::JpAnthropicClaudeSonnet46 => "Claude Sonnet 4.6 (JP)",
5826            Self::UsAnthropicClaudeSonnet46 => "Claude Sonnet 4.6 (US)",
5827            Self::AnthropicClaudeSonnet5 => "Claude Sonnet 5",
5828            Self::AuAnthropicClaudeSonnet5 => "Claude Sonnet 5 (AU)",
5829            Self::EuAnthropicClaudeSonnet5 => "Claude Sonnet 5 (EU)",
5830            Self::GlobalAnthropicClaudeSonnet5 => "Claude Sonnet 5 (Global)",
5831            Self::JpAnthropicClaudeSonnet5 => "Claude Sonnet 5 (JP)",
5832            Self::UsAnthropicClaudeSonnet5 => "Claude Sonnet 5 (US)",
5833            Self::DeepseekR1V10 => "DeepSeek-R1",
5834            Self::UsDeepseekR1V10 => "DeepSeek-R1 (US)",
5835            Self::DeepseekV3V10 => "DeepSeek-V3.1",
5836            Self::DeepseekV32 => "DeepSeek-V3.2",
5837            Self::MistralDevstral2123b => "Devstral 2 123B",
5838            Self::ZaiGlm47 => "GLM-4.7",
5839            Self::ZaiGlm47Flash => "GLM-4.7-Flash",
5840            Self::ZaiGlm5 => "GLM-5",
5841            Self::OpenaiGptOssSafeguard120b => "GPT OSS Safeguard 120B",
5842            Self::OpenaiGptOssSafeguard20b => "GPT OSS Safeguard 20B",
5843            Self::OpenaiGpt54 => "GPT-5.4",
5844            Self::OpenaiGpt55 => "GPT-5.5",
5845            Self::OpenaiGpt56Luna => "GPT-5.6 Luna",
5846            Self::OpenaiGpt56Sol => "GPT-5.6 Sol",
5847            Self::OpenaiGpt56Terra => "GPT-5.6 Terra",
5848            Self::GoogleGemma34bIt => "Gemma 3 4B IT",
5849            Self::GoogleGemma327bIt => "Google Gemma 3 27B Instruct",
5850            Self::XaiGrok43 => "Grok 4.3",
5851            Self::MoonshotKimiK2Thinking => "Kimi K2 Thinking",
5852            Self::MoonshotaiKimiK25 => "Kimi K2.5",
5853            Self::MetaLlama3170bInstructV10 => "Llama 3.1 70B Instruct",
5854            Self::MetaLlama318bInstructV10 => "Llama 3.1 8B Instruct",
5855            Self::MetaLlama3370bInstructV10 => "Llama 3.3 70B Instruct",
5856            Self::MetaLlama4Maverick17bInstructV10 => "Llama 4 Maverick 17B Instruct",
5857            Self::UsMetaLlama4Maverick17bInstructV10 => {
5858                "Llama 4 Maverick 17B Instruct (US)"
5859            }
5860            Self::MetaLlama4Scout17bInstructV10 => "Llama 4 Scout 17B Instruct",
5861            Self::UsMetaLlama4Scout17bInstructV10 => "Llama 4 Scout 17B Instruct (US)",
5862            Self::MistralMagistralSmall2509 => "Magistral Small 1.2",
5863            Self::MinimaxMinimaxM2 => "MiniMax M2",
5864            Self::MinimaxMinimaxM21 => "MiniMax M2.1",
5865            Self::MinimaxMinimaxM25 => "MiniMax M2.5",
5866            Self::MistralMinistral314bInstruct => "Ministral 14B 3.0",
5867            Self::MistralMinistral33bInstruct => "Ministral 3 3B",
5868            Self::MistralMinistral38bInstruct => "Ministral 3 8B",
5869            Self::MistralMistralLarge3675bInstruct => "Mistral Large 3",
5870            Self::NvidiaNemotronSuper3120b => "NVIDIA Nemotron 3 Super 120B A12B",
5871            Self::NvidiaNemotronNano12bV2 => "NVIDIA Nemotron Nano 12B v2 VL BF16",
5872            Self::NvidiaNemotronNano330b => "NVIDIA Nemotron Nano 3 30B",
5873            Self::NvidiaNemotronNano9bV2 => "NVIDIA Nemotron Nano 9B v2",
5874            Self::AmazonNova2LiteV10 => "Nova 2 Lite",
5875            Self::AmazonNovaLiteV10 => "Nova Lite",
5876            Self::AmazonNovaMicroV10 => "Nova Micro",
5877            Self::AmazonNovaProV10 => "Nova Pro",
5878            Self::WriterPalmyraX4V10 => "Palmyra X4",
5879            Self::WriterPalmyraX5V10 => "Palmyra X5",
5880            Self::MistralPixtralLarge2502V10 => "Pixtral Large (25.02)",
5881            Self::QwenQwen3Next80bA3b => "Qwen/Qwen3-Next-80B-A3B-Instruct",
5882            Self::QwenQwen3Vl235bA22b => "Qwen/Qwen3-VL-235B-A22B-Instruct",
5883            Self::QwenQwen3235bA22b2507V10 => "Qwen3 235B A22B 2507",
5884            Self::QwenQwen332bV10 => "Qwen3 32B (dense)",
5885            Self::QwenQwen3Coder30bA3bV10 => "Qwen3 Coder 30B A3B Instruct",
5886            Self::QwenQwen3Coder480bA35bV10 => "Qwen3 Coder 480B A35B Instruct",
5887            Self::QwenQwen3CoderNext => "Qwen3 Coder Next",
5888            Self::MistralVoxtralMini3b2507 => "Voxtral Mini 3B 2507",
5889            Self::MistralVoxtralSmall24b2507 => "Voxtral Small 24B 2507",
5890            Self::OpenaiGptOss120b | Self::OpenaiGptOss120b10 => "gpt-oss-120b",
5891            Self::OpenaiGptOss20b | Self::OpenaiGptOss20b10 => "gpt-oss-20b",
5892        }
5893    }
5894    #[allow(clippy::too_many_lines)]
5895    fn context_window(self) -> u32 {
5896        match self {
5897            Self::QwenQwen332bV10 => 16_384,
5898            Self::MistralVoxtralSmall24b2507 => 32_000,
5899            Self::WriterPalmyraX4V10 => 122_880,
5900            Self::AmazonNova2LiteV10
5901            | Self::AmazonNovaMicroV10
5902            | Self::DeepseekR1V10
5903            | Self::GoogleGemma34bIt
5904            | Self::MetaLlama3170bInstructV10
5905            | Self::MetaLlama318bInstructV10
5906            | Self::MetaLlama3370bInstructV10
5907            | Self::MistralMagistralSmall2509
5908            | Self::MistralMinistral314bInstruct
5909            | Self::MistralMinistral38bInstruct
5910            | Self::MistralPixtralLarge2502V10
5911            | Self::MistralVoxtralMini3b2507
5912            | Self::NvidiaNemotronNano12bV2
5913            | Self::NvidiaNemotronNano330b
5914            | Self::NvidiaNemotronNano9bV2
5915            | Self::OpenaiGptOss120b
5916            | Self::OpenaiGptOss120b10
5917            | Self::OpenaiGptOss20b
5918            | Self::OpenaiGptOss20b10
5919            | Self::OpenaiGptOssSafeguard120b
5920            | Self::OpenaiGptOssSafeguard20b
5921            | Self::UsDeepseekR1V10 => 128_000,
5922            Self::QwenQwen3Coder480bA35bV10 | Self::QwenQwen3CoderNext => 131_072,
5923            Self::DeepseekV3V10 | Self::DeepseekV32 => 163_840,
5924            Self::MinimaxMinimaxM25 => 196_608,
5925            Self::AnthropicClaudeHaiku4520251001V10
5926            | Self::AnthropicClaudeOpus4120250805V10
5927            | Self::AnthropicClaudeOpus4520251101V10
5928            | Self::AnthropicClaudeSonnet4520250929V10
5929            | Self::AuAnthropicClaudeHaiku4520251001V10
5930            | Self::AuAnthropicClaudeSonnet4520250929V10
5931            | Self::EuAnthropicClaudeHaiku4520251001V10
5932            | Self::EuAnthropicClaudeOpus4520251101V10
5933            | Self::EuAnthropicClaudeSonnet4520250929V10
5934            | Self::GlobalAnthropicClaudeHaiku4520251001V10
5935            | Self::GlobalAnthropicClaudeOpus4520251101V10
5936            | Self::GlobalAnthropicClaudeSonnet4520250929V10
5937            | Self::JpAnthropicClaudeHaiku4520251001V10
5938            | Self::JpAnthropicClaudeSonnet4520250929V10
5939            | Self::UsAnthropicClaudeHaiku4520251001V10
5940            | Self::UsAnthropicClaudeOpus4120250805V10
5941            | Self::UsAnthropicClaudeOpus4520251101V10
5942            | Self::UsAnthropicClaudeSonnet4520250929V10
5943            | Self::ZaiGlm47Flash => 200_000,
5944            Self::GoogleGemma327bIt | Self::ZaiGlm5 => 202_752,
5945            Self::MinimaxMinimaxM2 => 204_608,
5946            Self::MinimaxMinimaxM21 | Self::ZaiGlm47 => 204_800,
5947            Self::MistralDevstral2123b
5948            | Self::MistralMinistral33bInstruct
5949            | Self::MistralMistralLarge3675bInstruct => 256_000,
5950            Self::QwenQwen3Next80bA3b | Self::QwenQwen3Vl235bA22b => 262_000,
5951            Self::MoonshotKimiK2Thinking | Self::MoonshotaiKimiK25 => 262_143,
5952            Self::NvidiaNemotronSuper3120b
5953            | Self::QwenQwen3235bA22b2507V10
5954            | Self::QwenQwen3Coder30bA3bV10 => 262_144,
5955            Self::OpenaiGpt54
5956            | Self::OpenaiGpt55
5957            | Self::OpenaiGpt56Luna
5958            | Self::OpenaiGpt56Sol
5959            | Self::OpenaiGpt56Terra => 272_000,
5960            Self::AmazonNovaLiteV10 | Self::AmazonNovaProV10 => 300_000,
5961            Self::AnthropicClaudeFable5
5962            | Self::AnthropicClaudeOpus46V1
5963            | Self::AnthropicClaudeOpus47
5964            | Self::AnthropicClaudeOpus48
5965            | Self::AnthropicClaudeSonnet46
5966            | Self::AnthropicClaudeSonnet5
5967            | Self::AuAnthropicClaudeOpus46V1
5968            | Self::AuAnthropicClaudeOpus48
5969            | Self::AuAnthropicClaudeSonnet46
5970            | Self::AuAnthropicClaudeSonnet5
5971            | Self::EuAnthropicClaudeFable5
5972            | Self::EuAnthropicClaudeOpus46V1
5973            | Self::EuAnthropicClaudeOpus47
5974            | Self::EuAnthropicClaudeOpus48
5975            | Self::EuAnthropicClaudeSonnet46
5976            | Self::EuAnthropicClaudeSonnet5
5977            | Self::GlobalAnthropicClaudeFable5
5978            | Self::GlobalAnthropicClaudeOpus46V1
5979            | Self::GlobalAnthropicClaudeOpus47
5980            | Self::GlobalAnthropicClaudeOpus48
5981            | Self::GlobalAnthropicClaudeSonnet46
5982            | Self::GlobalAnthropicClaudeSonnet5
5983            | Self::JpAnthropicClaudeOpus47
5984            | Self::JpAnthropicClaudeOpus48
5985            | Self::JpAnthropicClaudeSonnet46
5986            | Self::JpAnthropicClaudeSonnet5
5987            | Self::MetaLlama4Maverick17bInstructV10
5988            | Self::UsAnthropicClaudeFable5
5989            | Self::UsAnthropicClaudeOpus46V1
5990            | Self::UsAnthropicClaudeOpus47
5991            | Self::UsAnthropicClaudeOpus48
5992            | Self::UsAnthropicClaudeSonnet46
5993            | Self::UsAnthropicClaudeSonnet5
5994            | Self::UsMetaLlama4Maverick17bInstructV10
5995            | Self::XaiGrok43 => 1_000_000,
5996            Self::WriterPalmyraX5V10 => 1_040_000,
5997            Self::MetaLlama4Scout17bInstructV10
5998            | Self::UsMetaLlama4Scout17bInstructV10 => 3_500_000,
5999        }
6000    }
6001    #[allow(clippy::too_many_lines)]
6002    pub fn reasoning_levels(self) -> &'static [ReasoningEffort] {
6003        match self {
6004            Self::AmazonNovaLiteV10
6005            | Self::AmazonNovaMicroV10
6006            | Self::AmazonNovaProV10
6007            | Self::GoogleGemma327bIt
6008            | Self::GoogleGemma34bIt
6009            | Self::MetaLlama3170bInstructV10
6010            | Self::MetaLlama318bInstructV10
6011            | Self::MetaLlama3370bInstructV10
6012            | Self::MetaLlama4Maverick17bInstructV10
6013            | Self::MetaLlama4Scout17bInstructV10
6014            | Self::MistralDevstral2123b
6015            | Self::MistralMinistral314bInstruct
6016            | Self::MistralMinistral33bInstruct
6017            | Self::MistralMinistral38bInstruct
6018            | Self::MistralMistralLarge3675bInstruct
6019            | Self::MistralPixtralLarge2502V10
6020            | Self::MistralVoxtralMini3b2507
6021            | Self::MistralVoxtralSmall24b2507
6022            | Self::NvidiaNemotronNano12bV2
6023            | Self::NvidiaNemotronNano9bV2
6024            | Self::OpenaiGptOssSafeguard120b
6025            | Self::OpenaiGptOssSafeguard20b
6026            | Self::QwenQwen3235bA22b2507V10
6027            | Self::QwenQwen3Coder30bA3bV10
6028            | Self::QwenQwen3Coder480bA35bV10
6029            | Self::QwenQwen3Next80bA3b
6030            | Self::QwenQwen3Vl235bA22b
6031            | Self::UsMetaLlama4Maverick17bInstructV10
6032            | Self::UsMetaLlama4Scout17bInstructV10 => &[],
6033            Self::AmazonNova2LiteV10
6034            | Self::AnthropicClaudeHaiku4520251001V10
6035            | Self::AnthropicClaudeOpus4120250805V10
6036            | Self::AnthropicClaudeOpus4520251101V10
6037            | Self::AnthropicClaudeSonnet4520250929V10
6038            | Self::AuAnthropicClaudeHaiku4520251001V10
6039            | Self::AuAnthropicClaudeSonnet4520250929V10
6040            | Self::DeepseekR1V10
6041            | Self::DeepseekV3V10
6042            | Self::DeepseekV32
6043            | Self::EuAnthropicClaudeHaiku4520251001V10
6044            | Self::EuAnthropicClaudeOpus4520251101V10
6045            | Self::EuAnthropicClaudeSonnet4520250929V10
6046            | Self::GlobalAnthropicClaudeHaiku4520251001V10
6047            | Self::GlobalAnthropicClaudeOpus4520251101V10
6048            | Self::GlobalAnthropicClaudeSonnet4520250929V10
6049            | Self::JpAnthropicClaudeHaiku4520251001V10
6050            | Self::JpAnthropicClaudeSonnet4520250929V10
6051            | Self::MinimaxMinimaxM2
6052            | Self::MinimaxMinimaxM21
6053            | Self::MinimaxMinimaxM25
6054            | Self::MistralMagistralSmall2509
6055            | Self::MoonshotKimiK2Thinking
6056            | Self::MoonshotaiKimiK25
6057            | Self::NvidiaNemotronNano330b
6058            | Self::NvidiaNemotronSuper3120b
6059            | Self::OpenaiGptOss120b
6060            | Self::OpenaiGptOss120b10
6061            | Self::OpenaiGptOss20b
6062            | Self::OpenaiGptOss20b10
6063            | Self::QwenQwen332bV10
6064            | Self::QwenQwen3CoderNext
6065            | Self::UsAnthropicClaudeHaiku4520251001V10
6066            | Self::UsAnthropicClaudeOpus4120250805V10
6067            | Self::UsAnthropicClaudeOpus4520251101V10
6068            | Self::UsAnthropicClaudeSonnet4520250929V10
6069            | Self::UsDeepseekR1V10
6070            | Self::WriterPalmyraX4V10
6071            | Self::WriterPalmyraX5V10
6072            | Self::XaiGrok43
6073            | Self::ZaiGlm47
6074            | Self::ZaiGlm47Flash
6075            | Self::ZaiGlm5 => {
6076                &[ReasoningEffort::Low, ReasoningEffort::Medium, ReasoningEffort::High]
6077            }
6078            Self::AnthropicClaudeOpus46V1
6079            | Self::AnthropicClaudeSonnet46
6080            | Self::AuAnthropicClaudeOpus46V1
6081            | Self::AuAnthropicClaudeSonnet46
6082            | Self::EuAnthropicClaudeOpus46V1
6083            | Self::EuAnthropicClaudeSonnet46
6084            | Self::GlobalAnthropicClaudeOpus46V1
6085            | Self::GlobalAnthropicClaudeSonnet46
6086            | Self::JpAnthropicClaudeSonnet46
6087            | Self::UsAnthropicClaudeOpus46V1
6088            | Self::UsAnthropicClaudeSonnet46 => {
6089                &[
6090                    ReasoningEffort::Low,
6091                    ReasoningEffort::Medium,
6092                    ReasoningEffort::High,
6093                    ReasoningEffort::Max,
6094                ]
6095            }
6096            Self::OpenaiGpt54 | Self::OpenaiGpt55 => {
6097                &[
6098                    ReasoningEffort::Low,
6099                    ReasoningEffort::Medium,
6100                    ReasoningEffort::High,
6101                    ReasoningEffort::Xhigh,
6102                ]
6103            }
6104            Self::AnthropicClaudeFable5
6105            | Self::AnthropicClaudeOpus47
6106            | Self::AnthropicClaudeOpus48
6107            | Self::AnthropicClaudeSonnet5
6108            | Self::AuAnthropicClaudeOpus48
6109            | Self::AuAnthropicClaudeSonnet5
6110            | Self::EuAnthropicClaudeFable5
6111            | Self::EuAnthropicClaudeOpus47
6112            | Self::EuAnthropicClaudeOpus48
6113            | Self::EuAnthropicClaudeSonnet5
6114            | Self::GlobalAnthropicClaudeFable5
6115            | Self::GlobalAnthropicClaudeOpus47
6116            | Self::GlobalAnthropicClaudeOpus48
6117            | Self::GlobalAnthropicClaudeSonnet5
6118            | Self::JpAnthropicClaudeOpus47
6119            | Self::JpAnthropicClaudeOpus48
6120            | Self::JpAnthropicClaudeSonnet5
6121            | Self::OpenaiGpt56Luna
6122            | Self::OpenaiGpt56Sol
6123            | Self::OpenaiGpt56Terra
6124            | Self::UsAnthropicClaudeFable5
6125            | Self::UsAnthropicClaudeOpus47
6126            | Self::UsAnthropicClaudeOpus48
6127            | Self::UsAnthropicClaudeSonnet5 => {
6128                &[
6129                    ReasoningEffort::Low,
6130                    ReasoningEffort::Medium,
6131                    ReasoningEffort::High,
6132                    ReasoningEffort::Xhigh,
6133                    ReasoningEffort::Max,
6134                ]
6135            }
6136        }
6137    }
6138    pub fn supports_reasoning(self) -> bool {
6139        !self.reasoning_levels().is_empty()
6140    }
6141    #[allow(clippy::too_many_lines)]
6142    pub fn supports_prompt_caching(self) -> bool {
6143        match self {
6144            Self::AmazonNova2LiteV10
6145            | Self::DeepseekR1V10
6146            | Self::DeepseekV3V10
6147            | Self::DeepseekV32
6148            | Self::GoogleGemma327bIt
6149            | Self::GoogleGemma34bIt
6150            | Self::MetaLlama3170bInstructV10
6151            | Self::MetaLlama318bInstructV10
6152            | Self::MetaLlama3370bInstructV10
6153            | Self::MetaLlama4Maverick17bInstructV10
6154            | Self::MetaLlama4Scout17bInstructV10
6155            | Self::MinimaxMinimaxM2
6156            | Self::MinimaxMinimaxM21
6157            | Self::MinimaxMinimaxM25
6158            | Self::MistralDevstral2123b
6159            | Self::MistralMagistralSmall2509
6160            | Self::MistralMinistral314bInstruct
6161            | Self::MistralMinistral33bInstruct
6162            | Self::MistralMinistral38bInstruct
6163            | Self::MistralMistralLarge3675bInstruct
6164            | Self::MistralPixtralLarge2502V10
6165            | Self::MistralVoxtralMini3b2507
6166            | Self::MistralVoxtralSmall24b2507
6167            | Self::MoonshotKimiK2Thinking
6168            | Self::MoonshotaiKimiK25
6169            | Self::NvidiaNemotronNano12bV2
6170            | Self::NvidiaNemotronNano330b
6171            | Self::NvidiaNemotronNano9bV2
6172            | Self::NvidiaNemotronSuper3120b
6173            | Self::OpenaiGptOss120b
6174            | Self::OpenaiGptOss120b10
6175            | Self::OpenaiGptOss20b
6176            | Self::OpenaiGptOss20b10
6177            | Self::OpenaiGptOssSafeguard120b
6178            | Self::OpenaiGptOssSafeguard20b
6179            | Self::QwenQwen3235bA22b2507V10
6180            | Self::QwenQwen332bV10
6181            | Self::QwenQwen3Coder30bA3bV10
6182            | Self::QwenQwen3Coder480bA35bV10
6183            | Self::QwenQwen3CoderNext
6184            | Self::QwenQwen3Next80bA3b
6185            | Self::QwenQwen3Vl235bA22b
6186            | Self::UsDeepseekR1V10
6187            | Self::UsMetaLlama4Maverick17bInstructV10
6188            | Self::UsMetaLlama4Scout17bInstructV10
6189            | Self::WriterPalmyraX4V10
6190            | Self::WriterPalmyraX5V10
6191            | Self::ZaiGlm47
6192            | Self::ZaiGlm47Flash
6193            | Self::ZaiGlm5 => false,
6194            Self::AmazonNovaLiteV10
6195            | Self::AmazonNovaMicroV10
6196            | Self::AmazonNovaProV10
6197            | Self::AnthropicClaudeFable5
6198            | Self::AnthropicClaudeHaiku4520251001V10
6199            | Self::AnthropicClaudeOpus4120250805V10
6200            | Self::AnthropicClaudeOpus4520251101V10
6201            | Self::AnthropicClaudeOpus46V1
6202            | Self::AnthropicClaudeOpus47
6203            | Self::AnthropicClaudeOpus48
6204            | Self::AnthropicClaudeSonnet4520250929V10
6205            | Self::AnthropicClaudeSonnet46
6206            | Self::AnthropicClaudeSonnet5
6207            | Self::AuAnthropicClaudeHaiku4520251001V10
6208            | Self::AuAnthropicClaudeOpus46V1
6209            | Self::AuAnthropicClaudeOpus48
6210            | Self::AuAnthropicClaudeSonnet4520250929V10
6211            | Self::AuAnthropicClaudeSonnet46
6212            | Self::AuAnthropicClaudeSonnet5
6213            | Self::EuAnthropicClaudeFable5
6214            | Self::EuAnthropicClaudeHaiku4520251001V10
6215            | Self::EuAnthropicClaudeOpus4520251101V10
6216            | Self::EuAnthropicClaudeOpus46V1
6217            | Self::EuAnthropicClaudeOpus47
6218            | Self::EuAnthropicClaudeOpus48
6219            | Self::EuAnthropicClaudeSonnet4520250929V10
6220            | Self::EuAnthropicClaudeSonnet46
6221            | Self::EuAnthropicClaudeSonnet5
6222            | Self::GlobalAnthropicClaudeFable5
6223            | Self::GlobalAnthropicClaudeHaiku4520251001V10
6224            | Self::GlobalAnthropicClaudeOpus4520251101V10
6225            | Self::GlobalAnthropicClaudeOpus46V1
6226            | Self::GlobalAnthropicClaudeOpus47
6227            | Self::GlobalAnthropicClaudeOpus48
6228            | Self::GlobalAnthropicClaudeSonnet4520250929V10
6229            | Self::GlobalAnthropicClaudeSonnet46
6230            | Self::GlobalAnthropicClaudeSonnet5
6231            | Self::JpAnthropicClaudeHaiku4520251001V10
6232            | Self::JpAnthropicClaudeOpus47
6233            | Self::JpAnthropicClaudeOpus48
6234            | Self::JpAnthropicClaudeSonnet4520250929V10
6235            | Self::JpAnthropicClaudeSonnet46
6236            | Self::JpAnthropicClaudeSonnet5
6237            | Self::OpenaiGpt54
6238            | Self::OpenaiGpt55
6239            | Self::OpenaiGpt56Luna
6240            | Self::OpenaiGpt56Sol
6241            | Self::OpenaiGpt56Terra
6242            | Self::UsAnthropicClaudeFable5
6243            | Self::UsAnthropicClaudeHaiku4520251001V10
6244            | Self::UsAnthropicClaudeOpus4120250805V10
6245            | Self::UsAnthropicClaudeOpus4520251101V10
6246            | Self::UsAnthropicClaudeOpus46V1
6247            | Self::UsAnthropicClaudeOpus47
6248            | Self::UsAnthropicClaudeOpus48
6249            | Self::UsAnthropicClaudeSonnet4520250929V10
6250            | Self::UsAnthropicClaudeSonnet46
6251            | Self::UsAnthropicClaudeSonnet5
6252            | Self::XaiGrok43 => true,
6253        }
6254    }
6255    #[allow(clippy::too_many_lines)]
6256    pub fn supports_image(self) -> bool {
6257        match self {
6258            Self::AmazonNovaMicroV10
6259            | Self::DeepseekR1V10
6260            | Self::DeepseekV3V10
6261            | Self::DeepseekV32
6262            | Self::MetaLlama3170bInstructV10
6263            | Self::MetaLlama318bInstructV10
6264            | Self::MetaLlama3370bInstructV10
6265            | Self::MinimaxMinimaxM2
6266            | Self::MinimaxMinimaxM21
6267            | Self::MinimaxMinimaxM25
6268            | Self::MistralDevstral2123b
6269            | Self::MistralMinistral314bInstruct
6270            | Self::MistralMinistral38bInstruct
6271            | Self::MistralVoxtralMini3b2507
6272            | Self::MistralVoxtralSmall24b2507
6273            | Self::MoonshotKimiK2Thinking
6274            | Self::NvidiaNemotronNano330b
6275            | Self::NvidiaNemotronNano9bV2
6276            | Self::NvidiaNemotronSuper3120b
6277            | Self::OpenaiGptOss120b
6278            | Self::OpenaiGptOss120b10
6279            | Self::OpenaiGptOss20b
6280            | Self::OpenaiGptOss20b10
6281            | Self::OpenaiGptOssSafeguard120b
6282            | Self::OpenaiGptOssSafeguard20b
6283            | Self::QwenQwen3235bA22b2507V10
6284            | Self::QwenQwen332bV10
6285            | Self::QwenQwen3Coder30bA3bV10
6286            | Self::QwenQwen3Coder480bA35bV10
6287            | Self::QwenQwen3CoderNext
6288            | Self::QwenQwen3Next80bA3b
6289            | Self::UsDeepseekR1V10
6290            | Self::WriterPalmyraX4V10
6291            | Self::WriterPalmyraX5V10
6292            | Self::ZaiGlm47
6293            | Self::ZaiGlm47Flash
6294            | Self::ZaiGlm5 => false,
6295            Self::AmazonNova2LiteV10
6296            | Self::AmazonNovaLiteV10
6297            | Self::AmazonNovaProV10
6298            | Self::AnthropicClaudeFable5
6299            | Self::AnthropicClaudeHaiku4520251001V10
6300            | Self::AnthropicClaudeOpus4120250805V10
6301            | Self::AnthropicClaudeOpus4520251101V10
6302            | Self::AnthropicClaudeOpus46V1
6303            | Self::AnthropicClaudeOpus47
6304            | Self::AnthropicClaudeOpus48
6305            | Self::AnthropicClaudeSonnet4520250929V10
6306            | Self::AnthropicClaudeSonnet46
6307            | Self::AnthropicClaudeSonnet5
6308            | Self::AuAnthropicClaudeHaiku4520251001V10
6309            | Self::AuAnthropicClaudeOpus46V1
6310            | Self::AuAnthropicClaudeOpus48
6311            | Self::AuAnthropicClaudeSonnet4520250929V10
6312            | Self::AuAnthropicClaudeSonnet46
6313            | Self::AuAnthropicClaudeSonnet5
6314            | Self::EuAnthropicClaudeFable5
6315            | Self::EuAnthropicClaudeHaiku4520251001V10
6316            | Self::EuAnthropicClaudeOpus4520251101V10
6317            | Self::EuAnthropicClaudeOpus46V1
6318            | Self::EuAnthropicClaudeOpus47
6319            | Self::EuAnthropicClaudeOpus48
6320            | Self::EuAnthropicClaudeSonnet4520250929V10
6321            | Self::EuAnthropicClaudeSonnet46
6322            | Self::EuAnthropicClaudeSonnet5
6323            | Self::GlobalAnthropicClaudeFable5
6324            | Self::GlobalAnthropicClaudeHaiku4520251001V10
6325            | Self::GlobalAnthropicClaudeOpus4520251101V10
6326            | Self::GlobalAnthropicClaudeOpus46V1
6327            | Self::GlobalAnthropicClaudeOpus47
6328            | Self::GlobalAnthropicClaudeOpus48
6329            | Self::GlobalAnthropicClaudeSonnet4520250929V10
6330            | Self::GlobalAnthropicClaudeSonnet46
6331            | Self::GlobalAnthropicClaudeSonnet5
6332            | Self::GoogleGemma327bIt
6333            | Self::GoogleGemma34bIt
6334            | Self::JpAnthropicClaudeHaiku4520251001V10
6335            | Self::JpAnthropicClaudeOpus47
6336            | Self::JpAnthropicClaudeOpus48
6337            | Self::JpAnthropicClaudeSonnet4520250929V10
6338            | Self::JpAnthropicClaudeSonnet46
6339            | Self::JpAnthropicClaudeSonnet5
6340            | Self::MetaLlama4Maverick17bInstructV10
6341            | Self::MetaLlama4Scout17bInstructV10
6342            | Self::MistralMagistralSmall2509
6343            | Self::MistralMinistral33bInstruct
6344            | Self::MistralMistralLarge3675bInstruct
6345            | Self::MistralPixtralLarge2502V10
6346            | Self::MoonshotaiKimiK25
6347            | Self::NvidiaNemotronNano12bV2
6348            | Self::OpenaiGpt54
6349            | Self::OpenaiGpt55
6350            | Self::OpenaiGpt56Luna
6351            | Self::OpenaiGpt56Sol
6352            | Self::OpenaiGpt56Terra
6353            | Self::QwenQwen3Vl235bA22b
6354            | Self::UsAnthropicClaudeFable5
6355            | Self::UsAnthropicClaudeHaiku4520251001V10
6356            | Self::UsAnthropicClaudeOpus4120250805V10
6357            | Self::UsAnthropicClaudeOpus4520251101V10
6358            | Self::UsAnthropicClaudeOpus46V1
6359            | Self::UsAnthropicClaudeOpus47
6360            | Self::UsAnthropicClaudeOpus48
6361            | Self::UsAnthropicClaudeSonnet4520250929V10
6362            | Self::UsAnthropicClaudeSonnet46
6363            | Self::UsAnthropicClaudeSonnet5
6364            | Self::UsMetaLlama4Maverick17bInstructV10
6365            | Self::UsMetaLlama4Scout17bInstructV10
6366            | Self::XaiGrok43 => true,
6367        }
6368    }
6369    #[allow(clippy::too_many_lines)]
6370    pub fn supports_audio(self) -> bool {
6371        match self {
6372            Self::AmazonNova2LiteV10
6373            | Self::AmazonNovaLiteV10
6374            | Self::AmazonNovaMicroV10
6375            | Self::AmazonNovaProV10
6376            | Self::AnthropicClaudeFable5
6377            | Self::AnthropicClaudeHaiku4520251001V10
6378            | Self::AnthropicClaudeOpus4120250805V10
6379            | Self::AnthropicClaudeOpus4520251101V10
6380            | Self::AnthropicClaudeOpus46V1
6381            | Self::AnthropicClaudeOpus47
6382            | Self::AnthropicClaudeOpus48
6383            | Self::AnthropicClaudeSonnet4520250929V10
6384            | Self::AnthropicClaudeSonnet46
6385            | Self::AnthropicClaudeSonnet5
6386            | Self::AuAnthropicClaudeHaiku4520251001V10
6387            | Self::AuAnthropicClaudeOpus46V1
6388            | Self::AuAnthropicClaudeOpus48
6389            | Self::AuAnthropicClaudeSonnet4520250929V10
6390            | Self::AuAnthropicClaudeSonnet46
6391            | Self::AuAnthropicClaudeSonnet5
6392            | Self::DeepseekR1V10
6393            | Self::DeepseekV3V10
6394            | Self::DeepseekV32
6395            | Self::EuAnthropicClaudeFable5
6396            | Self::EuAnthropicClaudeHaiku4520251001V10
6397            | Self::EuAnthropicClaudeOpus4520251101V10
6398            | Self::EuAnthropicClaudeOpus46V1
6399            | Self::EuAnthropicClaudeOpus47
6400            | Self::EuAnthropicClaudeOpus48
6401            | Self::EuAnthropicClaudeSonnet4520250929V10
6402            | Self::EuAnthropicClaudeSonnet46
6403            | Self::EuAnthropicClaudeSonnet5
6404            | Self::GlobalAnthropicClaudeFable5
6405            | Self::GlobalAnthropicClaudeHaiku4520251001V10
6406            | Self::GlobalAnthropicClaudeOpus4520251101V10
6407            | Self::GlobalAnthropicClaudeOpus46V1
6408            | Self::GlobalAnthropicClaudeOpus47
6409            | Self::GlobalAnthropicClaudeOpus48
6410            | Self::GlobalAnthropicClaudeSonnet4520250929V10
6411            | Self::GlobalAnthropicClaudeSonnet46
6412            | Self::GlobalAnthropicClaudeSonnet5
6413            | Self::GoogleGemma327bIt
6414            | Self::GoogleGemma34bIt
6415            | Self::JpAnthropicClaudeHaiku4520251001V10
6416            | Self::JpAnthropicClaudeOpus47
6417            | Self::JpAnthropicClaudeOpus48
6418            | Self::JpAnthropicClaudeSonnet4520250929V10
6419            | Self::JpAnthropicClaudeSonnet46
6420            | Self::JpAnthropicClaudeSonnet5
6421            | Self::MetaLlama3170bInstructV10
6422            | Self::MetaLlama318bInstructV10
6423            | Self::MetaLlama3370bInstructV10
6424            | Self::MetaLlama4Maverick17bInstructV10
6425            | Self::MetaLlama4Scout17bInstructV10
6426            | Self::MinimaxMinimaxM2
6427            | Self::MinimaxMinimaxM21
6428            | Self::MinimaxMinimaxM25
6429            | Self::MistralDevstral2123b
6430            | Self::MistralMagistralSmall2509
6431            | Self::MistralMinistral314bInstruct
6432            | Self::MistralMinistral33bInstruct
6433            | Self::MistralMinistral38bInstruct
6434            | Self::MistralMistralLarge3675bInstruct
6435            | Self::MistralPixtralLarge2502V10
6436            | Self::MoonshotKimiK2Thinking
6437            | Self::MoonshotaiKimiK25
6438            | Self::NvidiaNemotronNano12bV2
6439            | Self::NvidiaNemotronNano330b
6440            | Self::NvidiaNemotronNano9bV2
6441            | Self::NvidiaNemotronSuper3120b
6442            | Self::OpenaiGpt54
6443            | Self::OpenaiGpt55
6444            | Self::OpenaiGpt56Luna
6445            | Self::OpenaiGpt56Sol
6446            | Self::OpenaiGpt56Terra
6447            | Self::OpenaiGptOss120b
6448            | Self::OpenaiGptOss120b10
6449            | Self::OpenaiGptOss20b
6450            | Self::OpenaiGptOss20b10
6451            | Self::OpenaiGptOssSafeguard120b
6452            | Self::OpenaiGptOssSafeguard20b
6453            | Self::QwenQwen3235bA22b2507V10
6454            | Self::QwenQwen332bV10
6455            | Self::QwenQwen3Coder30bA3bV10
6456            | Self::QwenQwen3Coder480bA35bV10
6457            | Self::QwenQwen3CoderNext
6458            | Self::QwenQwen3Next80bA3b
6459            | Self::QwenQwen3Vl235bA22b
6460            | Self::UsAnthropicClaudeFable5
6461            | Self::UsAnthropicClaudeHaiku4520251001V10
6462            | Self::UsAnthropicClaudeOpus4120250805V10
6463            | Self::UsAnthropicClaudeOpus4520251101V10
6464            | Self::UsAnthropicClaudeOpus46V1
6465            | Self::UsAnthropicClaudeOpus47
6466            | Self::UsAnthropicClaudeOpus48
6467            | Self::UsAnthropicClaudeSonnet4520250929V10
6468            | Self::UsAnthropicClaudeSonnet46
6469            | Self::UsAnthropicClaudeSonnet5
6470            | Self::UsDeepseekR1V10
6471            | Self::UsMetaLlama4Maverick17bInstructV10
6472            | Self::UsMetaLlama4Scout17bInstructV10
6473            | Self::WriterPalmyraX4V10
6474            | Self::WriterPalmyraX5V10
6475            | Self::XaiGrok43
6476            | Self::ZaiGlm47
6477            | Self::ZaiGlm47Flash
6478            | Self::ZaiGlm5 => false,
6479            Self::MistralVoxtralMini3b2507 | Self::MistralVoxtralSmall24b2507 => true,
6480        }
6481    }
6482    const ALL: &[BedrockFoundationModel] = &[
6483        Self::AmazonNova2LiteV10,
6484        Self::AmazonNovaLiteV10,
6485        Self::AmazonNovaMicroV10,
6486        Self::AmazonNovaProV10,
6487        Self::AnthropicClaudeFable5,
6488        Self::AnthropicClaudeHaiku4520251001V10,
6489        Self::AnthropicClaudeOpus4120250805V10,
6490        Self::AnthropicClaudeOpus4520251101V10,
6491        Self::AnthropicClaudeOpus46V1,
6492        Self::AnthropicClaudeOpus47,
6493        Self::AnthropicClaudeOpus48,
6494        Self::AnthropicClaudeSonnet4520250929V10,
6495        Self::AnthropicClaudeSonnet46,
6496        Self::AnthropicClaudeSonnet5,
6497        Self::AuAnthropicClaudeHaiku4520251001V10,
6498        Self::AuAnthropicClaudeOpus46V1,
6499        Self::AuAnthropicClaudeOpus48,
6500        Self::AuAnthropicClaudeSonnet4520250929V10,
6501        Self::AuAnthropicClaudeSonnet46,
6502        Self::AuAnthropicClaudeSonnet5,
6503        Self::DeepseekR1V10,
6504        Self::DeepseekV3V10,
6505        Self::DeepseekV32,
6506        Self::EuAnthropicClaudeFable5,
6507        Self::EuAnthropicClaudeHaiku4520251001V10,
6508        Self::EuAnthropicClaudeOpus4520251101V10,
6509        Self::EuAnthropicClaudeOpus46V1,
6510        Self::EuAnthropicClaudeOpus47,
6511        Self::EuAnthropicClaudeOpus48,
6512        Self::EuAnthropicClaudeSonnet4520250929V10,
6513        Self::EuAnthropicClaudeSonnet46,
6514        Self::EuAnthropicClaudeSonnet5,
6515        Self::GlobalAnthropicClaudeFable5,
6516        Self::GlobalAnthropicClaudeHaiku4520251001V10,
6517        Self::GlobalAnthropicClaudeOpus4520251101V10,
6518        Self::GlobalAnthropicClaudeOpus46V1,
6519        Self::GlobalAnthropicClaudeOpus47,
6520        Self::GlobalAnthropicClaudeOpus48,
6521        Self::GlobalAnthropicClaudeSonnet4520250929V10,
6522        Self::GlobalAnthropicClaudeSonnet46,
6523        Self::GlobalAnthropicClaudeSonnet5,
6524        Self::GoogleGemma327bIt,
6525        Self::GoogleGemma34bIt,
6526        Self::JpAnthropicClaudeHaiku4520251001V10,
6527        Self::JpAnthropicClaudeOpus47,
6528        Self::JpAnthropicClaudeOpus48,
6529        Self::JpAnthropicClaudeSonnet4520250929V10,
6530        Self::JpAnthropicClaudeSonnet46,
6531        Self::JpAnthropicClaudeSonnet5,
6532        Self::MetaLlama3170bInstructV10,
6533        Self::MetaLlama318bInstructV10,
6534        Self::MetaLlama3370bInstructV10,
6535        Self::MetaLlama4Maverick17bInstructV10,
6536        Self::MetaLlama4Scout17bInstructV10,
6537        Self::MinimaxMinimaxM2,
6538        Self::MinimaxMinimaxM21,
6539        Self::MinimaxMinimaxM25,
6540        Self::MistralDevstral2123b,
6541        Self::MistralMagistralSmall2509,
6542        Self::MistralMinistral314bInstruct,
6543        Self::MistralMinistral33bInstruct,
6544        Self::MistralMinistral38bInstruct,
6545        Self::MistralMistralLarge3675bInstruct,
6546        Self::MistralPixtralLarge2502V10,
6547        Self::MistralVoxtralMini3b2507,
6548        Self::MistralVoxtralSmall24b2507,
6549        Self::MoonshotKimiK2Thinking,
6550        Self::MoonshotaiKimiK25,
6551        Self::NvidiaNemotronNano12bV2,
6552        Self::NvidiaNemotronNano330b,
6553        Self::NvidiaNemotronNano9bV2,
6554        Self::NvidiaNemotronSuper3120b,
6555        Self::OpenaiGpt54,
6556        Self::OpenaiGpt55,
6557        Self::OpenaiGpt56Luna,
6558        Self::OpenaiGpt56Sol,
6559        Self::OpenaiGpt56Terra,
6560        Self::OpenaiGptOss120b,
6561        Self::OpenaiGptOss120b10,
6562        Self::OpenaiGptOss20b,
6563        Self::OpenaiGptOss20b10,
6564        Self::OpenaiGptOssSafeguard120b,
6565        Self::OpenaiGptOssSafeguard20b,
6566        Self::QwenQwen3235bA22b2507V10,
6567        Self::QwenQwen332bV10,
6568        Self::QwenQwen3Coder30bA3bV10,
6569        Self::QwenQwen3Coder480bA35bV10,
6570        Self::QwenQwen3CoderNext,
6571        Self::QwenQwen3Next80bA3b,
6572        Self::QwenQwen3Vl235bA22b,
6573        Self::UsAnthropicClaudeFable5,
6574        Self::UsAnthropicClaudeHaiku4520251001V10,
6575        Self::UsAnthropicClaudeOpus4120250805V10,
6576        Self::UsAnthropicClaudeOpus4520251101V10,
6577        Self::UsAnthropicClaudeOpus46V1,
6578        Self::UsAnthropicClaudeOpus47,
6579        Self::UsAnthropicClaudeOpus48,
6580        Self::UsAnthropicClaudeSonnet4520250929V10,
6581        Self::UsAnthropicClaudeSonnet46,
6582        Self::UsAnthropicClaudeSonnet5,
6583        Self::UsDeepseekR1V10,
6584        Self::UsMetaLlama4Maverick17bInstructV10,
6585        Self::UsMetaLlama4Scout17bInstructV10,
6586        Self::WriterPalmyraX4V10,
6587        Self::WriterPalmyraX5V10,
6588        Self::XaiGrok43,
6589        Self::ZaiGlm47,
6590        Self::ZaiGlm47Flash,
6591        Self::ZaiGlm5,
6592    ];
6593}
6594impl std::str::FromStr for BedrockFoundationModel {
6595    type Err = String;
6596    #[allow(clippy::too_many_lines)]
6597    fn from_str(s: &str) -> Result<Self, Self::Err> {
6598        match s {
6599            "amazon.nova-2-lite-v1:0" => Ok(Self::AmazonNova2LiteV10),
6600            "amazon.nova-lite-v1:0" => Ok(Self::AmazonNovaLiteV10),
6601            "amazon.nova-micro-v1:0" => Ok(Self::AmazonNovaMicroV10),
6602            "amazon.nova-pro-v1:0" => Ok(Self::AmazonNovaProV10),
6603            "anthropic.claude-fable-5" => Ok(Self::AnthropicClaudeFable5),
6604            "anthropic.claude-haiku-4-5-20251001-v1:0" => {
6605                Ok(Self::AnthropicClaudeHaiku4520251001V10)
6606            }
6607            "anthropic.claude-opus-4-1-20250805-v1:0" => {
6608                Ok(Self::AnthropicClaudeOpus4120250805V10)
6609            }
6610            "anthropic.claude-opus-4-5-20251101-v1:0" => {
6611                Ok(Self::AnthropicClaudeOpus4520251101V10)
6612            }
6613            "anthropic.claude-opus-4-6-v1" => Ok(Self::AnthropicClaudeOpus46V1),
6614            "anthropic.claude-opus-4-7" => Ok(Self::AnthropicClaudeOpus47),
6615            "anthropic.claude-opus-4-8" => Ok(Self::AnthropicClaudeOpus48),
6616            "anthropic.claude-sonnet-4-5-20250929-v1:0" => {
6617                Ok(Self::AnthropicClaudeSonnet4520250929V10)
6618            }
6619            "anthropic.claude-sonnet-4-6" => Ok(Self::AnthropicClaudeSonnet46),
6620            "anthropic.claude-sonnet-5" => Ok(Self::AnthropicClaudeSonnet5),
6621            "au.anthropic.claude-haiku-4-5-20251001-v1:0" => {
6622                Ok(Self::AuAnthropicClaudeHaiku4520251001V10)
6623            }
6624            "au.anthropic.claude-opus-4-6-v1" => Ok(Self::AuAnthropicClaudeOpus46V1),
6625            "au.anthropic.claude-opus-4-8" => Ok(Self::AuAnthropicClaudeOpus48),
6626            "au.anthropic.claude-sonnet-4-5-20250929-v1:0" => {
6627                Ok(Self::AuAnthropicClaudeSonnet4520250929V10)
6628            }
6629            "au.anthropic.claude-sonnet-4-6" => Ok(Self::AuAnthropicClaudeSonnet46),
6630            "au.anthropic.claude-sonnet-5" => Ok(Self::AuAnthropicClaudeSonnet5),
6631            "deepseek.r1-v1:0" => Ok(Self::DeepseekR1V10),
6632            "deepseek.v3-v1:0" => Ok(Self::DeepseekV3V10),
6633            "deepseek.v3.2" => Ok(Self::DeepseekV32),
6634            "eu.anthropic.claude-fable-5" => Ok(Self::EuAnthropicClaudeFable5),
6635            "eu.anthropic.claude-haiku-4-5-20251001-v1:0" => {
6636                Ok(Self::EuAnthropicClaudeHaiku4520251001V10)
6637            }
6638            "eu.anthropic.claude-opus-4-5-20251101-v1:0" => {
6639                Ok(Self::EuAnthropicClaudeOpus4520251101V10)
6640            }
6641            "eu.anthropic.claude-opus-4-6-v1" => Ok(Self::EuAnthropicClaudeOpus46V1),
6642            "eu.anthropic.claude-opus-4-7" => Ok(Self::EuAnthropicClaudeOpus47),
6643            "eu.anthropic.claude-opus-4-8" => Ok(Self::EuAnthropicClaudeOpus48),
6644            "eu.anthropic.claude-sonnet-4-5-20250929-v1:0" => {
6645                Ok(Self::EuAnthropicClaudeSonnet4520250929V10)
6646            }
6647            "eu.anthropic.claude-sonnet-4-6" => Ok(Self::EuAnthropicClaudeSonnet46),
6648            "eu.anthropic.claude-sonnet-5" => Ok(Self::EuAnthropicClaudeSonnet5),
6649            "global.anthropic.claude-fable-5" => Ok(Self::GlobalAnthropicClaudeFable5),
6650            "global.anthropic.claude-haiku-4-5-20251001-v1:0" => {
6651                Ok(Self::GlobalAnthropicClaudeHaiku4520251001V10)
6652            }
6653            "global.anthropic.claude-opus-4-5-20251101-v1:0" => {
6654                Ok(Self::GlobalAnthropicClaudeOpus4520251101V10)
6655            }
6656            "global.anthropic.claude-opus-4-6-v1" => {
6657                Ok(Self::GlobalAnthropicClaudeOpus46V1)
6658            }
6659            "global.anthropic.claude-opus-4-7" => Ok(Self::GlobalAnthropicClaudeOpus47),
6660            "global.anthropic.claude-opus-4-8" => Ok(Self::GlobalAnthropicClaudeOpus48),
6661            "global.anthropic.claude-sonnet-4-5-20250929-v1:0" => {
6662                Ok(Self::GlobalAnthropicClaudeSonnet4520250929V10)
6663            }
6664            "global.anthropic.claude-sonnet-4-6" => {
6665                Ok(Self::GlobalAnthropicClaudeSonnet46)
6666            }
6667            "global.anthropic.claude-sonnet-5" => Ok(Self::GlobalAnthropicClaudeSonnet5),
6668            "google.gemma-3-27b-it" => Ok(Self::GoogleGemma327bIt),
6669            "google.gemma-3-4b-it" => Ok(Self::GoogleGemma34bIt),
6670            "jp.anthropic.claude-haiku-4-5-20251001-v1:0" => {
6671                Ok(Self::JpAnthropicClaudeHaiku4520251001V10)
6672            }
6673            "jp.anthropic.claude-opus-4-7" => Ok(Self::JpAnthropicClaudeOpus47),
6674            "jp.anthropic.claude-opus-4-8" => Ok(Self::JpAnthropicClaudeOpus48),
6675            "jp.anthropic.claude-sonnet-4-5-20250929-v1:0" => {
6676                Ok(Self::JpAnthropicClaudeSonnet4520250929V10)
6677            }
6678            "jp.anthropic.claude-sonnet-4-6" => Ok(Self::JpAnthropicClaudeSonnet46),
6679            "jp.anthropic.claude-sonnet-5" => Ok(Self::JpAnthropicClaudeSonnet5),
6680            "meta.llama3-1-70b-instruct-v1:0" => Ok(Self::MetaLlama3170bInstructV10),
6681            "meta.llama3-1-8b-instruct-v1:0" => Ok(Self::MetaLlama318bInstructV10),
6682            "meta.llama3-3-70b-instruct-v1:0" => Ok(Self::MetaLlama3370bInstructV10),
6683            "meta.llama4-maverick-17b-instruct-v1:0" => {
6684                Ok(Self::MetaLlama4Maverick17bInstructV10)
6685            }
6686            "meta.llama4-scout-17b-instruct-v1:0" => {
6687                Ok(Self::MetaLlama4Scout17bInstructV10)
6688            }
6689            "minimax.minimax-m2" => Ok(Self::MinimaxMinimaxM2),
6690            "minimax.minimax-m2.1" => Ok(Self::MinimaxMinimaxM21),
6691            "minimax.minimax-m2.5" => Ok(Self::MinimaxMinimaxM25),
6692            "mistral.devstral-2-123b" => Ok(Self::MistralDevstral2123b),
6693            "mistral.magistral-small-2509" => Ok(Self::MistralMagistralSmall2509),
6694            "mistral.ministral-3-14b-instruct" => Ok(Self::MistralMinistral314bInstruct),
6695            "mistral.ministral-3-3b-instruct" => Ok(Self::MistralMinistral33bInstruct),
6696            "mistral.ministral-3-8b-instruct" => Ok(Self::MistralMinistral38bInstruct),
6697            "mistral.mistral-large-3-675b-instruct" => {
6698                Ok(Self::MistralMistralLarge3675bInstruct)
6699            }
6700            "mistral.pixtral-large-2502-v1:0" => Ok(Self::MistralPixtralLarge2502V10),
6701            "mistral.voxtral-mini-3b-2507" => Ok(Self::MistralVoxtralMini3b2507),
6702            "mistral.voxtral-small-24b-2507" => Ok(Self::MistralVoxtralSmall24b2507),
6703            "moonshot.kimi-k2-thinking" => Ok(Self::MoonshotKimiK2Thinking),
6704            "moonshotai.kimi-k2.5" => Ok(Self::MoonshotaiKimiK25),
6705            "nvidia.nemotron-nano-12b-v2" => Ok(Self::NvidiaNemotronNano12bV2),
6706            "nvidia.nemotron-nano-3-30b" => Ok(Self::NvidiaNemotronNano330b),
6707            "nvidia.nemotron-nano-9b-v2" => Ok(Self::NvidiaNemotronNano9bV2),
6708            "nvidia.nemotron-super-3-120b" => Ok(Self::NvidiaNemotronSuper3120b),
6709            "openai.gpt-5.4" => Ok(Self::OpenaiGpt54),
6710            "openai.gpt-5.5" => Ok(Self::OpenaiGpt55),
6711            "openai.gpt-5.6-luna" => Ok(Self::OpenaiGpt56Luna),
6712            "openai.gpt-5.6-sol" => Ok(Self::OpenaiGpt56Sol),
6713            "openai.gpt-5.6-terra" => Ok(Self::OpenaiGpt56Terra),
6714            "openai.gpt-oss-120b" => Ok(Self::OpenaiGptOss120b),
6715            "openai.gpt-oss-120b-1:0" => Ok(Self::OpenaiGptOss120b10),
6716            "openai.gpt-oss-20b" => Ok(Self::OpenaiGptOss20b),
6717            "openai.gpt-oss-20b-1:0" => Ok(Self::OpenaiGptOss20b10),
6718            "openai.gpt-oss-safeguard-120b" => Ok(Self::OpenaiGptOssSafeguard120b),
6719            "openai.gpt-oss-safeguard-20b" => Ok(Self::OpenaiGptOssSafeguard20b),
6720            "qwen.qwen3-235b-a22b-2507-v1:0" => Ok(Self::QwenQwen3235bA22b2507V10),
6721            "qwen.qwen3-32b-v1:0" => Ok(Self::QwenQwen332bV10),
6722            "qwen.qwen3-coder-30b-a3b-v1:0" => Ok(Self::QwenQwen3Coder30bA3bV10),
6723            "qwen.qwen3-coder-480b-a35b-v1:0" => Ok(Self::QwenQwen3Coder480bA35bV10),
6724            "qwen.qwen3-coder-next" => Ok(Self::QwenQwen3CoderNext),
6725            "qwen.qwen3-next-80b-a3b" => Ok(Self::QwenQwen3Next80bA3b),
6726            "qwen.qwen3-vl-235b-a22b" => Ok(Self::QwenQwen3Vl235bA22b),
6727            "us.anthropic.claude-fable-5" => Ok(Self::UsAnthropicClaudeFable5),
6728            "us.anthropic.claude-haiku-4-5-20251001-v1:0" => {
6729                Ok(Self::UsAnthropicClaudeHaiku4520251001V10)
6730            }
6731            "us.anthropic.claude-opus-4-1-20250805-v1:0" => {
6732                Ok(Self::UsAnthropicClaudeOpus4120250805V10)
6733            }
6734            "us.anthropic.claude-opus-4-5-20251101-v1:0" => {
6735                Ok(Self::UsAnthropicClaudeOpus4520251101V10)
6736            }
6737            "us.anthropic.claude-opus-4-6-v1" => Ok(Self::UsAnthropicClaudeOpus46V1),
6738            "us.anthropic.claude-opus-4-7" => Ok(Self::UsAnthropicClaudeOpus47),
6739            "us.anthropic.claude-opus-4-8" => Ok(Self::UsAnthropicClaudeOpus48),
6740            "us.anthropic.claude-sonnet-4-5-20250929-v1:0" => {
6741                Ok(Self::UsAnthropicClaudeSonnet4520250929V10)
6742            }
6743            "us.anthropic.claude-sonnet-4-6" => Ok(Self::UsAnthropicClaudeSonnet46),
6744            "us.anthropic.claude-sonnet-5" => Ok(Self::UsAnthropicClaudeSonnet5),
6745            "us.deepseek.r1-v1:0" => Ok(Self::UsDeepseekR1V10),
6746            "us.meta.llama4-maverick-17b-instruct-v1:0" => {
6747                Ok(Self::UsMetaLlama4Maverick17bInstructV10)
6748            }
6749            "us.meta.llama4-scout-17b-instruct-v1:0" => {
6750                Ok(Self::UsMetaLlama4Scout17bInstructV10)
6751            }
6752            "writer.palmyra-x4-v1:0" => Ok(Self::WriterPalmyraX4V10),
6753            "writer.palmyra-x5-v1:0" => Ok(Self::WriterPalmyraX5V10),
6754            "xai.grok-4.3" => Ok(Self::XaiGrok43),
6755            "zai.glm-4.7" => Ok(Self::ZaiGlm47),
6756            "zai.glm-4.7-flash" => Ok(Self::ZaiGlm47Flash),
6757            "zai.glm-5" => Ok(Self::ZaiGlm5),
6758            _ => Err(format!("Unknown bedrock model: '{s}'")),
6759        }
6760    }
6761}
6762/// A model from a specific provider
6763#[derive(Debug, Clone, PartialEq, Eq, Hash)]
6764pub enum LlmModel {
6765    Anthropic(AnthropicModel),
6766    AzureFoundry(AzureFoundryModel),
6767    Codex(CodexModel),
6768    DeepSeek(DeepSeekModel),
6769    Fireworks(FireworksModel),
6770    Gemini(GeminiModel),
6771    Moonshot(MoonshotModel),
6772    Openai(OpenaiModel),
6773    OpenRouter(OpenRouterModel),
6774    ZAi(ZAiModel),
6775    Bedrock(BedrockModel),
6776    Ollama(String),
6777    LlamaCpp(String),
6778}
6779impl From<AnthropicModel> for LlmModel {
6780    fn from(m: AnthropicModel) -> Self {
6781        LlmModel::Anthropic(m)
6782    }
6783}
6784impl From<AzureFoundryModel> for LlmModel {
6785    fn from(m: AzureFoundryModel) -> Self {
6786        LlmModel::AzureFoundry(m)
6787    }
6788}
6789impl From<CodexModel> for LlmModel {
6790    fn from(m: CodexModel) -> Self {
6791        LlmModel::Codex(m)
6792    }
6793}
6794impl From<DeepSeekModel> for LlmModel {
6795    fn from(m: DeepSeekModel) -> Self {
6796        LlmModel::DeepSeek(m)
6797    }
6798}
6799impl From<FireworksModel> for LlmModel {
6800    fn from(m: FireworksModel) -> Self {
6801        LlmModel::Fireworks(m)
6802    }
6803}
6804impl From<GeminiModel> for LlmModel {
6805    fn from(m: GeminiModel) -> Self {
6806        LlmModel::Gemini(m)
6807    }
6808}
6809impl From<MoonshotModel> for LlmModel {
6810    fn from(m: MoonshotModel) -> Self {
6811        LlmModel::Moonshot(m)
6812    }
6813}
6814impl From<OpenaiModel> for LlmModel {
6815    fn from(m: OpenaiModel) -> Self {
6816        LlmModel::Openai(m)
6817    }
6818}
6819impl From<OpenRouterModel> for LlmModel {
6820    fn from(m: OpenRouterModel) -> Self {
6821        LlmModel::OpenRouter(m)
6822    }
6823}
6824impl From<ZAiModel> for LlmModel {
6825    fn from(m: ZAiModel) -> Self {
6826        LlmModel::ZAi(m)
6827    }
6828}
6829impl From<BedrockModel> for LlmModel {
6830    fn from(m: BedrockModel) -> Self {
6831        LlmModel::Bedrock(m)
6832    }
6833}
6834impl LlmModel {
6835    /// Raw model ID (e.g. `claude-opus-4-6`, `llama3.2`)
6836    pub fn model_id(&self) -> Cow<'static, str> {
6837        match self {
6838            Self::Anthropic(m) => Cow::Borrowed(m.model_id()),
6839            Self::AzureFoundry(m) => Cow::Borrowed(m.model_id()),
6840            Self::Codex(m) => Cow::Borrowed(m.model_id()),
6841            Self::DeepSeek(m) => Cow::Borrowed(m.model_id()),
6842            Self::Fireworks(m) => Cow::Borrowed(m.model_id()),
6843            Self::Gemini(m) => Cow::Borrowed(m.model_id()),
6844            Self::Moonshot(m) => Cow::Borrowed(m.model_id()),
6845            Self::Openai(m) => Cow::Borrowed(m.model_id()),
6846            Self::OpenRouter(m) => Cow::Borrowed(m.model_id()),
6847            Self::ZAi(m) => Cow::Borrowed(m.model_id()),
6848            Self::Bedrock(m) => m.model_id(),
6849            Self::Ollama(s) | Self::LlamaCpp(s) => Cow::Owned(s.clone()),
6850        }
6851    }
6852    /// Human-readable display name (e.g. `Claude Opus 4.6`)
6853    pub fn display_name(&self) -> Cow<'static, str> {
6854        match self {
6855            Self::Anthropic(m) => Cow::Borrowed(m.display_name()),
6856            Self::AzureFoundry(m) => Cow::Borrowed(m.display_name()),
6857            Self::Codex(m) => Cow::Borrowed(m.display_name()),
6858            Self::DeepSeek(m) => Cow::Borrowed(m.display_name()),
6859            Self::Fireworks(m) => Cow::Borrowed(m.display_name()),
6860            Self::Gemini(m) => Cow::Borrowed(m.display_name()),
6861            Self::Moonshot(m) => Cow::Borrowed(m.display_name()),
6862            Self::Openai(m) => Cow::Borrowed(m.display_name()),
6863            Self::OpenRouter(m) => Cow::Borrowed(m.display_name()),
6864            Self::ZAi(m) => Cow::Borrowed(m.display_name()),
6865            Self::Bedrock(m) => m.display_name(),
6866            Self::Ollama(s) => Cow::Owned(format!("Ollama {s}")),
6867            Self::LlamaCpp(s) => Cow::Owned(format!("LlamaCpp {s}")),
6868        }
6869    }
6870    /// Provider identifier (e.g. `anthropic`)
6871    pub fn provider(&self) -> &'static str {
6872        match self {
6873            Self::Anthropic(_) => "anthropic",
6874            Self::AzureFoundry(_) => "azure-foundry",
6875            Self::Codex(_) => "codex",
6876            Self::DeepSeek(_) => "deepseek",
6877            Self::Fireworks(_) => "fireworks",
6878            Self::Gemini(_) => "gemini",
6879            Self::Moonshot(_) => "moonshot",
6880            Self::Openai(_) => "openai",
6881            Self::OpenRouter(_) => "openrouter",
6882            Self::ZAi(_) => "zai",
6883            Self::Bedrock(_) => "bedrock",
6884            Self::Ollama(_) => "ollama",
6885            Self::LlamaCpp(_) => "llamacpp",
6886        }
6887    }
6888    /// Typed provider identifier.
6889    pub fn provider_enum(&self) -> Provider {
6890        match self {
6891            Self::Anthropic(_) => Provider::Anthropic,
6892            Self::AzureFoundry(_) => Provider::AzureFoundry,
6893            Self::Codex(_) => Provider::Codex,
6894            Self::DeepSeek(_) => Provider::DeepSeek,
6895            Self::Fireworks(_) => Provider::Fireworks,
6896            Self::Gemini(_) => Provider::Gemini,
6897            Self::Moonshot(_) => Provider::Moonshot,
6898            Self::Openai(_) => Provider::Openai,
6899            Self::OpenRouter(_) => Provider::OpenRouter,
6900            Self::ZAi(_) => Provider::ZAi,
6901            Self::Bedrock(_) => Provider::Bedrock,
6902            Self::Ollama(_) => Provider::Ollama,
6903            Self::LlamaCpp(_) => Provider::LlamaCpp,
6904        }
6905    }
6906    /// Human-readable provider name (e.g. `AWS Bedrock`)
6907    pub fn provider_display_name(&self) -> &'static str {
6908        match self {
6909            Self::Anthropic(_) => "Anthropic",
6910            Self::AzureFoundry(_) => "Microsoft Foundry",
6911            Self::Codex(_) => "Codex",
6912            Self::DeepSeek(_) => "DeepSeek",
6913            Self::Fireworks(_) => "Fireworks AI",
6914            Self::Gemini(_) => "Gemini",
6915            Self::Moonshot(_) => "Moonshot",
6916            Self::Openai(_) => "OpenAI",
6917            Self::OpenRouter(_) => "OpenRouter",
6918            Self::ZAi(_) => "ZAI",
6919            Self::Bedrock(_) => "AWS Bedrock",
6920            Self::Ollama(_) => "Ollama",
6921            Self::LlamaCpp(_) => "LlamaCpp",
6922        }
6923    }
6924    /// Context window size in tokens (None for dynamic providers)
6925    pub fn context_window(&self) -> Option<u32> {
6926        match self {
6927            Self::Anthropic(m) => Some(m.context_window()),
6928            Self::AzureFoundry(m) => Some(m.context_window()),
6929            Self::Codex(m) => Some(m.context_window()),
6930            Self::DeepSeek(m) => Some(m.context_window()),
6931            Self::Fireworks(m) => Some(m.context_window()),
6932            Self::Gemini(m) => Some(m.context_window()),
6933            Self::Moonshot(m) => Some(m.context_window()),
6934            Self::Openai(m) => Some(m.context_window()),
6935            Self::OpenRouter(m) => Some(m.context_window()),
6936            Self::ZAi(m) => Some(m.context_window()),
6937            Self::Bedrock(m) => m.context_window(),
6938            Self::Ollama(_) | Self::LlamaCpp(_) => None,
6939        }
6940    }
6941    /// Required env var for this model's provider (None for local providers)
6942    pub fn required_env_var(&self) -> Option<&'static str> {
6943        match self {
6944            Self::Anthropic(_) => Some("ANTHROPIC_API_KEY"),
6945            Self::AzureFoundry(_) => Some("AZURE_OPENAI_API_KEY"),
6946            Self::DeepSeek(_) => Some("DEEPSEEK_API_KEY"),
6947            Self::Fireworks(_) => Some("FIREWORKS_API_KEY"),
6948            Self::Gemini(_) => Some("GEMINI_API_KEY"),
6949            Self::Moonshot(_) => Some("MOONSHOT_API_KEY"),
6950            Self::Openai(_) => Some("OPENAI_API_KEY"),
6951            Self::OpenRouter(_) => Some("OPENROUTER_API_KEY"),
6952            Self::ZAi(_) => Some("ZAI_API_KEY"),
6953            Self::Codex(_) | Self::Bedrock(_) | Self::Ollama(_) | Self::LlamaCpp(_) => {
6954                None
6955            }
6956        }
6957    }
6958    /// All provider API key env var names (deduplicated, static)
6959    pub const ALL_REQUIRED_ENV_VARS: &[&str] = &[
6960        "ANTHROPIC_API_KEY",
6961        "AZURE_OPENAI_API_KEY",
6962        "DEEPSEEK_API_KEY",
6963        "FIREWORKS_API_KEY",
6964        "GEMINI_API_KEY",
6965        "MOONSHOT_API_KEY",
6966        "OPENAI_API_KEY",
6967        "OPENROUTER_API_KEY",
6968        "ZAI_API_KEY",
6969    ];
6970    /// OAuth provider ID if this model requires OAuth login (e.g. `"codex"`)
6971    pub fn oauth_provider_id(&self) -> Option<&'static str> {
6972        match self {
6973            Self::Codex(_) => Some("codex"),
6974            Self::Anthropic(_)
6975            | Self::AzureFoundry(_)
6976            | Self::DeepSeek(_)
6977            | Self::Fireworks(_)
6978            | Self::Gemini(_)
6979            | Self::Moonshot(_)
6980            | Self::Openai(_)
6981            | Self::OpenRouter(_)
6982            | Self::ZAi(_)
6983            | Self::Bedrock(_)
6984            | Self::Ollama(_)
6985            | Self::LlamaCpp(_) => None,
6986        }
6987    }
6988    /// Reasoning levels supported by this model (empty if not a reasoning model)
6989    pub fn reasoning_levels(&self) -> &'static [ReasoningEffort] {
6990        match self {
6991            Self::Anthropic(m) => m.reasoning_levels(),
6992            Self::AzureFoundry(m) => m.reasoning_levels(),
6993            Self::Codex(m) => m.reasoning_levels(),
6994            Self::DeepSeek(m) => m.reasoning_levels(),
6995            Self::Fireworks(m) => m.reasoning_levels(),
6996            Self::Gemini(m) => m.reasoning_levels(),
6997            Self::Moonshot(m) => m.reasoning_levels(),
6998            Self::Openai(m) => m.reasoning_levels(),
6999            Self::OpenRouter(m) => m.reasoning_levels(),
7000            Self::ZAi(m) => m.reasoning_levels(),
7001            Self::Bedrock(m) => m.reasoning_levels(),
7002            Self::Ollama(_) | Self::LlamaCpp(_) => &[],
7003        }
7004    }
7005    /// Whether this model supports reasoning/extended thinking
7006    pub fn supports_reasoning(&self) -> bool {
7007        !self.reasoning_levels().is_empty()
7008    }
7009    /// Whether this model supports provider-side prompt caching
7010    pub fn supports_prompt_caching(&self) -> bool {
7011        match self {
7012            Self::Anthropic(m) => m.supports_prompt_caching(),
7013            Self::AzureFoundry(m) => m.supports_prompt_caching(),
7014            Self::Codex(m) => m.supports_prompt_caching(),
7015            Self::DeepSeek(m) => m.supports_prompt_caching(),
7016            Self::Fireworks(m) => m.supports_prompt_caching(),
7017            Self::Gemini(m) => m.supports_prompt_caching(),
7018            Self::Moonshot(m) => m.supports_prompt_caching(),
7019            Self::Openai(m) => m.supports_prompt_caching(),
7020            Self::OpenRouter(m) => m.supports_prompt_caching(),
7021            Self::ZAi(m) => m.supports_prompt_caching(),
7022            Self::Bedrock(m) => m.supports_prompt_caching(),
7023            Self::Ollama(_) | Self::LlamaCpp(_) => false,
7024        }
7025    }
7026    /// Whether this model supports image input
7027    pub fn supports_image(&self) -> bool {
7028        match self {
7029            Self::Anthropic(m) => m.supports_image(),
7030            Self::AzureFoundry(m) => m.supports_image(),
7031            Self::Codex(m) => m.supports_image(),
7032            Self::DeepSeek(m) => m.supports_image(),
7033            Self::Fireworks(m) => m.supports_image(),
7034            Self::Gemini(m) => m.supports_image(),
7035            Self::Moonshot(m) => m.supports_image(),
7036            Self::Openai(m) => m.supports_image(),
7037            Self::OpenRouter(m) => m.supports_image(),
7038            Self::ZAi(m) => m.supports_image(),
7039            Self::Bedrock(m) => m.supports_image(),
7040            Self::Ollama(_) | Self::LlamaCpp(_) => false,
7041        }
7042    }
7043    /// Whether this model supports audio input
7044    pub fn supports_audio(&self) -> bool {
7045        match self {
7046            Self::Anthropic(m) => m.supports_audio(),
7047            Self::AzureFoundry(m) => m.supports_audio(),
7048            Self::Codex(m) => m.supports_audio(),
7049            Self::DeepSeek(m) => m.supports_audio(),
7050            Self::Fireworks(m) => m.supports_audio(),
7051            Self::Gemini(m) => m.supports_audio(),
7052            Self::Moonshot(m) => m.supports_audio(),
7053            Self::Openai(m) => m.supports_audio(),
7054            Self::OpenRouter(m) => m.supports_audio(),
7055            Self::ZAi(m) => m.supports_audio(),
7056            Self::Bedrock(m) => m.supports_audio(),
7057            Self::Ollama(_) | Self::LlamaCpp(_) => false,
7058        }
7059    }
7060    /// All catalog models (excludes dynamic providers)
7061    pub fn all() -> &'static [LlmModel] {
7062        static ALL: LazyLock<Vec<LlmModel>> = LazyLock::new(|| {
7063            let mut v = Vec::new();
7064            v.extend(AnthropicModel::ALL.iter().copied().map(LlmModel::Anthropic));
7065            v.extend(AzureFoundryModel::ALL.iter().copied().map(LlmModel::AzureFoundry));
7066            v.extend(CodexModel::ALL.iter().copied().map(LlmModel::Codex));
7067            v.extend(DeepSeekModel::ALL.iter().copied().map(LlmModel::DeepSeek));
7068            v.extend(FireworksModel::ALL.iter().copied().map(LlmModel::Fireworks));
7069            v.extend(GeminiModel::ALL.iter().copied().map(LlmModel::Gemini));
7070            v.extend(MoonshotModel::ALL.iter().copied().map(LlmModel::Moonshot));
7071            v.extend(OpenaiModel::ALL.iter().copied().map(LlmModel::Openai));
7072            v.extend(OpenRouterModel::ALL.iter().copied().map(LlmModel::OpenRouter));
7073            v.extend(ZAiModel::ALL.iter().copied().map(LlmModel::ZAi));
7074            v.extend(
7075                BedrockFoundationModel::ALL
7076                    .iter()
7077                    .copied()
7078                    .map(BedrockModel::Foundation)
7079                    .map(LlmModel::Bedrock),
7080            );
7081            v
7082        });
7083        &ALL
7084    }
7085}
7086impl std::fmt::Display for LlmModel {
7087    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7088        write!(f, "{}:{}", self.provider(), self.model_id())
7089    }
7090}
7091impl std::str::FromStr for LlmModel {
7092    type Err = String;
7093    /// Parse a `provider:model` string into an `LlmModel`
7094    fn from_str(s: &str) -> Result<Self, Self::Err> {
7095        let (provider_str, model_str) = s.split_once(':').unwrap_or((s, ""));
7096        match provider_str {
7097            "anthropic" => model_str.parse::<AnthropicModel>().map(Self::Anthropic),
7098            "azure-foundry" => {
7099                model_str.parse::<AzureFoundryModel>().map(Self::AzureFoundry)
7100            }
7101            "codex" => model_str.parse::<CodexModel>().map(Self::Codex),
7102            "deepseek" => model_str.parse::<DeepSeekModel>().map(Self::DeepSeek),
7103            "fireworks" => model_str.parse::<FireworksModel>().map(Self::Fireworks),
7104            "gemini" => model_str.parse::<GeminiModel>().map(Self::Gemini),
7105            "moonshot" => model_str.parse::<MoonshotModel>().map(Self::Moonshot),
7106            "openai" => model_str.parse::<OpenaiModel>().map(Self::Openai),
7107            "openrouter" => model_str.parse::<OpenRouterModel>().map(Self::OpenRouter),
7108            "zai" => model_str.parse::<ZAiModel>().map(Self::ZAi),
7109            "bedrock" => model_str.parse::<BedrockModel>().map(Self::Bedrock),
7110            "ollama" => Ok(Self::Ollama(model_str.to_string())),
7111            "llamacpp" => Ok(Self::LlamaCpp(model_str.to_string())),
7112            _ => Err(format!("Unknown provider: '{provider_str}'")),
7113        }
7114    }
7115}