541 Commits

Author SHA1 Message Date
decolua
484e7025e8 feat: add ProviderDetailPage component for managing provider connections and models
- Introduced a new ProviderDetailPage component to handle provider-specific functionalities.
- Implemented state management for connections, loading states, and model selections.
- Added API calls for fetching provider connections and model aliases.
- Included modals for OAuth and API key management.
- Enhanced user experience with model selection and saving capabilities.
2026-02-25 16:31:40 +07:00
Mai Trung Tiến
3cf900a0a1 feat: add database backup import/export (#194) 2026-02-25 15:32:38 +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
147fc168f9 fix bug 2026-02-25 10:40:15 +07:00
Blade
091ad3fc5d Fix: Add missing glm-cn provider definition for Web UI discovery (#186)
- Add glm-cn to APIKEY_PROVIDERS in src/shared/constants/providers.js
- Align with existing glm-cn model definitions in providerModels.js
- Users can now see and select GLM (China) option in Web UI
- Follows same pattern as minimax-cn (red color for China region)
2026-02-25 10:34:52 +07:00
Thiên Toán
39d04d0425 Add GitHub Actions workflow for Docker build and push (#185) 2026-02-25 10:34:23 +07:00
decolua
8221f7c027 Fix MITM 2026-02-23 21:56:40 +07:00
decolua
d21f7aaadc Fix bug Tunnel 2026-02-22 21:44:11 +07:00
decolua
a5eb5a864e chore: add Gemini 3.1 Pro models to provider configurations 2026-02-22 15:20:24 +07:00
decolua
930e917092 chore: update version and enhance provider model configurations. 2026-02-22 11:30:43 +07:00
zx07
ea67742f2a feat: implement real project ID fetching for Antigravity (#170)
* feat: implement Project ID service to fetch and cache real Project IDs from Google Cloud Code API

* fix: implement caching and cleanup for Project ID retrieval

* feat: add project ID invalidation and refresh logic after token updates

* refactor: remove unnecessary format changes

* feat: add on-demand project ID retrieval for antigravity requests
2026-02-21 23:15:18 +07:00
decolua
94c4320632 Fix 2026-02-21 23:06:55 +07:00
decolua
33830b00bb Modify image source in README.md
Updated image source URL in README.md to include a cache-busting query parameter.
2026-02-21 21:18:59 +07:00
Muhammad Hamid Raza
7837d7f1d0 Update 9router.png (#168) 2026-02-21 21:17:06 +07:00
Muhammad Hamid Raza
b7ac06cccb docs: Add billing clarification to prevent user confusion (#166)
* update

* Update 9router.png
2026-02-21 20:33:25 +07:00
decolua
0baa299722 feat :
- Added tunnel
- Removed cloud feature
v0.2.89
2026-02-21 16:42:46 +07:00
decolua
adf57aa0c9 Fixed Codex 2026-02-21 14:36:06 +07:00
decolua
f2025cc776 feat: add Gemini 3.1 Pro models to provider 2026-02-20 21:05:02 +07:00
decolua
985985e454 refactor: update Antigravity model configurations and pricing 2026-02-20 17:52:15 +07:00
decolua
3debf84b9a Add Providers 2026-02-20 17:05:46 +07:00
decolua
bd71298fb7 docs: add OmniRoute fork to README
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 15:23:03 +07:00
Aakash Thakkar
d7e06c3085 fix: improve cursor auto-import reliability on macOS (#161)
The macOS auto-import was failing with "Cursor database not found" even
when Cursor was installed and logged in. This was caused by a single
hardcoded path and no fallback when the DB file existed but couldn't be
opened (e.g. WAL lock, Insiders variant).

Changes (macOS only — linux/win32 paths are unchanged):
- Probe both standard and Insiders DB locations on macOS
- Return a descriptive error when the DB file exists but can't be opened
- Try multiple known key names for token and machine ID
- Add fuzzy key fallback for future Cursor schema changes
- Normalize JSON-encoded string values from the DB

Adds unit tests covering all new and existing behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 15:07:43 +07:00
Thiên Toán
73388a02a1 feat: add pause/resume functionality for API keys (#158)
- Add isActive field to API key schema with migration
- Implement PUT /api/keys/[id] endpoint for toggle
- Update validation to reject paused keys (403)
- Add UI toggle controls with confirmation
- Ensure cloud sync preserves pause state
2026-02-20 15:07:12 +07:00
Thiên Toán
806bd4ae14 feat: add API endpoint dimension to usage statistics dashboard (#152)
- Tracks endpoints like /v1/chat/completions, /v1/messages, /v1/responses
- New sortable/groupable table in usage dashboard with expandable groups
- Enhanced usage database aggregation by endpoint + model + provider
- Added endpoint tracking to all saveRequestUsage/saveRequestDetail calls
- Maintains backward compatibility with existing data structure
2026-02-20 15:03:18 +07:00
Hồ Xuân Dũng
a57a8ce206 feat: add Gemini embeddings support + Letta compatibility fixes
Cherry-picked from decolua/9router#148 (author: xuandung38 / Hồ Xuân Dũng <me@hxd.vn>)

- Add Google AI (Gemini) embeddings support for /v1/embeddings endpoint
- Add Gemini embedding models: gemini-embedding-001, text-embedding-005, text-embedding-004
- Inject missing object/created fields for Letta and strict OpenAI clients
- Strip Azure-specific fields (prompt_filter_results, content_filter_results) from responses
- Fix Dockerfile: copy open-sse directory into Docker runner stage

Skipped: whitelist message field stripping (commit 3/7/8) — too aggressive for all providers
Skipped: default stream=false change (commit 9) — behavior change needs further review
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 15:01:10 +07:00
decolua
e1e5a81613 feat: add GLM 5 and MiniMax M2.5 models to providerModels.js; add Claude Sonnet 4.6 to CLI tools 2026-02-20 14:44:53 +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
Thiên Toán
9fbd6e619d fix: correct token extraction for Claude non-streaming responses (#131)
- Add response logging for non-streaming requests (5_res_provider.json, 7_res_client.json)
- Fix extractUsageFromResponse() to check Claude format before OpenAI format
- Prevents format misidentification that caused tokens to show as 0
- Claude uses input_tokens/output_tokens vs OpenAI's prompt_tokens/completion_tokens

Fixes dashboard Details tab showing 0 tokens for Claude requests
2026-02-20 14:24:21 +07:00
zx07
f933dd9c61 feat: add Qwen3.5 Coder Model configuration (#156)
Co-authored-by: zx <me@char.moe>
2026-02-19 21:55:11 +07:00
EdamAmex
c4aa4247bd feat: Add GPT 5.3 Codex to GitHub Copilot (#150)
* Add GPT-5.3 Codex model to providerModels.js

* Add pricing constants for gpt-5.3-codex
2026-02-19 12:10:34 +07:00
すずねーう
4e2a3f888c feat: Add Claude Sonnet 4.6 to GitHub Copilot (#149)
* Add Claude Sonnet 4.6 to GitHub Copilot

Claude Sonnet 4.6 is available in GitHub Copilot now.
https://github.blog/changelog/2026-02-17-claude-sonnet-4-6-is-now-generally-available-in-github-copilot/

* Add pricing constants for Claude Sonnet 4.6 for GitHub Copilot
2026-02-19 07:59:44 +07:00
decolua
d83bd86816 feat: allow custom user data directory via DATA_DIR environment variable 2026-02-18 13:53:31 +07:00
decolua
4cf25dc53d feat: implement API key requirement toggle 2026-02-18 13:46:14 +07:00
decolua
b057c43c27 feat(open-sse): add Claude Sonnet 4.6 2026-02-18 13:31:32 +07:00
misterdas
b9a697925e fix(open-sse): emit [DONE] in passthrough SSE mode (#142) 2026-02-18 13:26:23 +07:00
HXD.VN
e1b836168a feat: add /v1/embeddings endpoint (OpenAI-compatible) (#146)
* feat: implement /v1/embeddings endpoint (#117)

Add OpenAI-compatible POST /v1/embeddings endpoint that routes through
the existing provider credential + fallback infrastructure.

Changes:
- open-sse/handlers/embeddingsCore.js: core handler (handleEmbeddingsCore)
  * Validates input (string or array), encoding_format
  * Builds provider-specific URL and headers for openai, openrouter,
    and openai-compatible providers
  * Handles 401/403 token refresh via executor.refreshCredentials
  * Returns normalized OpenAI-format response { object: 'list', data, model, usage }
- cloud/src/handlers/embeddings.js: cloud Worker handler (handleEmbeddings)
  * Auth + machineId resolution identical to handleChat
  * Provider credential fallback loop with rate-limit tracking
- cloud/src/index.js: wire new routes
  * POST /v1/embeddings  (new format — machineId from API key)
  * POST /{machineId}/v1/embeddings  (old format — machineId from URL)

* test: add unit tests for /v1/embeddings endpoint

- Setup vitest as test framework (tests/ directory)
- embeddingsCore.test.js (36 tests):
  - buildEmbeddingsBody: single string, array, encoding_format, default float
  - buildEmbeddingsUrl: openai, openrouter, openai-compatible-*, unsupported
  - buildEmbeddingsHeaders: per-provider headers, accessToken fallback
  - handleEmbeddingsCore: input validation, success path, provider errors,
    network errors, invalid JSON, token refresh 401 handling
- embeddings.cloud.test.js (23 tests):
  - CORS OPTIONS preflight
  - Auth: missing/invalid/old-format/wrong key → 401/400
  - Body validation: bad JSON, missing model, missing input, bad model → 400
  - Happy path: single string, array, delegation, CORS header, machineId override
  - Rate limiting: all-rate-limited → 429 + Retry-After, no credentials → 400
  - Error propagation: non-fallback errors, 429 exhausts accounts

Total: 59/59 tests passing
Framework: vitest v4.0.18, Node v22.22.0

* feat: add Next.js API route for /v1/embeddings endpoint

Wire the embeddings handler into Next.js App Router.

- src/app/api/v1/embeddings/route.js: Next.js API route (POST + OPTIONS)
- src/sse/handlers/embeddings.js: SSE-layer handler mirroring chat.js pattern

Uses handleEmbeddingsCore from open-sse/handlers/embeddingsCore.js with
the same auth, credential fallback, and token refresh logic as the chat
handler. Supports REQUIRE_API_KEY env var, provider fallback loop, and
consistent logging.
2026-02-18 13:24:02 +07:00
zx07
05b09e6165 feat: implement lazy loading for UsagePage with suspense fallback (#136)
Co-authored-by: zx <me@char.moe>
2026-02-16 16:30:36 +07:00
zx07
c7d44101b5 feat: add GPT 5.3 Codex Spark model to pricing and provider models (#133)
Co-authored-by: zx <me@char.moe>
2026-02-16 12:31:12 +07:00
Thiên Toán
6caef7f552 feat: add URL-based tab state persistence in usage page (#129)
- Add URL search params to track active tab
- Persist tab selection on page refresh
- Enable direct linking to specific tabs (overview, logs, limits, details)
- Implement smooth navigation without page scroll
2026-02-15 17:26:47 +07:00
decolua
3e4ca1889f - Add new model "minimax-m2.5" to providerModels. 2026-02-15 13:03:32 +07:00
decolua
e2db638982 feat: enhance request handling and error management in chatCore and streamToJsonConverter
- Added detailed request logging and latency tracking in handleChatCore.
- Improved error handling for SSE to JSON conversion and JSON parsing in streamToJsonConverter.
- Introduced a safe JSON parsing utility to handle potential parsing errors gracefully in requestDetailsDb.

Co-authored-by: zx <me@char.moe>
2026-02-15 12:02:53 +07:00
zx07
3d29b86d44 feat: enhance disconnect handling and request tracking in chatCore.js (#126)
Co-authored-by: zx <me@char.moe>
2026-02-15 11:51:37 +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
Nick Roth
202fee714b feat(auth): add model-level rate limit locking for multi-bucket providers (#120)
Providers like Antigravity maintain separate quota buckets per model family
(e.g. Claude vs Gemini). A 429 on claude-opus previously locked the entire
account, preventing gemini-pro requests even though its quota was full.

This adds in-memory per-model locking so that only the specific model is
skipped during account selection while other models remain accessible.

Changes:
- Add model-aware lock tracking in auth.js (Map<connectionId:model, expiry>)
- Pass model context from chat handler to auth service
- Multi-bucket behavior gated to known providers (MULTI_BUCKET_PROVIDERS set)
- No database schema changes — locks are in-memory and clear on restart

Closes #110
2026-02-15 11:35:13 +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
zx07
d9bf4c9e59 feat(observability): add toggle for request detail recording (#122)
* feat(frontend): add toggle logic for observability configuration

(cherry picked from commit 71cef26df6160290c980710ff4a0d6e7aa926105)

* feat(backend): add toggle logic for observability configuration

(cherry picked from commit fb1a8d90e24f041c41b3039f7189791458b87f87)

---------

Co-authored-by: zx <me@char.moe>
2026-02-13 19:37:54 +07:00
zx07
03ab554d1c feat: add support for GLM 5 (if) (#123)
(cherry picked from commit e26d65aa55726e330f6806aa1abfe05ac6801619)

Co-authored-by: zx <me@char.moe>
2026-02-13 19:37:13 +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
Blade
9c9af25acd Fix/minimax cn cant use in combo (#107)
* fix(provider): correct minimax-cn to alias mapping

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
(cherry picked from commit 315c6fc91b06584b101a4078affef3bb3b0f7001)

* fix(provider): add minimax-cn model list to PROVIDER_MODELS

(cherry picked from commit 15bc2d070306f48da4887a6286ec2a6007300705)

---------

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-11 19:58:33 +07:00
Blade096
1ae4e311b7 feat: add GLM Coding (China) provider and Usage by API Keys statistics
Co-authored-by: Cursor <cursoragent@cursor.com>
v0.2.79
2026-02-11 15:44:08 +07:00