Oh yeah. It's happening.

add a typed async OpenAI Responses adapter #14

targeting main from codex/responses-adapter
Closed opened by and assigned to personhood.removal.surgery
targeting main from codex/responses-adapter

adds a typed async Provider[Request, Response] contract and an OpenAIResponses reference adapter. callers supply and own the AsyncOpenAI client; the adapter preserves native output items, status, usage, and SDK errors. unexpected non-json bodies raise a pydantic ValidationError.

the adapter handles non-streaming Responses requests. comparison with omp confirmed that its Hyper connector uses Chat Completions, while Codex needs a separate adapter for its OAuth headers, request restrictions, and streaming transport.

validation:

  • mise run check passed.
  • mise run test: 162 tests passed, including completed, incomplete, and failed responses, API errors, and unexpected SSE bodies.
  • live Hyper tests with deepseek-v4.1-flash passed for text, named tool calls, usage metadata, and a one-token output cap producing incomplete.
Commits 0