You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose POST /v1/responses (and POST /responses) as a new Hono route, mirroring the existing /v1/chat/completions and /v1/messages patterns. This issue is route + request validation only; the upstream call lives in a separate issue.
Part of #1.
Goal
Expose
POST /v1/responses(andPOST /responses) as a new Hono route, mirroring the existing/v1/chat/completionsand/v1/messagespatterns. This issue is route + request validation only; the upstream call lives in a separate issue.Current state
src/server.ts:17–31registers exactly:```
/, /chat/completions, /v1/chat/completions, /models, /v1/models,
/embeddings, /v1/embeddings, /usage, /token,
/v1/messages, /v1/messages/count_tokens
```
There is no
/responsesdirectory undersrc/routes/.Tasks
src/routes/responses/mirroring thechat-completions/layoutroute.ts— Hono route with POST handlertypes.ts— zod schema for the OpenAI Responses API request body (model,input,instructions,tools,tool_choice,temperature,top_p,max_output_tokens,reasoning,previous_response_id,store,include,stream,metadata,parallel_tool_calls,service_tier,truncation,user)handler.ts— request → service → response wiringsrc/server.tsat both/responsesand/v1/responses/chat/completionsalready usesAcceptance criteria
POST /v1/responsesreturns a structured 4xx for malformed bodies (zod validation) instead of 500--verboselogging/v1/chat/completionsand/v1/messagesregression tests still passFile pointers
src/server.ts:17–31src/routes/chat-completions/(reference layout)src/routes/messages/route.ts:10(reference for nested route under/v1)