gestura_core_llm/
default_models.rs

1//! Centralized default AI model constants for all providers.
2//!
3//! This module provides a single source of truth for default model identifiers
4//! across OpenAI, Anthropic, Grok, Gemini, and Ollama providers. These constants
5//! are used as default values in `AppConfig` structs (e.g. serde defaults).
6//!
7//! ## Model Selection Precedence
8//!
9//! The system uses the following precedence for model selection:
10//! 1. **User configuration** (from `~/.gestura/config.yaml`)
11//! 2. **API discovery** (dynamic model lists from provider APIs)
12//!
13//! There are no static fallback lists — if the API is unreachable or no API key
14//! is configured, the model list is empty and the UI communicates this to the user.
15
16// ============================================================================
17// OpenAI Models
18// ============================================================================
19
20/// Default OpenAI model for agent/completion tasks.
21///
22/// GPT-4o provides the best balance of capability, speed, and cost as of 2025.
23pub const DEFAULT_OPENAI_MODEL: &str = "gpt-4o";
24
25/// Default OpenAI model for speech-to-text transcription.
26///
27/// GPT-4o Transcribe offers superior accuracy compared to Whisper V2,
28/// with lower Word Error Rate (WER) for voice input.
29pub const DEFAULT_OPENAI_STT_MODEL: &str = "gpt-4o-transcribe";
30
31// ============================================================================
32// Anthropic Models
33// ============================================================================
34
35/// Default Anthropic model for agent/completion tasks.
36///
37/// Claude Sonnet 4 (2025-05-14) is the latest and most capable model.
38pub const DEFAULT_ANTHROPIC_MODEL: &str = "claude-sonnet-4-20250514";
39
40// ============================================================================
41// Grok Models (xAI)
42// ============================================================================
43
44/// Default Grok model for agent/completion tasks.
45///
46/// Grok-3 is the latest stable model from xAI.
47pub const DEFAULT_GROK_MODEL: &str = "grok-3";
48
49// ============================================================================
50// Google Gemini Models
51// ============================================================================
52
53/// Default Gemini model for agent/completion tasks.
54///
55/// Gemini 2.0 Flash provides the best balance of speed and capability.
56pub const DEFAULT_GEMINI_MODEL: &str = "gemini-2.0-flash";
57
58/// Default Gemini API base URL (Google AI Studio / Generative Language API).
59pub const DEFAULT_GEMINI_BASE_URL: &str = "https://generativelanguage.googleapis.com";
60
61// ============================================================================
62// Ollama Models
63// ============================================================================
64
65/// Default Ollama model for local inference.
66///
67/// Llama 3.2 provides good performance for local use cases.
68pub const DEFAULT_OLLAMA_MODEL: &str = "llama3.2";
69
70/// Default Ollama base URL for local inference.
71pub const DEFAULT_OLLAMA_BASE_URL: &str = "http://localhost:11434";