pub enum Model {
Unspecified,
G2_0Flash,
G2_0FlashThinking,
G2_5Flash,
G2_5Pro,
G2_0ExpAdvanced,
G2_5ExpAdvanced,
G3_0Pro,
G3_0Flash,
G3_0Thinking,
}Expand description
Available model configurations.
This enum controls both the model name and the extra header value used by the web endpoint.
Variants§
Unspecified
Unspecified model - uses default.
G2_0Flash
Gemini 2.0 Flash.
G2_0FlashThinking
Gemini 2.0 Flash Thinking.
G2_5Flash
Gemini 2.5 Flash.
G2_5Pro
Gemini 2.5 Pro.
G2_0ExpAdvanced
Gemini 2.0 Experimental Advanced (requires advanced subscription).
G2_5ExpAdvanced
Gemini 2.5 Experimental Advanced (requires advanced subscription).
G3_0Pro
Gemini 3.0 Pro.
G3_0Flash
Gemini 3.0 Flash.
G3_0Thinking
Gemini 3.0 Flash Thinking.
Implementations§
Source§impl Model
impl Model
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
Returns the model name string used in saved conversation data.
Sourcepub fn headers(&self) -> Option<HeaderMap>
pub fn headers(&self) -> Option<HeaderMap>
Returns model-specific headers for the web endpoint.
The header key is x-goog-ext-525001261-jspb. Model::Unspecified
returns None, which means no extra model header is added.
Sourcepub fn is_advanced_only(&self) -> bool
pub fn is_advanced_only(&self) -> bool
Returns true if this model requires an advanced subscription.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Creates a model from a name string.
Accepted names are:
unspecifiedgemini-2.0-flashgemini-2.0-flash-thinkinggemini-2.5-flashgemini-2.5-progemini-2.0-exp-advancedgemini-2.5-exp-advancedgemini-3.0-progemini-3.0-flashgemini-3.0-thinking
Note that gemini-3.0-thinking maps to Model::G3_0Thinking, while
Model::name for that variant returns gemini-3.0-flash-thinking.