mirror of
https://github.com/openai/codex.git
synced 2026-11-11 21:10:39 +00:00
Preserve Apps usage instructions in model catalog messages (#58441)
## What changed Add optional `ModelMessages.apps` and `AppsMessages.usage_instructions` fields to carry model catalog wording without runtime interpretation. Missing or null values become `None`, and strings retain their exact contents, including empty strings, whitespace, and template-like text. ## Testing Add serialization coverage for nullable and literal Apps values, and extend existing tests to verify Apps messages survive model response round trips and base instruction overrides. GitOrigin-RevId: 49b516656255e07b91f8f4679e2acb8e1b03f9e1
This commit is contained in:
@@ -3,6 +3,7 @@ use crate::ModelsManagerConfig;
|
||||
use codex_prompts::render_model_instructions;
|
||||
use codex_protocol::config_types::Personality;
|
||||
use codex_protocol::openai_models::ApprovalMessages;
|
||||
use codex_protocol::openai_models::AppsMessages;
|
||||
use codex_protocol::openai_models::AutoReviewMessages;
|
||||
use codex_protocol::openai_models::CollaborationModeMessages;
|
||||
use codex_protocol::openai_models::ConfirmationPolicies;
|
||||
@@ -90,6 +91,9 @@ fn base_instruction_override_is_literal_and_preserves_catalog_messages() {
|
||||
computer_use: Some(" # Native policy\r\n\n${native_markdown}\n".to_string()),
|
||||
};
|
||||
let mut messages = ModelMessages {
|
||||
apps: Some(AppsMessages {
|
||||
usage_instructions: Some("Catalog Apps instructions.".to_string()),
|
||||
}),
|
||||
content_filter_guidance: None,
|
||||
persistent_instructions: Some(persistent_instructions.to_string()),
|
||||
tools: Some(ToolMessages {
|
||||
|
||||
Reference in New Issue
Block a user