Conversation
pd95
force-pushed
the
feature/responses-custom-apply-patch-tool
branch
from
June 22, 2026 19:59
0ef6086 to
a7cb2b3
Compare
pd95
force-pushed
the
feature/responses-custom-apply-patch-tool
branch
from
July 8, 2026 12:30
a7cb2b3 to
3eff875
Compare
pd95
force-pushed
the
feature/responses-custom-apply-patch-tool
branch
from
August 8, 2026 17:37
3eff875 to
c2cc216
Compare
pd95
changed the base branch from
main
to
feature/responses-namespace-tools-upstream
August 8, 2026 17:41
pd95
marked this pull request as draft
August 8, 2026 19:28
pd95
force-pushed
the
feature/responses-custom-apply-patch-tool
branch
from
August 12, 2026 15:26
c2cc216 to
03f4f0e
Compare
pd95
force-pushed
the
feature/responses-custom-apply-patch-tool
branch
from
August 14, 2026 21:08
03f4f0e to
6400d1e
Compare
pd95
force-pushed
the
feature/responses-custom-apply-patch-tool
branch
2 times, most recently
from
August 28, 2026 14:46
3f931fe to
f75f4a1
Compare
pd95
force-pushed
the
feature/responses-custom-apply-patch-tool
branch
from
August 31, 2026 05:38
f75f4a1 to
fd443f3
Compare
pd95
force-pushed
the
feature/responses-custom-apply-patch-tool
branch
from
September 5, 2026 09:33
fd443f3 to
261b9f4
Compare
pd95
force-pushed
the
feature/responses-custom-apply-patch-tool
branch
from
September 14, 2026 06:09
261b9f4 to
4cec20f
Compare
pd95
removed this pull request from stack #26
September 14, 2026 18:24
pd95
added this pull request to stack #27
September 14, 2026 18:24
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
pd95
force-pushed
the
feature/responses-custom-apply-patch-tool
branch
from
September 18, 2026 12:17
4cec20f to
65e8803
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary and motivation
Codex now exposes
apply_patchas a Responses API custom/freeform tool. Thattool carries a patch as raw text, while Ollama's internal chat tool interface
uses JSON function arguments. Without a compatibility bridge, Ollama cannot
pass the declaration, model call, tool output, and continued conversation
through
/v1/responsesin the shapes expected by coding agents.What this changes
This PR adds a deliberately narrow bridge for
apply_patch:with one required string field,
input;custom_tool_callevents in streamingand non-streaming responses;
custom_tool_callandcustom_tool_call_outputhistory so a clientcan execute the patch and continue the turn;
than preserving an orphaned half;
tool names other than
apply_patch;of silently discarding or misclassifying it.
The server translates protocol data only. It does not apply patches or execute
model-produced commands.
Dependency and scope
This PR depends on Responses namespace PR #8 and changes only Responses
request/output conversion, compaction, and focused middleware coverage.
Compare:
feature/responses-namespace-tools-upstream...feature/responses-custom-apply-patch-tool
Validation
Conversion, schema, grammar, collision, history, ordering, compaction,
malformed-output, streaming, and mixed-tool middleware tests pass. The required
Linux test/lint/build and integrated Darwin gates also pass.
Refresh and AI assistance
Adapted onto Ollama
v0.34.0; head4cec20fde16a9aac9ff800c7a77463e38b0fd2ed. The final commit repairs a testfixture so it declares the custom tool it exercises. Codex materially assisted
implementation review, tests, refresh validation, and this PR description.