Canonicalize default tools under the functions namespace (#37022)

## What changed

- Group top-level function and custom tool definitions into a single `functions` namespace for Responses Lite providers that support namespaced tools.
- Normalize missing, empty, and explicit `functions` namespaces to the same tool identity across registration, routing, lifecycle hooks, configuration, and tool search.
- Keep default tool names unprefixed in code mode, display output, and dispatch traces while preserving explicit non-default namespaces.

## Testing

- Add coverage for Responses Lite serialization, tool search results, namespace normalization and collision handling, routing, lifecycle events, and code-mode namespace policies.

GitOrigin-RevId: d48414005b5d22d39b11a198e19c47814d3a19f2
This commit is contained in:
rka-oai authored and copyberry committed 2026-08-05 04:07:59 +00:00
1 parent 1e489adad0
commit f21dc46388
29 files changed
+522 -78

No files matched your search

+1 -1
View File
@@ -372,7 +372,7 @@ where
};
let should_count_for_goal_progress = runtime.is_enabled()
&& tool_attempt_counts_for_goal_progress(input.outcome)
&& !(input.tool_name.namespace.is_none()
&& !(input.tool_name.is_default_namespace()
&& input.tool_name.name == UPDATE_GOAL_TOOL_NAME);
if !should_count_for_goal_progress {
return;