openai.internal._restore_tool_schemas
(internal) Put the caller's tool schemas back over the pruned body, verbatim. The pruned `tools` array is positionally identical to the typed one (prune drops map ENTRIES, never array elements), so tool i's schema goes back at index i. Only `OaFunctionTool` carries a schema; a builtin tool has nothing to restore.
Reference version
Signature
function openai.internal._restore_tool_schemas(
body: baml.json.json,
tools: openai.internal.OaTool[] | null
) -> baml.json.json
(internal) Put the caller's tool schemas back over the pruned body, verbatim. The
pruned tools array is positionally identical to the typed one (prune drops
map ENTRIES, never array elements), so tool i's schema goes back at index i.
Only OaFunctionTool carries a schema; a builtin tool has nothing to restore.
Source:<builtin>/openai/ns_internal/responses.bamlbytes 7533–8789