Skip to main content

OpenRouterModel

Enum OpenRouterModel 

Source
pub enum OpenRouterModel {
Show 103 variants Auto, Free, Gpt5, Gpt5Mini, Gpt5Nano, Gpt5Codex, Gpt5_1, Gpt5_2, Gpt5_2Pro, Gpt5_3Chat, Gpt5_4, Gpt5_4Mini, Gpt5_4Nano, Gpt5_4Pro, Gpt5_5, Gpt5_5Pro, Gpt4_1, Gpt4o, O3, O3Pro, O3DeepResearch, O4Mini, GptOss120b, ClaudeFable5, ClaudeSonnet4, ClaudeSonnet4_5, ClaudeOpus4_1, ClaudeOpus4_5, ClaudeOpus4_6, ClaudeOpus4_6Fast, ClaudeOpus4_7, ClaudeOpus4_7Fast, ClaudeOpus4_8, ClaudeOpus4_8Fast, ClaudeSonnet4_6, ClaudeHaiku4_5, Claude3_7Sonnet, Gemini35Flash, Gemini31ProPreview, Gemini31ProPreviewCustomTools, Gemini31FlashLite, Gemini31FlashLitePreview, Gemini31FlashImagePreview, Gemini3ProImagePreview, Gemini3FlashPreview, Gemini25Pro, Gemini25Flash, Gemini25FlashImage, Grok4_3, Grok4_20, Grok4_20MultiAgent, GrokBuild0_1, Grok4, Grok4Fast, Grok4_1Fast, GrokCodeFast1, Llama4Maverick, Llama4Scout, Llama3_3_70bInstruct, Llama3_2_11bVisionInstruct, Qwen3Max, Qwen3MaxThinking, Qwen3Coder, Qwen3CoderPlus, Qwen3_235bA22b, Qwen3Vl235bA22bInstruct, Qwen3Vl235bA22bThinking, Qwen3_7Max, Qwen3_7Plus, Qwen3_6MaxPreview, Qwen3_6Plus, Qwen3_6Flash, DeepseekChatV3_1, DeepseekR1, DeepseekV3_2, DeepseekV4Flash, DeepseekV4Pro, MistralLarge, MistralMedium3_1, Codestral2508, DevstralMedium, PixtralLarge2411, MistralLarge2512, MistralMedium3_5, Devstral2512, Ministral14b2512, SonarPro, SonarReasoningPro, SonarDeepResearch, CommandA, KimiK2_5, KimiK2Thinking, KimiK2_6, KimiK2_7Code, Glm5, Glm5_1, Glm5Turbo, Glm4_7, MimoV2Omni, MimoV2Flash, MimoV2_5, MimoV2_5Pro, Custom(String),
}
Expand description

OpenRouter model variants.

OpenRouter addresses models as vendor/model strings. The variants below cover the commonly used catalog entries; anything else can be named with OpenRouterModel::Custom, which is also what FromStr falls back to for unrecognized input.

Variants§

§

Auto

OpenRouter auto-router alias.

§

Free

OpenRouter free-tier alias.

§

Gpt5

OpenRouter model openai/gpt-5.

§

Gpt5Mini

OpenRouter model openai/gpt-5-mini.

§

Gpt5Nano

OpenRouter model openai/gpt-5-nano.

§

Gpt5Codex

OpenRouter model openai/gpt-5-codex.

§

Gpt5_1

OpenRouter model openai/gpt-5.1.

§

Gpt5_2

OpenRouter model openai/gpt-5.2.

§

Gpt5_2Pro

OpenRouter model openai/gpt-5.2-pro.

§

Gpt5_3Chat

OpenRouter model openai/gpt-5.3-chat.

§

Gpt5_4

OpenRouter model openai/gpt-5.4.

§

Gpt5_4Mini

OpenRouter model openai/gpt-5.4-mini.

§

Gpt5_4Nano

OpenRouter model openai/gpt-5.4-nano.

§

Gpt5_4Pro

OpenRouter model openai/gpt-5.4-pro.

§

Gpt5_5

OpenRouter model openai/gpt-5.5.

§

Gpt5_5Pro

OpenRouter model openai/gpt-5.5-pro.

§

Gpt4_1

OpenRouter model openai/gpt-4.1.

§

Gpt4o

OpenRouter model openai/gpt-4o.

§

O3

OpenRouter model openai/o3.

§

O3Pro

OpenRouter model openai/o3-pro.

§

O3DeepResearch

OpenRouter model openai/o3-deep-research.

§

O4Mini

OpenRouter model openai/o4-mini.

§

GptOss120b

OpenRouter model openai/gpt-oss-120b.

§

ClaudeFable5

OpenRouter model anthropic/claude-fable-5.

§

ClaudeSonnet4

OpenRouter model anthropic/claude-sonnet-4.

§

ClaudeSonnet4_5

OpenRouter model anthropic/claude-sonnet-4.5.

§

ClaudeOpus4_1

OpenRouter model anthropic/claude-opus-4.1.

§

ClaudeOpus4_5

OpenRouter model anthropic/claude-opus-4.5.

§

ClaudeOpus4_6

OpenRouter model anthropic/claude-opus-4.6.

§

ClaudeOpus4_6Fast

OpenRouter model anthropic/claude-opus-4.6-fast.

§

ClaudeOpus4_7

OpenRouter model anthropic/claude-opus-4.7.

§

ClaudeOpus4_7Fast

OpenRouter model anthropic/claude-opus-4.7-fast.

§

ClaudeOpus4_8

OpenRouter model anthropic/claude-opus-4.8.

§

ClaudeOpus4_8Fast

OpenRouter model anthropic/claude-opus-4.8-fast.

§

ClaudeSonnet4_6

OpenRouter model anthropic/claude-sonnet-4.6.

§

ClaudeHaiku4_5

OpenRouter model anthropic/claude-haiku-4.5.

§

Claude3_7Sonnet

OpenRouter model anthropic/claude-3.7-sonnet.

§

Gemini35Flash

OpenRouter model google/gemini-3.5-flash.

§

Gemini31ProPreview

OpenRouter model google/gemini-3.1-pro-preview.

§

Gemini31ProPreviewCustomTools

OpenRouter model google/gemini-3.1-pro-preview-customtools.

§

Gemini31FlashLite

OpenRouter model google/gemini-3.1-flash-lite.

§

Gemini31FlashLitePreview

OpenRouter model google/gemini-3.1-flash-lite-preview.

§

Gemini31FlashImagePreview

OpenRouter model google/gemini-3.1-flash-image-preview.

§

Gemini3ProImagePreview

OpenRouter model google/gemini-3-pro-image-preview.

§

Gemini3FlashPreview

OpenRouter model google/gemini-3-flash-preview.

§

Gemini25Pro

OpenRouter model google/gemini-2.5-pro.

§

Gemini25Flash

OpenRouter model google/gemini-2.5-flash.

§

Gemini25FlashImage

OpenRouter model google/gemini-2.5-flash-image.

§

Grok4_3

OpenRouter model x-ai/grok-4.3.

§

Grok4_20

OpenRouter model x-ai/grok-4.20.

§

Grok4_20MultiAgent

OpenRouter model x-ai/grok-4.20-multi-agent.

§

GrokBuild0_1

OpenRouter model x-ai/grok-build-0.1.

§

Grok4

OpenRouter model x-ai/grok-4.

§

Grok4Fast

OpenRouter model x-ai/grok-4-fast.

§

Grok4_1Fast

OpenRouter model x-ai/grok-4.1-fast.

§

GrokCodeFast1

OpenRouter model x-ai/grok-code-fast-1.

§

Llama4Maverick

OpenRouter model meta-llama/llama-4-maverick.

§

Llama4Scout

OpenRouter model meta-llama/llama-4-scout.

§

Llama3_3_70bInstruct

OpenRouter model meta-llama/llama-3.3-70b-instruct.

§

Llama3_2_11bVisionInstruct

OpenRouter model meta-llama/llama-3.2-11b-vision-instruct.

§

Qwen3Max

OpenRouter model qwen/qwen3-max.

§

Qwen3MaxThinking

OpenRouter model qwen/qwen3-max-thinking.

§

Qwen3Coder

OpenRouter model qwen/qwen3-coder.

§

Qwen3CoderPlus

OpenRouter model qwen/qwen3-coder-plus.

§

Qwen3_235bA22b

OpenRouter model qwen/qwen3-235b-a22b.

§

Qwen3Vl235bA22bInstruct

OpenRouter model qwen/qwen3-vl-235b-a22b-instruct.

§

Qwen3Vl235bA22bThinking

OpenRouter model qwen/qwen3-vl-235b-a22b-thinking.

§

Qwen3_7Max

OpenRouter model qwen/qwen3.7-max.

§

Qwen3_7Plus

OpenRouter model qwen/qwen3.7-plus.

§

Qwen3_6MaxPreview

OpenRouter model qwen/qwen3.6-max-preview.

§

Qwen3_6Plus

OpenRouter model qwen/qwen3.6-plus.

§

Qwen3_6Flash

OpenRouter model qwen/qwen3.6-flash.

§

DeepseekChatV3_1

OpenRouter model deepseek/deepseek-chat-v3.1.

§

DeepseekR1

OpenRouter model deepseek/deepseek-r1.

§

DeepseekV3_2

OpenRouter model deepseek/deepseek-v3.2.

§

DeepseekV4Flash

OpenRouter model deepseek/deepseek-v4-flash.

§

DeepseekV4Pro

OpenRouter model deepseek/deepseek-v4-pro.

§

MistralLarge

OpenRouter model mistralai/mistral-large.

§

MistralMedium3_1

OpenRouter model mistralai/mistral-medium-3.1.

§

Codestral2508

OpenRouter model mistralai/codestral-2508.

§

DevstralMedium

OpenRouter model mistralai/devstral-medium.

§

PixtralLarge2411

OpenRouter model mistralai/pixtral-large-2411.

§

MistralLarge2512

OpenRouter model mistralai/mistral-large-2512.

§

MistralMedium3_5

OpenRouter model mistralai/mistral-medium-3-5.

§

Devstral2512

OpenRouter model mistralai/devstral-2512.

§

Ministral14b2512

OpenRouter model mistralai/ministral-14b-2512.

§

SonarPro

OpenRouter model perplexity/sonar-pro.

§

SonarReasoningPro

OpenRouter model perplexity/sonar-reasoning-pro.

§

SonarDeepResearch

OpenRouter model perplexity/sonar-deep-research.

§

CommandA

OpenRouter model cohere/command-a.

§

KimiK2_5

OpenRouter model moonshotai/kimi-k2.5.

§

KimiK2Thinking

OpenRouter model moonshotai/kimi-k2-thinking.

§

KimiK2_6

OpenRouter model moonshotai/kimi-k2.6.

§

KimiK2_7Code

OpenRouter model moonshotai/kimi-k2.7-code.

§

Glm5

OpenRouter model z-ai/glm-5.

§

Glm5_1

OpenRouter model z-ai/glm-5.1.

§

Glm5Turbo

OpenRouter model z-ai/glm-5-turbo.

§

Glm4_7

OpenRouter model z-ai/glm-4.7.

§

MimoV2Omni

OpenRouter model xiaomi/mimo-v2-omni.

§

MimoV2Flash

OpenRouter model xiaomi/mimo-v2-flash.

§

MimoV2_5

OpenRouter model xiaomi/mimo-v2.5.

§

MimoV2_5Pro

OpenRouter model xiaomi/mimo-v2.5-pro.

§

Custom(String)

Any other OpenRouter vendor/model string.

Implementations§

Source§

impl OpenRouterModel

Source

pub fn as_str(&self) -> &str

The vendor/model identifier OpenRouter expects in the request body.

Trait Implementations§

Source§

impl Clone for OpenRouterModel

Source§

fn clone(&self) -> OpenRouterModel

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OpenRouterModel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for OpenRouterModel

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for OpenRouterModel

Source§

impl FromStr for OpenRouterModel

Source§

type Err = Infallible

The associated error which can be returned from parsing.
Source§

fn from_str(value: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for OpenRouterModel

Source§

fn eq(&self, other: &OpenRouterModel) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for OpenRouterModel

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for OpenRouterModel

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more