agcodex_common/
model_presets.rs

1use agcodex_core::protocol_config_types::ReasoningEffort;
2
3/// A simple preset pairing a model slug with a reasoning effort.
4#[derive(Debug, Clone, Copy)]
5pub struct ModelPreset {
6    /// Stable identifier for the preset.
7    pub id: &'static str,
8    /// Display label shown in UIs.
9    pub label: &'static str,
10    /// Short human description shown next to the label in UIs.
11    pub description: &'static str,
12    /// Model slug (e.g., "gpt-5").
13    pub model: &'static str,
14    /// Reasoning effort to apply for this preset.
15    pub effort: ReasoningEffort,
16}
17
18/// Built-in list of model presets that pair a model with a reasoning effort.
19///
20/// Keep this UI-agnostic so it can be reused by both TUI and MCP server.
21pub const fn builtin_model_presets() -> &'static [ModelPreset] {
22    // Order reflects effort from minimal to high.
23    const PRESETS: &[ModelPreset] = &[
24        ModelPreset {
25            id: "gpt-5-minimal",
26            label: "gpt-5 minimal",
27            description: "— fastest responses with limited reasoning; ideal for coding, instructions, or lightweight tasks",
28            model: "gpt-5",
29            effort: ReasoningEffort::Minimal,
30        },
31        ModelPreset {
32            id: "gpt-5-low",
33            label: "gpt-5 low",
34            description: "— balances speed with some reasoning; useful for straightforward queries and short explanations",
35            model: "gpt-5",
36            effort: ReasoningEffort::Low,
37        },
38        ModelPreset {
39            id: "gpt-5-medium",
40            label: "gpt-5 medium",
41            description: "— default setting; provides a solid balance of reasoning depth and latency for general-purpose tasks",
42            model: "gpt-5",
43            effort: ReasoningEffort::Medium,
44        },
45        ModelPreset {
46            id: "gpt-5-high",
47            label: "gpt-5 high",
48            description: "— maximizes reasoning depth for complex or ambiguous problems",
49            model: "gpt-5",
50            effort: ReasoningEffort::High,
51        },
52    ];
53    PRESETS
54}