Background
OpenAI introduced the Responses API (POST /v1/responses) as a successor to Chat Completions. Tools like Codex CLI (wire_api = "responses") exclusively use this endpoint and cannot fall back to /v1/chat/completions.
Currently WindsurfAPI returns 404 Not Found for /v1/responses, which makes it incompatible with Codex and similar agents.
Proposed Solution
Add a /v1/responses endpoint that:
- Accepts the Responses API request format (
input field instead of messages, reasoning.effort, etc.)
- Converts to the existing Chat Completions handler internally
- Converts the CC response back to Responses API format (
output array with type: "message" items)
- Supports both streaming (SSE with
response.created, response.output_text.delta, response.completed events) and non-streaming modes
Example Request
POST /v1/responses
{
"model": "gpt-5-5-xhigh",
"input": "Hello",
"reasoning": {"effort": "high"},
"stream": true
}
Example Response (non-streaming)
{
"id": "resp-xxx",
"object": "response",
"model": "gpt-5-5-xhigh",
"output": [
{
"type": "message",
"role": "assistant",
"content": [{"type": "output_text", "text": "Hi!"}],
"status": "completed"
}
],
"usage": {...},
"status": "completed"
}
This would make WindsurfAPI a drop-in replacement for Codex, Claude Code (already supported via /v1/messages), and standard Chat Completions clients.
I have a working implementation and can submit a PR if interested.
Background
OpenAI introduced the Responses API (
POST /v1/responses) as a successor to Chat Completions. Tools like Codex CLI (wire_api = "responses") exclusively use this endpoint and cannot fall back to/v1/chat/completions.Currently WindsurfAPI returns
404 Not Foundfor/v1/responses, which makes it incompatible with Codex and similar agents.Proposed Solution
Add a
/v1/responsesendpoint that:inputfield instead ofmessages,reasoning.effort, etc.)outputarray withtype: "message"items)response.created,response.output_text.delta,response.completedevents) and non-streaming modesExample Request
Example Response (non-streaming)
{ "id": "resp-xxx", "object": "response", "model": "gpt-5-5-xhigh", "output": [ { "type": "message", "role": "assistant", "content": [{"type": "output_text", "text": "Hi!"}], "status": "completed" } ], "usage": {...}, "status": "completed" }This would make WindsurfAPI a drop-in replacement for Codex, Claude Code (already supported via
/v1/messages), and standard Chat Completions clients.I have a working implementation and can submit a PR if interested.