mirror of
https://gh-proxy.org/https://github.com/klinsmaya/new-api.git
synced 2026-11-09 18:07:04 +08:00
Responses to Chat conversion kept only function tools, so Codex custom tools such as exec and apply_patch were dropped while the request still succeeded. The model then called the remaining tools with made-up arguments and Codex failed with "exec cell noop not found". Custom tools are now sent as Chat functions that take a single string input, with the grammar kept in the description. A forced custom tool_choice becomes the matching function choice, and custom_tool_call history items round-trip as function calls and tool messages. On the way back, function calls to those tools are restored as custom_tool_call output items, and streams emit the custom_tool_call_input delta and done events.