Always put Code Mode tool descriptions before namespace descriptions (#57462)

## What changed

Make tool descriptions precede namespace descriptions in Code Mode execution and tool search. Mark `code_mode_tool_description_first` as removed and simplify cached definitions to depend only on the input schema budget.

## Testing

Update Code Mode integration assertions and catalog snapshots to expect tool descriptions before namespace descriptions.

GitOrigin-RevId: 1344d4c264d1d2b18ee0388a064b6813ca81f770
This commit is contained in:
swastik-oai
2026-10-27 14:14:16 +00:00
committed by copyberry
parent 50983c7a93
commit 2ebf42f269
11 changed files with 35 additions and 105 deletions
-2
View File
@@ -58,12 +58,10 @@ fn code_mode_materializes_mcp_output_schemas() {
super::collect_code_mode_tool_definitions(
[&ToolSpec::Function(parsed)],
/*code_mode_input_schema_max_bytes*/ None,
/*tool_description_first*/ false,
),
super::collect_code_mode_tool_definitions(
[&ToolSpec::Function(eager)],
/*code_mode_input_schema_max_bytes*/ None,
/*tool_description_first*/ false,
),
);
}