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:
decolua
2026-02-02 09:17:15 +07:00
parent 814e02ae31
commit 7b864a9dcb
7 changed files with 85 additions and 51 deletions

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",