use chrono::Utc;
use crate::model_config::{ModelCapabilities, ModelType};
use super::types::{DiscoveredModel, DiscoverySource};
pub fn unknown_model(provider: &str, model_id: &str) -> DiscoveredModel {
tracing::warn!(
provider = provider,
model = model_id,
"Model not found in discovery registry; returning unknown capabilities"
);
DiscoveredModel {
id: model_id.to_string(),
name: model_id.to_string(),
provider: provider.to_string(),
source: DiscoverySource::Unknown,
available: true,
..Default::default()
}
}
pub fn openai_models() -> Vec<DiscoveredModel> {
let now = Utc::now();
vec![
DiscoveredModel {
id: "gpt-5.5".into(),
name: "GPT-5.5".into(),
provider: "openai".into(),
context_length: 1_048_576,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(5.00),
cost_per_m_output: Some(30.00),
model_type: ModelType::Llm,
tags: vec!["flagship".into()],
deprecated: false,
},
DiscoveredModel {
id: "gpt-5.4".into(),
name: "GPT-5.4".into(),
provider: "openai".into(),
context_length: 1_048_576,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(2.50),
cost_per_m_output: Some(15.00),
model_type: ModelType::Llm,
tags: vec![],
deprecated: false,
},
DiscoveredModel {
id: "gpt-4.1".into(),
name: "GPT-4.1".into(),
provider: "openai".into(),
context_length: 1_048_576,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(2.00),
cost_per_m_output: Some(8.00),
model_type: ModelType::Llm,
tags: vec!["coding".into()],
deprecated: false,
},
DiscoveredModel {
id: "gpt-4.1-mini".into(),
name: "GPT-4.1 Mini".into(),
provider: "openai".into(),
context_length: 1_048_576,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.40),
cost_per_m_output: Some(1.60),
model_type: ModelType::Llm,
tags: vec!["fast".into()],
deprecated: false,
},
DiscoveredModel {
id: "gpt-4.1-nano".into(),
name: "GPT-4.1 Nano (Deprecated)".into(),
provider: "openai".into(),
context_length: 1_048_576,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.10),
cost_per_m_output: Some(0.40),
model_type: ModelType::Llm,
tags: vec!["fast".into(), "affordable".into()],
deprecated: true,
},
DiscoveredModel {
id: "o3".into(),
name: "o3".into(),
provider: "openai".into(),
context_length: 200_000,
max_output_tokens: 100_000,
capabilities: ModelCapabilities {
context_length: 200_000,
max_output_tokens: 100_000,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(2.00),
cost_per_m_output: Some(8.00),
model_type: ModelType::Llm,
tags: vec!["reasoning".into()],
deprecated: false,
},
DiscoveredModel {
id: "o4-mini".into(),
name: "o4-mini (Deprecated)".into(),
provider: "openai".into(),
context_length: 200_000,
max_output_tokens: 100_000,
capabilities: ModelCapabilities {
context_length: 200_000,
max_output_tokens: 100_000,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(1.10),
cost_per_m_output: Some(4.40),
model_type: ModelType::Llm,
tags: vec!["reasoning".into(), "affordable".into()],
deprecated: true,
},
DiscoveredModel {
id: "gpt-5".into(),
name: "GPT-5".into(),
provider: "openai".into(),
context_length: 1_048_576,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(2.00),
cost_per_m_output: Some(8.00),
model_type: ModelType::Llm,
tags: vec!["reasoning".into()],
deprecated: false,
},
DiscoveredModel {
id: "gpt-5-mini".into(),
name: "GPT-5 Mini".into(),
provider: "openai".into(),
context_length: 1_048_576,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.40),
cost_per_m_output: Some(1.60),
model_type: ModelType::Llm,
tags: vec!["reasoning".into(), "fast".into()],
deprecated: false,
},
DiscoveredModel {
id: "text-embedding-3-small".into(),
name: "Embedding 3 Small".into(),
provider: "openai".into(),
context_length: 8_191,
max_output_tokens: 0,
capabilities: ModelCapabilities {
embedding_dimension: 1536,
max_embedding_tokens: 8191,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.02),
cost_per_m_output: None,
model_type: ModelType::Embedding,
tags: vec!["embedding".into()],
deprecated: false,
},
DiscoveredModel {
id: "text-embedding-3-large".into(),
name: "Embedding 3 Large".into(),
provider: "openai".into(),
context_length: 8_191,
max_output_tokens: 0,
capabilities: ModelCapabilities {
embedding_dimension: 3072,
max_embedding_tokens: 8191,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.13),
cost_per_m_output: None,
model_type: ModelType::Embedding,
tags: vec!["embedding".into()],
deprecated: false,
},
]
}
pub fn anthropic_models() -> Vec<DiscoveredModel> {
let now = Utc::now();
vec![
DiscoveredModel {
id: "claude-fable-5".into(),
name: "Claude Fable 5".into(),
provider: "anthropic".into(),
context_length: 1_048_576,
max_output_tokens: 131_072,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 131_072,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(10.00),
cost_per_m_output: Some(50.00),
model_type: ModelType::Llm,
tags: vec!["flagship".into(), "reasoning".into()],
deprecated: false,
},
DiscoveredModel {
id: "claude-opus-4-8".into(),
name: "Claude Opus 4.8".into(),
provider: "anthropic".into(),
context_length: 1_048_576,
max_output_tokens: 131_072,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 131_072,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(5.00),
cost_per_m_output: Some(25.00),
model_type: ModelType::Llm,
tags: vec!["reasoning".into()],
deprecated: false,
},
DiscoveredModel {
id: "claude-sonnet-5".into(),
name: "Claude Sonnet 5".into(),
provider: "anthropic".into(),
context_length: 1_048_576,
max_output_tokens: 131_072,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 131_072,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(3.00),
cost_per_m_output: Some(15.00),
model_type: ModelType::Llm,
tags: vec!["coding".into(), "balanced".into()],
deprecated: false,
},
DiscoveredModel {
id: "claude-opus-4-7".into(),
name: "Claude Opus 4.7".into(),
provider: "anthropic".into(),
context_length: 1_048_576,
max_output_tokens: 131_072,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 131_072,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: None,
cost_per_m_output: None,
model_type: ModelType::Llm,
tags: vec!["reasoning".into()],
deprecated: false,
},
DiscoveredModel {
id: "claude-opus-4-6".into(),
name: "Claude Opus 4.6".into(),
provider: "anthropic".into(),
context_length: 1_048_576,
max_output_tokens: 131_072,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 131_072,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: None,
cost_per_m_output: None,
model_type: ModelType::Llm,
tags: vec![],
deprecated: false,
},
DiscoveredModel {
id: "claude-sonnet-4-6".into(),
name: "Claude Sonnet 4.6".into(),
provider: "anthropic".into(),
context_length: 1_048_576,
max_output_tokens: 65_536,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 65_536,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: None,
cost_per_m_output: None,
model_type: ModelType::Llm,
tags: vec![],
deprecated: false,
},
DiscoveredModel {
id: "claude-sonnet-4-5-20250929".into(),
name: "Claude Sonnet 4.5".into(),
provider: "anthropic".into(),
context_length: 200_000,
max_output_tokens: 65_536,
capabilities: ModelCapabilities {
context_length: 200_000,
max_output_tokens: 65_536,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(3.00),
cost_per_m_output: Some(15.00),
model_type: ModelType::Llm,
tags: vec![],
deprecated: false,
},
DiscoveredModel {
id: "claude-3-5-sonnet-20241022".into(),
name: "Claude 3.5 Sonnet".into(),
provider: "anthropic".into(),
context_length: 200_000,
max_output_tokens: 8_192,
capabilities: ModelCapabilities {
context_length: 200_000,
max_output_tokens: 8_192,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(3.00),
cost_per_m_output: Some(15.00),
model_type: ModelType::Llm,
tags: vec![],
deprecated: false,
},
DiscoveredModel {
id: "claude-haiku-4-5".into(),
name: "Claude Haiku 4.5".into(),
provider: "anthropic".into(),
context_length: 200_000,
max_output_tokens: 65_536,
capabilities: ModelCapabilities {
context_length: 200_000,
max_output_tokens: 65_536,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(1.00),
cost_per_m_output: Some(5.00),
model_type: ModelType::Llm,
tags: vec!["fast".into(), "affordable".into()],
deprecated: false,
},
DiscoveredModel {
id: "claude-3-5-haiku-20241022".into(),
name: "Claude 3.5 Haiku (Legacy)".into(),
provider: "anthropic".into(),
context_length: 200_000,
max_output_tokens: 8_192,
capabilities: ModelCapabilities {
context_length: 200_000,
max_output_tokens: 8_192,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.80),
cost_per_m_output: Some(4.00),
model_type: ModelType::Llm,
tags: vec!["fast".into(), "affordable".into()],
deprecated: false,
},
]
}
pub fn gemini_models() -> Vec<DiscoveredModel> {
let now = Utc::now();
vec![
DiscoveredModel {
id: "gemini-3.5-flash".into(),
name: "Gemini 3.5 Flash".into(),
provider: "gemini".into(),
context_length: 1_048_576,
max_output_tokens: 65_536,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 65_536,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(1.50),
cost_per_m_output: Some(9.00),
model_type: ModelType::Llm,
tags: vec!["fast".into()],
deprecated: false,
},
DiscoveredModel {
id: "gemini-2.5-pro".into(),
name: "Gemini 2.5 Pro".into(),
provider: "gemini".into(),
context_length: 1_048_576,
max_output_tokens: 65_536,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 65_536,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(1.25),
cost_per_m_output: Some(10.00),
model_type: ModelType::Llm,
tags: vec!["reasoning".into()],
deprecated: false,
},
DiscoveredModel {
id: "gemini-2.5-flash".into(),
name: "Gemini 2.5 Flash".into(),
provider: "gemini".into(),
context_length: 1_048_576,
max_output_tokens: 65_536,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 65_536,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.30),
cost_per_m_output: Some(2.50),
model_type: ModelType::Llm,
tags: vec!["fast".into(), "affordable".into()],
deprecated: false,
},
DiscoveredModel {
id: "gemini-3.1-pro-preview".into(),
name: "Gemini 3.1 Pro".into(),
provider: "gemini".into(),
context_length: 1_048_576,
max_output_tokens: 65_536,
capabilities: ModelCapabilities {
context_length: 1_048_576,
max_output_tokens: 65_536,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(2.00),
cost_per_m_output: Some(12.00),
model_type: ModelType::Llm,
tags: vec!["reasoning".into()],
deprecated: false,
},
]
}
pub fn mistral_models() -> Vec<DiscoveredModel> {
let now = Utc::now();
vec![
DiscoveredModel {
id: "mistral-large-latest".into(),
name: "Mistral Large 3".into(),
provider: "mistral".into(),
context_length: 262_144,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 262_144,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.50),
cost_per_m_output: Some(1.50),
model_type: ModelType::Llm,
tags: vec!["flagship".into()],
deprecated: false,
},
DiscoveredModel {
id: "mistral-small-latest".into(),
name: "Mistral Small 4".into(),
provider: "mistral".into(),
context_length: 262_144,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 262_144,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.15),
cost_per_m_output: Some(0.60),
model_type: ModelType::Llm,
tags: vec!["fast".into(), "affordable".into()],
deprecated: false,
},
DiscoveredModel {
id: "codestral-latest".into(),
name: "Codestral".into(),
provider: "mistral".into(),
context_length: 262_144,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 262_144,
max_output_tokens: 32_768,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.30),
cost_per_m_output: Some(0.90),
model_type: ModelType::Llm,
tags: vec!["coding".into()],
deprecated: false,
},
DiscoveredModel {
id: "mistral-medium-latest".into(),
name: "Mistral Medium 3.5".into(),
provider: "mistral".into(),
context_length: 262_144,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 262_144,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(1.50),
cost_per_m_output: Some(7.50),
model_type: ModelType::Llm,
tags: vec!["reasoning".into(), "agentic".into()],
deprecated: false,
},
DiscoveredModel {
id: "magistral-medium-latest".into(),
name: "Magistral Medium".into(),
provider: "mistral".into(),
context_length: 131_072,
max_output_tokens: 40_960,
capabilities: ModelCapabilities {
context_length: 131_072,
max_output_tokens: 40_960,
supports_function_calling: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(2.00),
cost_per_m_output: Some(5.00),
model_type: ModelType::Llm,
tags: vec!["reasoning".into()],
deprecated: false,
},
DiscoveredModel {
id: "pixtral-large-latest".into(),
name: "Pixtral Large".into(),
provider: "mistral".into(),
context_length: 131_072,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 131_072,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(2.00),
cost_per_m_output: Some(6.00),
model_type: ModelType::Llm,
tags: vec!["vision".into()],
deprecated: false,
},
]
}
pub fn xai_models() -> Vec<DiscoveredModel> {
let now = Utc::now();
vec![
DiscoveredModel {
id: "grok-4.3".into(),
name: "Grok 4.3".into(),
provider: "xai".into(),
context_length: 1_000_000,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 1_000_000,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_thinking: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(1.25),
cost_per_m_output: Some(2.50),
model_type: ModelType::Llm,
tags: vec!["flagship".into(), "reasoning".into()],
deprecated: false,
},
DiscoveredModel {
id: "grok-build-0.1".into(),
name: "Grok Build 0.1".into(),
provider: "xai".into(),
context_length: 262_144,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 262_144,
max_output_tokens: 32_768,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(1.00),
cost_per_m_output: Some(2.00),
model_type: ModelType::Llm,
tags: vec!["coding".into()],
deprecated: false,
},
]
}
pub fn cohere_models() -> Vec<DiscoveredModel> {
let now = chrono::Utc::now();
vec![
DiscoveredModel {
id: "command-a-plus-05-2026".into(),
name: "Command A Plus (May 2026)".into(),
provider: "cohere".into(),
context_length: 256_000,
max_output_tokens: 16_384,
capabilities: ModelCapabilities {
context_length: 256_000,
max_output_tokens: 16_384,
supports_vision: false,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(2.50),
cost_per_m_output: Some(10.00),
model_type: ModelType::Llm,
tags: vec!["flagship".into()],
deprecated: false,
},
DiscoveredModel {
id: "command-r-plus-08-2024".into(),
name: "Command R+ (Aug 2024)".into(),
provider: "cohere".into(),
context_length: 128_000,
max_output_tokens: 4_096,
capabilities: ModelCapabilities {
context_length: 128_000,
max_output_tokens: 4_096,
supports_vision: false,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(2.50),
cost_per_m_output: Some(10.00),
model_type: ModelType::Llm,
tags: vec![],
deprecated: false,
},
DiscoveredModel {
id: "command-r-08-2024".into(),
name: "Command R (Aug 2024)".into(),
provider: "cohere".into(),
context_length: 128_000,
max_output_tokens: 4_096,
capabilities: ModelCapabilities {
context_length: 128_000,
max_output_tokens: 4_096,
supports_vision: false,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.15),
cost_per_m_output: Some(0.60),
model_type: ModelType::Llm,
tags: vec!["fast".into(), "affordable".into()],
deprecated: false,
},
DiscoveredModel {
id: "embed-v4.0".into(),
name: "Embed v4.0".into(),
provider: "cohere".into(),
context_length: 128_000,
max_output_tokens: 0,
capabilities: ModelCapabilities {
context_length: 128_000,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.10),
cost_per_m_output: None,
model_type: ModelType::Embedding,
tags: vec!["embedding".into(), "multimodal".into()],
deprecated: false,
},
]
}
pub fn nvidia_models() -> Vec<DiscoveredModel> {
let now = chrono::Utc::now();
vec![
DiscoveredModel {
id: "nvidia/llama-3.3-nemotron-super-49b-v1".into(),
name: "Nemotron Super 49B".into(),
provider: "nvidia".into(),
context_length: 131_072,
max_output_tokens: 32_768,
capabilities: ModelCapabilities {
context_length: 131_072,
max_output_tokens: 32_768,
supports_vision: true,
supports_function_calling: true,
supports_json_mode: true,
supports_streaming: true,
supports_system_message: true,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.80),
cost_per_m_output: Some(1.20),
model_type: ModelType::Llm,
tags: vec!["flagship".into()],
deprecated: false,
},
DiscoveredModel {
id: "nvidia/llama-nemotron-embed-1b-v2".into(),
name: "Nemotron Embed 1B v2".into(),
provider: "nvidia".into(),
context_length: 8_192,
max_output_tokens: 0,
capabilities: ModelCapabilities {
context_length: 8_192,
..Default::default()
},
source: DiscoverySource::StaticRegistry,
discovered_at: now,
available: true,
cost_per_m_input: Some(0.01),
cost_per_m_output: None,
model_type: ModelType::Embedding,
tags: vec!["embedding".into()],
deprecated: false,
},
]
}
pub fn all_static_models() -> Vec<DiscoveredModel> {
let mut all = Vec::with_capacity(96);
all.extend(openai_models());
all.extend(anthropic_models());
all.extend(gemini_models());
all.extend(mistral_models());
all.extend(xai_models());
all.extend(cohere_models());
all.extend(nvidia_models());
all
}
pub fn static_lookup(provider: &str, model_id: &str) -> Option<DiscoveredModel> {
let models = match provider {
"openai" => openai_models(),
"anthropic" => anthropic_models(),
"gemini" | "vertexai" => gemini_models(),
"mistral" => mistral_models(),
"xai" => xai_models(),
"cohere" => cohere_models(),
"nvidia" => nvidia_models(),
_ => return None,
};
models.into_iter().find(|m| m.id == model_id)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_openai_registry_not_empty() {
let models = openai_models();
assert!(!models.is_empty());
assert!(models.iter().all(|m| m.provider == "openai"));
}
#[test]
fn test_anthropic_registry_not_empty() {
let models = anthropic_models();
assert!(!models.is_empty());
assert!(models.iter().all(|m| m.provider == "anthropic"));
}
#[test]
fn test_gemini_registry_not_empty() {
let models = gemini_models();
assert!(!models.is_empty());
}
#[test]
fn test_all_static_models_no_empty_ids() {
for model in all_static_models() {
assert!(!model.id.is_empty(), "Model has empty ID");
assert!(
!model.provider.is_empty(),
"Model {} has empty provider",
model.id
);
assert!(
model.source == DiscoverySource::StaticRegistry,
"Model {} has wrong source",
model.id
);
}
}
#[test]
fn test_static_lookup_found() {
assert!(static_lookup("openai", "gpt-4.1").is_some());
assert!(static_lookup("anthropic", "claude-fable-5").is_some());
}
#[test]
fn test_static_lookup_not_found() {
assert!(static_lookup("openai", "nonexistent").is_none());
assert!(static_lookup("unknown_provider", "any").is_none());
}
#[test]
fn test_unknown_model_returns_zero_capabilities() {
let m = unknown_model("test", "mystery-model");
assert_eq!(m.context_length, 0);
assert_eq!(m.max_output_tokens, 0);
assert_eq!(m.source, DiscoverySource::Unknown);
assert!(!m.capabilities.supports_vision);
}
#[test]
fn test_codestral_context_is_256k() {
let codestral = static_lookup("mistral", "codestral-latest").unwrap();
assert_eq!(codestral.context_length, 262_144);
}
#[test]
fn test_claude_fable_5_context_is_1m() {
let fable = static_lookup("anthropic", "claude-fable-5").unwrap();
assert_eq!(fable.context_length, 1_048_576);
assert_eq!(fable.max_output_tokens, 131_072);
}
#[test]
fn test_xai_grok43_is_flagship() {
let grok = static_lookup("xai", "grok-4.3").unwrap();
assert_eq!(grok.context_length, 1_000_000);
assert!(grok.capabilities.supports_vision);
assert!(grok.capabilities.supports_thinking);
assert!(grok.capabilities.supports_function_calling);
assert!(!grok.deprecated);
}
#[test]
fn test_openai_deprecated_models() {
let nano = static_lookup("openai", "gpt-4.1-nano").unwrap();
assert!(nano.deprecated);
let o4 = static_lookup("openai", "o4-mini").unwrap();
assert!(o4.deprecated);
}
#[test]
fn test_openai_gpt5_models() {
let gpt5 = static_lookup("openai", "gpt-5").unwrap();
assert!(!gpt5.deprecated);
assert!(gpt5.capabilities.supports_thinking);
let gpt5mini = static_lookup("openai", "gpt-5-mini").unwrap();
assert!(!gpt5mini.deprecated);
}
#[test]
fn test_anthropic_haiku_45() {
let haiku = static_lookup("anthropic", "claude-haiku-4-5").unwrap();
assert_eq!(haiku.context_length, 200_000);
assert_eq!(haiku.max_output_tokens, 65_536);
}
#[test]
fn test_mistral_large_context_256k() {
let large = static_lookup("mistral", "mistral-large-latest").unwrap();
assert_eq!(large.context_length, 262_144);
assert!(large.capabilities.supports_vision);
}
#[test]
fn test_mistral_medium_35() {
let medium = static_lookup("mistral", "mistral-medium-latest").unwrap();
assert_eq!(medium.context_length, 262_144);
assert!(medium.capabilities.supports_thinking);
assert!(medium.capabilities.supports_vision);
}
}