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:
rhan-oai authored and copyberry committed 2026-08-29 03:44:01 +00:00
1 parent 03861e69ef
commit 3c062df036
18 files changed
+298 -20

No files matched your search

+3 -2
View File
@@ -3467,13 +3467,14 @@ impl Session {
});
extension_data.insert(selected_plugins.clone());
turn_context.extension_data.insert(selected_plugins);
// Tool planning still uses the admitted turn. Migrating it to the
// captured model is a separate step from diagnostic activation.
// Tool availability still follows the admitted turn; the async message
// description comes from the captured step model.
let tool_router = turn::built_tools(
self.as_ref(),
turn_context.as_ref(),
// TODO(CDXENT-441): use the step scoped model
turn_context.model_info(),
settings.model_info.model_messages.as_ref(),
&environments,
&mcp,
&extension_data,