feat(codex): Cursor compatibility + Next.js 16 proxy migration

- Force streaming for Codex/OpenAI models to fix non-streaming bug
- Strip unsupported params (user, metadata, stream_options, prompt_cache_retention)
- Force response translation from openai-responses to openai format
- Migrate middleware.js to proxy.js for Next.js 16
- Use webpack explicitly in dev/build scripts
- Updated Codex User-Agent
This commit is contained in:
Hellodebasishsahu committed 2026-01-31 18:22:10 +05:30
1 parent 814e02ae31
commit e9b0a73ece
6 files changed
+49 -36

No files matched your search

+2 -2
View File
@@ -39,9 +39,9 @@ export const PROVIDERS = {
baseUrl: "https://chatgpt.com/backend-api/codex/responses",
format: "openai-responses", // Use OpenAI Responses API format (reuse translator)
headers: {
"Version": "0.21.0",
"Version": "0.92.0",
"Openai-Beta": "responses=experimental",
"User-Agent": "codex_cli_rs/0.50.0 (Mac OS 26.0.1; arm64)"
"User-Agent": "codex-cli/0.92.0 (Windows 10.0.26100; x64)"
},
// OpenAI OAuth configuration
clientId: "app_EMoamEEZ73f0CkXaXp7hrann",