server: /v1/responses (text generation only)#18227
Closed
openingnow wants to merge 21 commits intoggml-org:masterfrom
Closed
server: /v1/responses (text generation only)#18227openingnow wants to merge 21 commits intoggml-org:masterfrom
openingnow wants to merge 21 commits intoggml-org:masterfrom
Conversation
ngxson
reviewed
Dec 20, 2025
Collaborator
ngxson
left a comment
There was a problem hiding this comment.
please also add a test with openai python library to prove that this is openai-compat.
see tools/server/tests/unit/test_chat_completion.py
ngxson
reviewed
Dec 20, 2025
Collaborator
Actually, I think this is a very good approach - let's start with a minimal implementation that will permit Codex to work properly with Llama.cpp and we can add more complexities later. |
Contributor
Author
|
CI randomly fails but I think it is irrelevant. |
3 tasks
ngxson
reviewed
Dec 25, 2025
Comment on lines
+3023
to
+3028
| const json initial_events = json::array({ | ||
| created, | ||
| in_progress, | ||
| output_item_added, | ||
| content_part_added | ||
| }); |
Collaborator
There was a problem hiding this comment.
it is expected that we send this much data for each token generated?
can you provide a dump of OAI streamed response?
2 tasks
Contributor
Author
|
Reopened #18486 with non-master branch. |
2 tasks
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.
This PR introduces minimally working openAI-compatible
/v1/responsesAPI by converting /v1/responses request into /v1/chat/completions request.Only text generation is supported and several fields such as IDs (of response and messages) are omitted.
If this appears too unfinished for a merge at this stage, please let me know and I'll convert it to a draft.