Skip to content

feat: add OpenAI Responses API endpoint support#219

Open
Alex1Yuan wants to merge 1 commit intoericc-ch:masterfrom
Alex1Yuan:feat/responses-api
Open

feat: add OpenAI Responses API endpoint support#219
Alex1Yuan wants to merge 1 commit intoericc-ch:masterfrom
Alex1Yuan:feat/responses-api

Conversation

@Alex1Yuan
Copy link
Copy Markdown

Summary

  • Add /v1/responses and /responses endpoints that forward requests directly to GitHub Copilot's responses API
  • Enables support for responses-only models (gpt-5.4, gpt-5.3-codex, etc.)
  • Follows existing project patterns: rate limiting, manual approval, vision detection, X-Initiator header

Changes

  • src/services/copilot/create-responses.ts — Copilot responses API client
  • src/routes/responses/route.ts — Route registration with error handling
  • src/routes/responses/handler.ts — Request handler (streaming + non-streaming)
  • src/server.ts — Register new endpoints

Test plan

  • TypeScript type check passes (tsc --noEmit)
  • ESLint passes (pre-commit hook)
  • Tested gpt-5.4 non-streaming — returns correct response
  • Tested gpt-5.4 streaming — full SSE event chain works
  • Tested gpt-5.3-codex non-streaming — returns correct response
  • Verified gpt-4o correctly returns unsupported_api_for_model error
  • Existing endpoints unaffected (backward compatible)

Add /v1/responses and /responses endpoints that forward requests
directly to GitHub Copilot's responses API. This enables support
for responses-only models like gpt-5.4 and gpt-5.3-codex.
@caozhiyuan
Copy link
Copy Markdown
Contributor

caozhiyuan commented Mar 30, 2026

@Alex1Yuan Duplicated with #170. You can use https://github.com/caozhiyuan/copilot-api (includes many advanced features). This repository hasn't been maintained for half a year.

@Alex1Yuan
Copy link
Copy Markdown
Author

@Alex1Yuan Duplicated with #170. You can use https://github.com/caozhiyuan/copilot-api (includes many advanced features). This repository hasn't been maintained for half a year.

Get it, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants