models/model_id.rs

VTCode · crates/codegen/vtcode-config/src/models/model_id.rs · rust · Apache-2.0
ai, AI / Agents

A type-safe enum for managing and identifying various AI models from multiple providers like OpenAI and Anthropic.

// Source: https://github.com/diegosouzapw/VTCode | License: Apache-2.0 | Copyright 2025 Vinh Nguyen
// Provided via justclaw.it.com; keep this notice with the code.
use serde::{Deserialize, Serialize};

mod as_str;
mod capabilities;
mod collection;
mod defaults;
mod description;
mod display;
mod format;
mod openrouter;
mod parse;
mod provider;
mod table;

pub use capabilities::{
    ModelCatalogEntry, ModelPricing, catalog_provider_keys, model_catalog_entry, supported_models_for_provider,
};

/// Centralized enum for all supported model identifiers
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ModelId {
    // Gemini models
    /// Gemini 3.1 Pro Preview - Latest Gemini 3.1 Pro flagship


... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key