feat: add OpenAI /v1/responses adapter via chat flow

Implement a thin responses layer that reuses existing chat/completions execution so auth, pooling, streaming, tool passthrough, and error semantics stay aligned across APIs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
GitHub Actions
2026-04-20 13:11:00 +08:00
parent 56c57a4901
commit c9bd71f727
3 changed files with 432 additions and 1 deletions

View File

@@ -32,6 +32,19 @@ class ChatCompletionsRequest(BaseModel):
tool_choice: Any | None = None
class ResponsesRequest(BaseModel):
model: str
input: Any | None = None
stream: bool = False
temperature: float | None = None
top_p: float | None = None
max_output_tokens: int | None = None
user: str | None = None
tools: list[dict[str, Any]] | None = None
tool_choice: Any | None = None
instructions: str | None = None
class ModelData(BaseModel):
id: str
name: str | None = None