Commit graph

37 commits

Author SHA1 Message Date
Rodrigo Rodrigues Costa
40a53fbd33
Fix: Codex image support - convert image_url to input_image format (#236)
Cursor sends images as Chat Completions format:
  { type: "image_url", image_url: { url: "data:...", detail: "auto" } }

But Codex Responses API requires:
  { type: "input_image", image_url: "data:..." }

- openai-responses.js: bidirectional conversion image_url <-> input_image
- responsesApiHelper.js: input_image -> image_url in Responses->Chat path
- codex.js: safety net conversion in executor before sending to Codex API

Note: Cursor has a known bug where images bypass the Override OpenAI Base URL
and are sent directly to api.openai.com. This fix is effective for other clients
(curl, Codex CLI, Claude Code) that route through the proxy correctly.

Made-with: Cursor
2026-03-05 10:31:50 +07:00
Cengizhan
f763d4ffed
fix: resolve GitHub Copilot 400 error for Claude models in Cursor IDE (#220)
- github.js: add sanitizeMessages() to convert unsupported content types
  (tool_use, tool_result, thinking) to plain text before sending to
  GitHub /chat/completions endpoint
- openai-responses.js: skip pushing message blocks with empty content
  (e.g. assistant messages that only contain tool_calls)
- providerModels.js: revert targetFormat changes (not needed with sanitize fix)

Fixes: https://github.com/decolua/9router/issues/219
2026-03-01 15:38:14 +07:00
decolua
04ba66bc1e chore: Refactor CursorAuthModal to handle manual instructions for Windows users. 2026-02-28 12:12:49 +07:00
Quan
07717bad60 feat: cherry-pick PR #183 — multi-provider support, PWA, dynamic models, UI improvements
Cherry-picked from decolua/9router PR #183.
Note: open-sse changes included but need further review due to extensive modifications.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-25 11:40:50 +07:00
decolua
a5eb5a864e chore: add Gemini 3.1 Pro models to provider configurations 2026-02-22 15:20:24 +07:00
decolua
3debf84b9a Add Providers 2026-02-20 17:05:46 +07:00
zx
a229d79158 feat(antigravity): initial steps for Antigravity anti-ban alignment
Cherry-picked from decolua/9router#141 (author: LinearSakana / zx <me@char.moe>)

- Implement client identity spoofing with numeric enums (ideType: 9, pluginType: 2)
- Add runtime platform detection for User-Agent and metadata
- Implement per-connection session ID caching (binary-compatible format)
- Add ANTIGRAVITY_HEADERS (X-Client-Name, X-Client-Version, x-goog-api-client)
- Add X-Machine-Session-Id header injection
- Align metadata/mode parameters across all Antigravity API calls
- Implement double injection for system prompt (raw + [ignore] wrapped)
- Rename internal anti-loop header to x-request-source for anonymity

Skipped: commit 6 (signature side-channel caching) — kept DEFAULT_THINKING_GEMINI_SIGNATURE
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 14:44:29 +07:00
apeltekci
ac7cedd27e feat(responses): respect client streaming preference + string input support (#121)
- Remove forced stream=true from responsesHandler
- Add stream-to-JSON converter for non-streaming clients (Codex)
- Accept string input in Responses API (normalize to array)
- Codex SSE header fallback for missing Content-Type
- Refactor: extract shared normalizeResponsesInput()

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-15 11:47:55 +07:00
Bexultan
69131295db
fix(github): Implement dynamic fallback for Codex models requiring /responses endpoint (#127)
* fix(github): add dynamic fallback to /responses for Codex models

* Refactor GithubExecutor: use config for URL detection
2026-02-15 07:40:55 +07:00
apple-techie
d7d5dc90bc fix: update Codex executor for gpt-5.3-codex support
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 18:12:38 +07:00
Blade096
bd23ab41ee feat(iflow): add IFlowExecutor with HMAC-SHA256 signature and enable models
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 15:32:22 +07:00
decolua
b179dc2647 Refactor AntigravityExecutor to improve part filtering logic 2026-02-10 19:31:49 +07:00
decolua
2e854bd4c9 feat(antigravity): integrate Antigravity tool with MITM support and update CLI tools 2026-02-08 16:28:13 +07:00
decolua
bdbe8162e7 feat(provider): add free providers and enhance error handling 2026-02-07 11:17:06 +07:00
Blade096
7c609d7a3e feat(providers): add Minimax Coding (China) provider
- Add minimax-cn provider with China endpoint (api.minimaxi.com)
- Add provider icon and configuration
- Add validation and test support
- Add API configuration in open-sse

Co-authored-by: Blade096 <46746496+Blade096@users.noreply.github.com>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 15:10:57 +07:00
Hellodebasishsahu
127475df84 feat(codex): add GPT 5.3, fix API translation, add thinking levels
- Add GPT 5.3 Codex model with thinking level variants (none/low/medium/high/xhigh)
- Extract thinking level from model name suffix (e.g., gpt-5.3-codex-high)
- Fix Codex translation: preserve openai-responses format for Droid CLI
- Add effort level logging in request logs

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 09:46:11 +07:00
decolua
3c65e0c5f2 feat: Improve Antigravity quota monitoring and fix Droid CLI compatibility 2026-02-05 22:15:26 +07:00
decolua
32aefe5a76 feat(executors): Improved UI components for displaying provider limits and usage statistics in the dashboard. 2026-02-05 18:38:50 +07:00
decolua
0a026c7af6 feat(cursor): Add cursor Provider 2026-02-05 11:06:20 +07:00
decolua
abaeb22863 Merge branch 'pr-50' 2026-02-05 11:02:50 +07:00
triadmoko
137f315bec feat(cursor): Integrate Cursor IDE support with OAuth import token flow
- Add CursorExecutor for handling requests to the Cursor API using protobuf over HTTP/2.
- Implement CursorAuthModal for user token import from local SQLite database.
- Update provider models and constants to include Cursor as a supported provider.
- Enhance API service with token validation and user info extraction from Cursor tokens.
- Introduce utility functions for checksum generation and protobuf encoding/decoding for Cursor API interactions.
2026-02-04 12:07:29 +07:00
ramhaidar
da5bdef4cb feat: Add Anthropic Compatible provider support
- Added support for 'anthropic-compatible' provider nodes in backend.
- Implemented isAnthropicCompatible logic in open-sse for /messages URL construction and headers.
- Added UI for creating and managing Anthropic Compatible providers in the dashboard.
- Updated validation logic for Anthropic-compatible endpoints.
- Sanitize base URL input (strip trailing /messages) to prevent 404s and improve UX.
- Improve validation: use GET /models (2xx success), and support x-api-key / Authorization Bearer hybrid proxies.
- Enable model import via /models for Anthropic Compatible providers.
- Ensure Authorization is omitted when x-api-key is present to avoid strict proxy conflicts.
- Resolve Anthropic-compatible credentials by prefix during model resolution (e.g., acx/model).
- Update default executor to match provider header/url behavior for Anthropic-compatible providers.
2026-02-03 15:11:41 +07:00
decolua
a33924b336 feat: Enhance usage tracking across response handlers 2026-02-03 00:29:22 +07:00
decolua
0a28f9f924 feat: Add OpenAI-compatible provider nodes
- Support multiple OpenAI-compatible providers with custom prefix/baseUrl
- Add provider nodes CRUD (create/read/update/delete)
- URL building: baseUrl + /chat/completions or /responses
- Model import from /models endpoint
- API key validation via /models
- Usage type safety across all translators
- OAuth token auto-refresh for expired tokens
2026-02-02 19:45:12 +07:00
decolua
7b864a9dcb 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
2026-02-02 09:17:15 +07:00
decolua
239377143e Fix antigravity 2026-01-28 16:21:12 +07:00
decolua
79342c0c3e ok 2026-01-27 10:49:16 +07:00
decolua
d9b8e48725 feat: OpenAI compatibility improvements & build fixes
- Fix hydration mismatches and initialization errors
- Add /v1/models endpoint for OpenAI clients
- Add Codex response translator (Responses → OpenAI)
- Fix circular dependencies and PropTypes
- Add Material Symbols font and CSS fixes
- Update README with deployment guide

Co-merged from PR #18 (14/15 commits, skipped debug)
2026-01-20 13:16:34 +07:00
decolua
1d481c2862 Fix Kiro 2026-01-16 13:09:13 +07:00
decolua
6b22b1f490 Fix Kiro token refresh logic 2026-01-16 12:39:03 +07:00
decolua
eff52f75ae Fix kiro 2026-01-16 12:11:32 +07:00
decolua
26b61e5fbb Feat Kiro OAuth, Fix Codex 2026-01-15 18:29:47 +07:00
decolua
c39eca6d4e Fix Combo 2026-01-14 14:55:47 +07:00
decolua
f9ef718fc6 Fix Antigravity 2026-01-13 17:19:41 +07:00
decolua
5d092f3710 Remove debug 2026-01-12 16:57:28 +07:00
decolua
fb5be37e14 Fix Antigravity 2026-01-12 16:53:27 +07:00
decolua
f46ff42cb3 refactor: streamline provider interactions and enhance error handling 2026-01-11 21:45:01 +07:00