mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
@@ -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!(
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user