From a183b449e61679f41b48a3468164d71ef38cd1a5 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Tue, 1 Dec 2026 19:21:08 +0000 Subject: [PATCH] Use model-specific speeds for `/model --speed` (#65092) ## Why Speed completion always suggested `flex`, even for models that did not advertise it, and omitted other available tiers such as `priority`. ## What changed Offer `standard` and the enabled service tiers advertised for the model named in `/model`. When the command omits the model, use the current model. Use the same choices in unavailable-speed errors. Allow explicit use of unadvertised `flex` in `/model` and quick dials when using the OpenAI provider with an API key. Keep completion limited to `standard` and advertised tiers. ## Testing Add coverage for model-specific completion and validation, including clearing stale suggestions when the model catalog is cleared. Cover saving and recalling a quick dial with unadvertised Flex using an OpenAI API key and rejecting that speed on another provider. GitOrigin-RevId: b5139d03561842eaf00511f018f6e626cf695bc5 --- codex-rs/tui/src/bottom_pane/chat_composer.rs | 26 +++++-- .../chat_composer/slash_argument.rs | 12 ++-- .../chat_composer/slash_argument/named.rs | 62 +++++++++-------- .../chat_composer/slash_argument_tests.rs | 20 ++++-- codex-rs/tui/src/bottom_pane/mod.rs | 8 ++- codex-rs/tui/src/chatwidget/model_command.rs | 21 ++---- .../tui/src/chatwidget/model_popup_state.rs | 1 + codex-rs/tui/src/chatwidget/quick_dials.rs | 8 +-- codex-rs/tui/src/chatwidget/service_tiers.rs | 67 +++++++++++++------ .../src/chatwidget/tests/quick_dials_tests.rs | 31 ++++++++- .../tests/session_model_selection_tests.rs | 40 +++++++++++ ..._selection_tests__model_speed_choices.snap | 11 +++ codex-rs/tui/src/slash_command_settings.rs | 4 +- 13 files changed, 225 insertions(+), 86 deletions(-) create mode 100644 codex-rs/tui/src/chatwidget/tests/snapshots/codex_tui__chatwidget__tests__session_model_selection_tests__model_speed_choices.snap diff --git a/codex-rs/tui/src/bottom_pane/chat_composer.rs b/codex-rs/tui/src/bottom_pane/chat_composer.rs index 160cd599d1..88c73dcf24 100644 --- a/codex-rs/tui/src/bottom_pane/chat_composer.rs +++ b/codex-rs/tui/src/bottom_pane/chat_composer.rs @@ -697,6 +697,7 @@ pub(crate) struct ChatComposer { token_activity_command_enabled: bool, service_tier_commands_enabled: bool, service_tier_commands: Vec, + model_speeds: crate::slash_command_settings::ModelSpeeds, mentions_v2_enabled: bool, goal_command_enabled: bool, voice_command_enabled: bool, @@ -889,6 +890,7 @@ impl ChatComposer { token_activity_command_enabled: false, service_tier_commands_enabled: false, service_tier_commands: Vec::new(), + model_speeds: HashMap::new(), mentions_v2_enabled: false, goal_command_enabled: false, voice_command_enabled: false, @@ -1099,8 +1101,15 @@ impl ChatComposer { }); } - pub fn set_service_tier_commands(&mut self, commands: Vec) { - self.update_slash_command_catalog(|composer| composer.service_tier_commands = commands); + pub fn set_service_tier_commands( + &mut self, + commands: Vec, + speeds: crate::slash_command_settings::ModelSpeeds, + ) { + self.update_slash_command_catalog(|composer| { + composer.service_tier_commands = commands; + composer.model_speeds = speeds; + }); } pub fn set_goal_command_enabled(&mut self, enabled: bool) { @@ -9612,11 +9621,14 @@ mod tests { /*disable_paste_burst*/ false, ); composer.set_service_tier_commands_enabled(/*enabled*/ true); - composer.set_service_tier_commands(vec![ServiceTierCommand { - id: "priority".to_string(), - name: "fast".to_string(), - description: "Fastest inference with increased plan usage".to_string(), - }]); + composer.set_service_tier_commands( + vec![ServiceTierCommand { + id: "priority".to_string(), + name: "fast".to_string(), + description: "Fastest inference with increased plan usage".to_string(), + }], + Default::default(), + ); type_chars_humanlike(&mut composer, &['/', 'f', 'a', 's', 't']); let (result, _needs_redraw) = diff --git a/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument.rs b/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument.rs index 2f82f58de0..16bb8de743 100644 --- a/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument.rs +++ b/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument.rs @@ -67,7 +67,7 @@ impl ArgumentPopup { let matches: Vec<_> = target .choices .iter() - .filter(|value| value.starts_with(&prefix)) + .filter(|value| value.to_ascii_lowercase().starts_with(&prefix)) .cloned() .collect(); if matches.is_empty() { @@ -151,7 +151,7 @@ impl ChatComposer { .collect(), ) } else { - named::target(text, cursor, start, command)? + named::target(text, cursor, start, command, &self.model_speeds)? }; if self .draft @@ -180,8 +180,11 @@ impl ChatComposer { { return true; } + let Ok(value) = shlex::try_quote(value) else { + return false; + }; let mut completed = text.to_owned(); - completed.replace_range(range.clone(), value); + completed.replace_range(range.clone(), &value); parse_slash_name(&completed) .is_some_and(|(_, args, _)| parent_owned_command_is_allowed(command, args)) }); @@ -262,7 +265,8 @@ impl ChatComposer { && target.identity == identity && target.prefix == prefix && target.choices.contains(&value) - }) { + }) && let Ok(value) = shlex::try_quote(&value) + { self.draft.textarea.replace_range(range.clone(), &value); self.draft.textarea.set_cursor(range.start + value.len()); self.popups.dismissed_argument_token = diff --git a/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument/named.rs b/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument/named.rs index 48eadc345b..51de25be3f 100644 --- a/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument/named.rs +++ b/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument/named.rs @@ -12,6 +12,7 @@ pub(super) fn target( cursor: usize, args_start: usize, command: SlashCommand, + model_speeds: &slash_command_settings::ModelSpeeds, ) -> Option<(Range, Vec)> { let mut settings = slash_command_settings::for_command(command); if settings.values.is_empty() && settings.switches.is_empty() && settings.booleans.is_empty() { @@ -46,26 +47,6 @@ pub(super) fn target( words.remove(0); } - let mut used = Vec::new(); - let mut pending_value = None; - let mut positionals = 0; - for word in &words { - if pending_value.take().is_some() && !word.starts_with("--") { - continue; - } - if word == "--" { - return None; - } - if word.starts_with("--") { - let (name, inline) = word.split_once('=').unwrap_or((word.as_str(), "")); - used.push(name); - if settings.values.contains(&name) && inline.is_empty() { - pending_value = Some(name); - } - } else { - positionals += 1; - } - } let tail = shlex::split(&line[start..])?; let tail = tail.get(usize::from(!token.is_empty())..)?; if token == "--" && !tail.is_empty() { @@ -75,15 +56,34 @@ pub(super) fn target( .iter() .position(|word| word == "--") .unwrap_or(tail.len()); - positionals += tail.len().saturating_sub(terminator + 1); - for word in &tail[..terminator] { - if word.starts_with("--") { - used.push(word.split_once('=').map_or(word.as_str(), |(name, _)| name)); - } else if matches!(command, SlashCommand::Title | SlashCommand::Statusline) { - positionals += 1; + let mut used = Vec::new(); + let mut pending_value = None; + let mut positional = None; + // Scan both sides independently: the edited token may itself be a pending value. + for (args, pending) in [ + (words.as_slice(), &mut pending_value), + (&tail[..terminator], &mut None), + ] { + for word in args { + if pending.take().is_some() && !word.starts_with("--") { + continue; + } + if word == "--" { + return None; + } + if word.starts_with("--") { + let (name, inline) = word.split_once('=').unwrap_or((word.as_str(), "")); + used.push(name); + if settings.values.contains(&name) && inline.is_empty() { + *pending = Some(name); + } + } else { + positional.get_or_insert(word); + } } } - if positionals > 0 && matches!(command, SlashCommand::Title | SlashCommand::Statusline) { + let positional = positional.or_else(|| tail.get(terminator + 1)); + if positional.is_some() && matches!(command, SlashCommand::Title | SlashCommand::Statusline) { used.push("--clear"); } @@ -93,6 +93,14 @@ pub(super) fn target( if occupied || used.iter().filter(|used| **used == name).count() > own_use { return None; } + if command == SlashCommand::Model && name == "--speed" { + let model = positional.cloned(); + let mut values = vec!["standard".to_string()]; + if let Some(tiers) = model_speeds.get(&model) { + values.extend_from_slice(tiers); + } + return Some((range, values)); + } let values = slash_command_settings::value_choices(command, name); (!values.is_empty()).then(|| (range, values.iter().copied().map(str::to_owned).collect())) }; diff --git a/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument_tests.rs b/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument_tests.rs index 0200d5a90d..16cfd92fa7 100644 --- a/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument_tests.rs +++ b/codex-rs/tui/src/bottom_pane/chat_composer/slash_argument_tests.rs @@ -131,8 +131,8 @@ fn named_settings_complete_names_and_both_value_forms() { ), ("/statusline model --no-c", "/statusline model --no-colors"), ("/model\u{a0}--sp", "/model\u{a0}--speed"), - ("/model\n--speed=f", "/model\n--speed=flex"), - ("/model --speed\n f", "/model --speed\n flex"), + ("/model\n--speed=s", "/model\n--speed=standard"), + ("/model --speed\n s", "/model --speed\n standard"), ("/model\n\u{a0}--sp", "/model\n\u{a0}--speed"), ("/mcp login 'a b' --e", "/mcp login 'a b' --environment"), ] { @@ -152,13 +152,25 @@ fn named_setting_completion_preserves_tail_and_respects_shell_context() { composer.draft.textarea.text(), "/mcp login --environment=\"foo bar\" srv" ); + composer + .model_speeds + .insert(Some("other".into()), vec!["Fast lane".into()]); set_named_draft( &mut composer, - "/model --speed=f\u{a0}x", + "/model --speed=f\u{a0}x --reasoning high other", "/model --speed=f".len(), ); composer.handle_key_event(KeyCode::Tab.into()); - assert_eq!(composer.draft.textarea.text(), "/model --speed=flex"); + assert_eq!( + shlex::split(composer.draft.textarea.text()).unwrap(), + [ + "/model", + "--speed=Fast lane", + "--reasoning", + "high", + "other" + ] + ); let cursor = "/model --spe".len(); set_named_draft(&mut composer, "/model --spe --reasoning=high", cursor); for (draft, cursor) in [ diff --git a/codex-rs/tui/src/bottom_pane/mod.rs b/codex-rs/tui/src/bottom_pane/mod.rs index abb18d73e3..a6a49e47f2 100644 --- a/codex-rs/tui/src/bottom_pane/mod.rs +++ b/codex-rs/tui/src/bottom_pane/mod.rs @@ -681,8 +681,12 @@ impl BottomPane { self.request_redraw(); } - pub fn set_service_tier_commands(&mut self, commands: Vec) { - self.composer.set_service_tier_commands(commands); + pub fn set_service_tier_commands( + &mut self, + commands: Vec, + speeds: crate::slash_command_settings::ModelSpeeds, + ) { + self.composer.set_service_tier_commands(commands, speeds); self.request_redraw(); } diff --git a/codex-rs/tui/src/chatwidget/model_command.rs b/codex-rs/tui/src/chatwidget/model_command.rs index f2e3d5e37a..1c58e7f900 100644 --- a/codex-rs/tui/src/chatwidget/model_command.rs +++ b/codex-rs/tui/src/chatwidget/model_command.rs @@ -89,24 +89,15 @@ fn resolve_service_tier( if speed == "standard" { return Ok(Some(SERVICE_TIER_DEFAULT_REQUEST_VALUE.to_string())); } - if speed == "flex" { - return Ok(Some("flex".to_string())); + if chat.allows_unadvertised_speed(speed) { + return Ok(Some(speed.to_owned())); } - let tier = model - .service_tiers - .iter() - .find(|tier| tier.id == speed || tier.name.eq_ignore_ascii_case(speed)) - .filter(|tier| chat.config.features.service_tier_enabled(&tier.id)); + let tier = chat + .model_speed_tiers(model) + .find(|tier| tier.id == speed || tier.name.eq_ignore_ascii_case(speed)); tier.map(|tier| Some(tier.id.clone())).ok_or_else(|| { let available = std::iter::once("standard".to_string()) - .chain(std::iter::once("flex".to_string())) - .chain( - model - .service_tiers - .iter() - .filter(|tier| chat.config.features.service_tier_enabled(&tier.id)) - .map(|tier| tier.id.clone()), - ) + .chain(chat.model_speed_tiers(model).map(|tier| tier.id.clone())) .collect::>() .join(", "); format!( diff --git a/codex-rs/tui/src/chatwidget/model_popup_state.rs b/codex-rs/tui/src/chatwidget/model_popup_state.rs index 9ef6ace105..db0d64ec21 100644 --- a/codex-rs/tui/src/chatwidget/model_popup_state.rs +++ b/codex-rs/tui/src/chatwidget/model_popup_state.rs @@ -67,6 +67,7 @@ impl ChatWidget { pub(crate) fn clear_account_models(&mut self) { Arc::make_mut(&mut self.model_catalog).clear_models(); + self.sync_service_tier_commands(); } pub(super) fn refresh_account_scoped_models(&mut self) { diff --git a/codex-rs/tui/src/chatwidget/quick_dials.rs b/codex-rs/tui/src/chatwidget/quick_dials.rs index a3e1847871..2d5152e48e 100644 --- a/codex-rs/tui/src/chatwidget/quick_dials.rs +++ b/codex-rs/tui/src/chatwidget/quick_dials.rs @@ -135,11 +135,9 @@ impl ChatWidget { .current_service_tier() .filter(|tier| *tier != SERVICE_TIER_DEFAULT_REQUEST_VALUE) .unwrap_or("standard"); - if !matches!(speed, "standard" | "flex") - && !model - .service_tiers - .iter() - .any(|tier| tier.id == speed && self.config.features.service_tier_enabled(&tier.id)) + if speed != "standard" + && !self.allows_unadvertised_speed(speed) + && !self.model_speed_tiers(model).any(|tier| tier.id == speed) { return Err("Choose an available speed with /model before saving."); } diff --git a/codex-rs/tui/src/chatwidget/service_tiers.rs b/codex-rs/tui/src/chatwidget/service_tiers.rs index c38ffddbb5..1bd89768b5 100644 --- a/codex-rs/tui/src/chatwidget/service_tiers.rs +++ b/codex-rs/tui/src/chatwidget/service_tiers.rs @@ -6,8 +6,13 @@ use crate::app_event::AppEvent; use crate::app_server_session::ThreadSettingsOwner; use crate::bottom_pane::slash_commands::ServiceTierCommand; use crate::service_tier_resolution; +use crate::status::StatusAccountDisplay; use codex_features::Feature; +use codex_model_provider_info::OPENAI_PROVIDER_ID; use codex_protocol::config_types::SERVICE_TIER_DEFAULT_REQUEST_VALUE; +use codex_protocol::config_types::ServiceTier; +use codex_protocol::openai_models::ModelPreset; +use codex_protocol::openai_models::ModelServiceTier; use codex_protocol::openai_models::SPEED_TIER_FAST; impl ChatWidget { @@ -75,11 +80,42 @@ impl ChatWidget { self.set_service_tier_selection(next_tier); } + pub(super) fn model_speed_tiers<'a>( + &'a self, + model: &'a ModelPreset, + ) -> impl Iterator { + model + .service_tiers + .iter() + .filter(|tier| self.config.features.service_tier_enabled(&tier.id)) + } + + // The OpenAI API can accept explicit Flex requests even when the bundled + // catalog omits Flex. Keep suggestions limited to advertised speeds. + pub(super) fn allows_unadvertised_speed(&self, speed: &str) -> bool { + speed == ServiceTier::Flex.request_value() + && self.config.model_provider_id == OPENAI_PROVIDER_ID + && self.status_account_display == Some(StatusAccountDisplay::ApiKey) + } + pub(crate) fn sync_service_tier_commands(&mut self) { let commands = self.current_model_service_tier_commands(); self.bottom_pane .set_service_tier_commands_enabled(!commands.is_empty()); - self.bottom_pane.set_service_tier_commands(commands); + let mut speeds = crate::slash_command_settings::ModelSpeeds::new(); + for model in self.model_catalog.models() { + let tiers: Vec<_> = self + .model_speed_tiers(model) + .map(|tier| tier.id.clone()) + .collect(); + if model.model == self.selected_model() { + speeds.insert(None, tiers.clone()); + } + if model.show_in_picker { + speeds.insert(Some(model.model.clone()), tiers); + } + } + self.bottom_pane.set_service_tier_commands(commands, speeds); } pub(crate) fn current_model_service_tier_commands(&self) -> Vec { @@ -90,26 +126,17 @@ impl ChatWidget { .as_deref() .unwrap_or_else(|| self.selected_model()); self.model_catalog - .try_list_models() - .ok() - .and_then(|models| { - models - .into_iter() - .find(|preset| preset.model == model) - .map(|preset| { - preset - .service_tiers - .into_iter() - .filter(|tier| self.config.features.service_tier_enabled(&tier.id)) - .map(|tier| ServiceTierCommand { - id: tier.id, - name: tier.name.to_lowercase(), - description: tier.description, - }) - .collect() - }) + .models() + .iter() + .find(|preset| preset.model == model) + .into_iter() + .flat_map(|preset| self.model_speed_tiers(preset)) + .map(|tier| ServiceTierCommand { + id: tier.id.clone(), + name: tier.name.to_lowercase(), + description: tier.description.clone(), }) - .unwrap_or_default() + .collect() } fn set_service_tier_selection(&mut self, service_tier: Option) { diff --git a/codex-rs/tui/src/chatwidget/tests/quick_dials_tests.rs b/codex-rs/tui/src/chatwidget/tests/quick_dials_tests.rs index bcebc5a99b..d9ae82ac0a 100644 --- a/codex-rs/tui/src/chatwidget/tests/quick_dials_tests.rs +++ b/codex-rs/tui/src/chatwidget/tests/quick_dials_tests.rs @@ -4,6 +4,35 @@ use super::*; use crate::chatwidget::quick_dials::QuickDialEditorTarget; use codex_config::types::QuickDial; +#[tokio::test] +async fn openai_api_key_can_recall_unadvertised_flex_without_suggesting_it() { + let (mut chat, mut events, _ops) = make_chatwidget_manual(Some("gpt-5.4")).await; + chat.thread_id = Some(ThreadId::new()); + chat.status_account_display = Some(StatusAccountDisplay::ApiKey); + set_fast_mode_test_catalog(&mut chat); + chat.set_service_tier(Some("flex".into())); + + chat.bottom_pane + .set_composer_text("/model --speed=f".into(), vec![], vec![]); + assert!(chat.bottom_pane.no_modal_or_popup_active()); + + let dial = chat.current_model_quick_dial().expect("save Flex preset"); + chat.local_settings.tui.quick_dials.insert("1".into(), dial); + chat.recall_quick_dial(/*slot*/ 1); + assert_matches!( + std::iter::from_fn(|| events.try_recv().ok()) + .find(|event| matches!(event, AppEvent::SelectSessionModel { .. })), + Some(AppEvent::SelectSessionModel { model, service_tier: Some(tier), .. }) + if model == "gpt-5.4" && tier == "flex" + ); + + chat.set_model_provider("alternate"); + set_fast_mode_test_catalog(&mut chat); + chat.handle_model_command_args("gpt-5.4 --speed=flex"); + let errors = drain_insert_history(&mut events); + assert!(lines_to_single_string(&errors[0]).contains("Speed 'flex' is unavailable")); +} + #[tokio::test] async fn current_settings_offer_model_permissions_and_status_layouts() { let (mut chat, mut events, _ops) = @@ -331,7 +360,7 @@ async fn saved_quick_dials_save_and_clear_picker_snapshots() { Err("Choose an available reasoning effort with /model before saving.") ); chat.set_reasoning_effort(/*effort*/ None); - chat.effective_service_tier = Some("removed-speed".into()); + chat.effective_service_tier = Some("flex".into()); assert_eq!( chat.current_model_quick_dial(), Err("Choose an available speed with /model before saving.") diff --git a/codex-rs/tui/src/chatwidget/tests/session_model_selection_tests.rs b/codex-rs/tui/src/chatwidget/tests/session_model_selection_tests.rs index 72f1f8bdb6..cbc550af36 100644 --- a/codex-rs/tui/src/chatwidget/tests/session_model_selection_tests.rs +++ b/codex-rs/tui/src/chatwidget/tests/session_model_selection_tests.rs @@ -175,6 +175,46 @@ async fn model_settings_only_command_accepts_the_current_hidden_model() { ); } +#[tokio::test] +async fn model_speed_completion_and_submission_follow_the_target_model() { + let (mut chat, mut events, _ops) = make_chatwidget_manual(Some("gpt-5.4")).await; + chat.thread_id = Some(ThreadId::new()); + set_fast_mode_test_catalog(&mut chat); + Arc::make_mut(&mut chat.model_catalog).models_mut()[1] + .service_tiers + .push(codex_protocol::openai_models::ModelServiceTier { + id: "flex".into(), + name: "Flex".into(), + description: String::new(), + }); + chat.set_feature_enabled(Feature::FastMode, /*enabled*/ true); + + chat.bottom_pane + .set_composer_text("/model --speed=".into(), vec![], vec![]); + let popup = normalize_snapshot_paths(render_bottom_popup(&chat, /*width*/ 60)); + chat.handle_model_command_args("--speed=flex"); + let errors = drain_insert_history(&mut events); + let error = lines_to_single_string(&errors[0]); + insta::assert_snapshot!("model_speed_choices", format!("{popup}\n{error}")); + + chat.bottom_pane + .set_composer_text("/model gpt-5.2 --speed=f".into(), vec![], vec![]); + chat.handle_key_event(KeyCode::Tab.into()); + assert_eq!( + chat.bottom_pane.composer_text(), + "/model gpt-5.2 --speed=flex" + ); + chat.handle_model_command_args("gpt-5.2 --speed=flex"); + assert_matches!(events.try_recv(), Ok(AppEvent::SelectSessionModel { + model, service_tier: Some(tier), .. + }) if model == "gpt-5.2" && tier == "flex"); + + chat.bottom_pane + .set_composer_text("/model gpt-5.2 --speed=f".into(), vec![], vec![]); + chat.clear_account_models(); + assert!(chat.bottom_pane.no_modal_or_popup_active()); +} + #[tokio::test] async fn session_model_selection_hides_conflicting_shortcut() { let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(Some("gpt-5.5")).await; diff --git a/codex-rs/tui/src/chatwidget/tests/snapshots/codex_tui__chatwidget__tests__session_model_selection_tests__model_speed_choices.snap b/codex-rs/tui/src/chatwidget/tests/snapshots/codex_tui__chatwidget__tests__session_model_selection_tests__model_speed_choices.snap new file mode 100644 index 0000000000..50ba5b2f12 --- /dev/null +++ b/codex-rs/tui/src/chatwidget/tests/snapshots/codex_tui__chatwidget__tests__session_model_selection_tests__model_speed_choices.snap @@ -0,0 +1,11 @@ +--- +source: tui/src/chatwidget/tests/session_model_selection_tests.rs +expression: "format!(\"{popup}\\n{error}\")" +--- +› standard + priority + +› /model --speed= + + gpt-5.4 default · /tmp/project +■ Speed 'flex' is unavailable for gpt-5.4. Available: standard, priority. diff --git a/codex-rs/tui/src/slash_command_settings.rs b/codex-rs/tui/src/slash_command_settings.rs index 8cc115fa97..a8d600753c 100644 --- a/codex-rs/tui/src/slash_command_settings.rs +++ b/codex-rs/tui/src/slash_command_settings.rs @@ -2,6 +2,9 @@ use crate::slash_command::SlashCommand; +/// Advertised speed IDs by model argument. None identifies the current model. +pub(crate) type ModelSpeeds = std::collections::HashMap, Vec>; + type Names = &'static [&'static str]; pub(crate) struct Settings { @@ -30,7 +33,6 @@ pub(crate) fn value_choices(command: SlashCommand, name: &str) -> &'static [&'st match (command, name) { (SlashCommand::Permissions, "--approval-policy") => &["untrusted", "on-request", "never"], (SlashCommand::Permissions, "--reviewer") => &["user", "auto_review"], - (SlashCommand::Model, "--speed") => &["standard", "flex"], _ => &[], } }