mirror of
https://github.com/openai/codex.git
synced 2026-10-28 16:06:15 +00:00
Honor personality = "none" in model instructions (#32277)
## Why Model catalog instructions can include a baked-in `# Personality` section. An explicit `none` setting should omit that section instead of sending it as part of the model's base instructions. ## What changed - Pass the configured personality into the models manager. - When personality support is enabled and the setting is explicitly `none`, remove the `# Personality` section through the next level-one heading from catalog base instructions and instruction templates. - Preserve explicit `base_instructions` overrides and avoid warning when no personality was requested. ## Testing Added unit and integration coverage for section removal, heading boundaries, CRLF input, preserved configurations, and explicit base instructions. GitOrigin-RevId: 452c88d3ac6001c2ac7d4fef269cd75dc239fa61
This commit is contained in:
@@ -1473,6 +1473,7 @@ impl Config {
|
||||
tool_output_token_limit: self.tool_output_token_limit,
|
||||
base_instructions: self.base_instructions.clone(),
|
||||
personality_enabled: self.features.enabled(Feature::Personality),
|
||||
personality: self.personality,
|
||||
model_catalog: self.model_catalog.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user