Skip to main content

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