Set verbosity to low for 5.1 (#6568)

And improve test coverage
This commit is contained in:
pakrym-oai
2025-11-13 01:40:52 +00:00
committed by GitHub
parent e63ab0dd65
commit f97874093e
5 changed files with 150 additions and 2 deletions
+3 -1
View File
@@ -215,7 +215,9 @@ impl ModelClient {
let input_with_instructions = prompt.get_formatted_input();
let verbosity = if self.config.model_family.support_verbosity {
self.config.model_verbosity
self.config
.model_verbosity
.or(self.config.model_family.default_verbosity)
} else {
if self.config.model_verbosity.is_some() {
warn!(
+9
View File
@@ -1,3 +1,5 @@
use codex_protocol::config_types::Verbosity;
use crate::config::types::ReasoningSummaryFormat;
use crate::tools::handlers::apply_patch::ApplyPatchToolType;
use crate::tools::spec::ConfigShellToolType;
@@ -55,6 +57,9 @@ pub struct ModelFamily {
/// If the model family supports setting the verbosity level when using Responses API.
pub support_verbosity: bool,
// The default verbosity level for this model family when using Responses API.
pub default_verbosity: Option<Verbosity>,
/// Preferred shell tool type for this model family when features do not override it.
pub shell_type: ConfigShellToolType,
}
@@ -78,7 +83,9 @@ macro_rules! model_family {
effective_context_window_percent: 95,
support_verbosity: false,
shell_type: ConfigShellToolType::Default,
default_verbosity: None,
};
// apply overrides
$(
mf.$key = $value;
@@ -174,6 +181,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {
supports_reasoning_summaries: true,
apply_patch_tool_type: Some(ApplyPatchToolType::Freeform),
support_verbosity: true,
default_verbosity: Some(Verbosity::Low),
base_instructions: GPT_5_1_INSTRUCTIONS.to_string(),
)
} else if slug.starts_with("gpt-5") {
@@ -202,5 +210,6 @@ pub fn derive_default_model_family(model: &str) -> ModelFamily {
effective_context_window_percent: 95,
support_verbosity: false,
shell_type: ConfigShellToolType::Default,
default_verbosity: None,
}
}