Support for Codex CLI by skipping unsupported Responses tools#23041
Conversation
aldehir
left a comment
There was a problem hiding this comment.
I think this is better than the other PR, which tries to add support for everything.
OpenAI is constantly changing Codex, it is infeasible to expect llama.cpp to maintain feature parity.
|
Agreed with @aldehir , we should be selective about what we add. Might be able to add more later once we figure out the shape of the tooling protocols. |
|
To clarify, the goal was never to add 'full functionality' of Responses API here. That's a moving target as OpenAI continually adds server-hosted tools ( With that out of the way, this PR's intent is to narrowly allow llama.cpp to be more resilient / less brittle to Responses API clients like
Action: Reviewers to review CC: @pwilkin |
|
Yes, it does seem that was changed in Codex. Previously it would define apply_patch as a freeform tool for gpt-oss-120b. Strip the logic out, I apologize for the misdirection. Everything else looks good. |
de6562f to
28b7457
Compare
|
@aldehir - no worries, all good. I've reverted gpt-oss apply_patch special handling (and it's 2x tests). Also rebased to latest master, should merge cleanly. If all looks good, proceed? |
|
@SidShaytay no, it's fine, we were referring to the other huge Responses API PR :) |
…rg#23041) * Support for Codex CLI by skipping unsupported Responses tools * Warn on skipped Responses tools and preserve gpt-oss apply_patch rejection * Revert gpt-oss apply_patch special handling
…rg#23041) * Support for Codex CLI by skipping unsupported Responses tools * Warn on skipped Responses tools and preserve gpt-oss apply_patch rejection * Revert gpt-oss apply_patch special handling
…rg#23041) * Support for Codex CLI by skipping unsupported Responses tools * Warn on skipped Responses tools and preserve gpt-oss apply_patch rejection * Revert gpt-oss apply_patch special handling
…rg#23041) * Support for Codex CLI by skipping unsupported Responses tools * Warn on skipped Responses tools and preserve gpt-oss apply_patch rejection * Revert gpt-oss apply_patch special handling
…rg#23041) * Support for Codex CLI by skipping unsupported Responses tools * Warn on skipped Responses tools and preserve gpt-oss apply_patch rejection * Revert gpt-oss apply_patch special handling
Overview
This enables support for codex CLI, which now uses the Responses API. As per https://platform.openai.com/docs/guides/tools?api-mode=responses type's can be beyond just
function, likefile_search,web_search,mcp,image_generation,namespace, etc. llama.cpp can't support each type but instead of breaking down entirely, we only pass the ones we can support to the backend. The patch is intentionally minimal as there isn't a full implementation of Responses in llama.cpp as far as I can tell. This is merely making the compatibility shim (Responses <-> Chat completion) less brittle.Issue faced by users @ #20156
Requirements