adding responses api to oai
This commit is contained in:
@@ -54,6 +54,8 @@ curl http://localhost:4005/oai/v1/chat/completions \
|
||||
-d '{"model":"kimi-k3","messages":[{"role":"user","content":"Hello"}]}'
|
||||
```
|
||||
|
||||
Codex and other OpenAI Responses API clients can use `POST /oai/v1/responses`. Responses requests are translated to the upstream Chat Completions API and responses, including streaming events, are translated back to the Responses format.
|
||||
|
||||
Streaming requests are supported with `"stream":true` and are passed through as Server-Sent Events. The model list is fetched from OpenCode Go, so it can include models whose upstream transport is not OpenAI Chat Completions.
|
||||
|
||||
The Anthropic-compatible adapter exposes `POST /ant/v1/messages` and `GET /ant/v1/models`. Messages, tools, JSON responses, and streaming events are translated to and from OpenAI Chat Completions. Anthropic clients should use their normal Messages API request format and can use the OpenCode model IDs returned by the models endpoint.
|
||||
|
||||
Reference in New Issue
Block a user