mirror of
https://github.com/openai/codex.git
synced 2026-11-16 06:54:36 +00:00
Source async user message descriptions from the model catalog (#41461)
## What changed - Add model message metadata for built-in tool descriptions. - Use the active step model's catalog description for `send_user_message_async`, including after a mid-turn model change. - Fall back to the built-in description when catalog metadata is absent, while preserving an explicitly empty description. ## Testing - Cover catalog serialization, fallback and empty-value behavior, and model changes within a turn. GitOrigin-RevId: 72b953214ab9708931065321debf12133f8d2d40
This commit is contained in:
1 parent
03861e69ef
commit
3c062df036
18 files changed
+298
-20
No files matched your search
@@ -92,6 +92,7 @@ use codex_protocol::models::BaseInstructions;
|
||||
use codex_protocol::models::ContentItem;
|
||||
use codex_protocol::models::MessagePhase;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
use codex_protocol::openai_models::ModelMessages;
|
||||
use codex_protocol::protocol::AgentMessageContentDeltaEvent;
|
||||
use codex_protocol::protocol::AgentReasoningSectionBreakEvent;
|
||||
use codex_protocol::protocol::CodexErrorInfo;
|
||||
@@ -1504,6 +1505,7 @@ pub(crate) async fn prepare_tool_recommendations(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[instrument(level = "trace",
|
||||
skip_all,
|
||||
fields(
|
||||
@@ -1516,6 +1518,7 @@ pub(crate) async fn built_tools(
|
||||
sess: &Session,
|
||||
turn_context: &TurnContext,
|
||||
model_info: &codex_protocol::openai_models::ModelInfo,
|
||||
model_messages: Option<&ModelMessages>,
|
||||
environments: &TurnEnvironmentSnapshot,
|
||||
mcp: &Arc<codex_mcp::McpBinding>,
|
||||
step_store: &ExtensionData,
|
||||
@@ -1585,6 +1588,7 @@ pub(crate) async fn built_tools(
|
||||
sess,
|
||||
turn_context,
|
||||
model_info,
|
||||
model_messages,
|
||||
environments,
|
||||
mcp,
|
||||
apps_enabled,
|
||||
|
||||
Reference in new issue
Block a user