Commit graph

174 commits

Author SHA1 Message Date
Quan
39f651f5be feat: Add Google Cloud Vertex AI provider support (vertex, vertex-partner)
Co-authored-by: Quan <quanle96@outlook.com>
PR: https://github.com/decolua/9router/pull/298

Thanks to @kwanLeeFrmVi for the original implementation. Here is a summary
of changes made during review integration:

- Replaced google-auth-library with jose (already a project dependency)
  for SA JSON -> OAuth2 Bearer token minting (RS256 JWT assertion flow)
- Moved auth logic (parseSaJson, refreshVertexToken, token cache) from
  executor into open-sse/services/tokenRefresh.js to match project pattern
- Fixed executor to use proxyAwareFetch instead of raw fetch (proxy support)
- Simplified buildUrl: use global aiplatform.googleapis.com endpoint for
  both vertex (Gemini) and vertex-partner; removed region/modelFamily fields
- Added auto-detection of GCP project_id from raw API key via probe request
  (vertex-partner only, cached per key)
- Added vertex/vertex-partner cases to /api/providers/validate/route.js
- Updated model lists based on live testing:
  - vertex: gemini-3.1-pro-preview, gemini-3.1-flash-lite-preview,
    gemini-3-flash-preview, gemini-2.5-flash (removed gemini-2.5-pro: 404)
  - vertex-partner: deepseek-v3.2, qwen3-next-80b (instruct+thinking),
    glm-5 (removed Mistral/Llama: not enabled in test project)
  - gemini provider: added gemini-3.1-pro-preview, gemini-3.1-flash-lite-preview
- Removed bun.lock (project uses npm/package-lock.json)
- Removed region and modelFamily UI fields (global endpoint, auto-detect)
- Kiro token auto-refresh on AccessDeniedException (from commit 2)

Made-with: Cursor
2026-03-14 11:37:23 +07:00
decolua
adae2605bf Feat : Auto restart after crash 2026-03-14 09:37:29 +07:00
decolua
399adca63d feat: Add support for local Ollama Local provider 2026-03-13 10:22:59 +07:00
decolua
373b10ebb5 feat(chat): Enhance bypass handling and introduce CC filter naming feature
Fix : Ollam Provider response
2026-03-13 09:41:40 +07:00
decolua
b0c6b61398 Refactor config 2026-03-12 16:20:46 +07:00
decolua
8223c87988 feat(memory-management): Introduce MEMORY_CONFIG for session and DNS management, including session TTL, cleanup intervals, and proxy dispatcher limits. 2026-03-12 15:57:21 +07:00
decolua
372b985ee9 fix(translator): Ensure loading state is reset after error handling in TranslatorPage 2026-03-12 15:45:41 +07:00
decolua
32e3980a13 feat(ollama): Add Ollama provider support with models and configuration, including API endpoints and UI updates. 2026-03-12 15:24:02 +07:00
decolua
a224f68e5c feat(kimi-coding): Added Kimi Coding to the list of supported OAuth providers with specific configuration. 2026-03-12 10:48:11 +07:00
decolua
f1bf027c68 feat(usage): claude quota tracker 2026-03-12 09:42:17 +07:00
decolua
fe49b61dfb feat: - Introduced per-provider strategy overrides in settings, allowing for more flexible connection management.
- Added new provider models: DeepSeek 3.1, DeepSeek 3.2, and Qwen3 Coder Next.
- Implemented UI changes to support round-robin strategy with sticky limits in the provider detail page.
- Improved logging to display connection names instead of IDs for better clarity.
2026-03-11 18:04:38 +07:00
Hưng Nguyễn
2470ef84de
feat: add confbox dependency and refactor TOML parsing in codex settings (#282)
fix: update JSDoc for refreshAndUpdateCredentials return type
2026-03-11 17:00:49 +07:00
decolua
d9dad5bcf3 Fix : Add custom to model selector 2026-03-11 11:59:07 +07:00
decolua
a501c05969 fix(api): improve access token handling during credential refresh 2026-03-10 16:38:32 +07:00
Hồ Khánh Duy
10b22d1318
update: claude code (cc) models pricing (#275) 2026-03-09 23:40:37 +07:00
vothaianh
076e70c5a6 refactor(providers): simplify proxy UX — hover button + inline dropdown, remove selection toolbar
Made-with: Cursor
2026-03-09 17:17:59 +07:00
decolua
8c8eeecc70 refactor: replace better-sqlite3 with lowdb for request details storage
- Removed better-sqlite3 dependency and implemented lowdb for JSON-based storage.
- Updated observability settings handling and configuration retrieval.
- Cleaned up unused observability settings UI components in ProfilePage.
- Adjusted contributors badge display in README for better visibility.
2026-03-09 16:50:18 +07:00
apeltekci
29f3e1894e fix(cline): use workos auth token shape
Made-with: Cursor
2026-03-09 16:21:29 +07:00
huynhquangtoan
89405125e6 fix(proxyTest): improve error handling and update default test URL
Made-with: Cursor
2026-03-09 15:52:36 +07:00
decolua
9bca03bff7 chore: Delete the proxy pools migration API route.
Made-with: Cursor
2026-03-09 15:49:18 +07:00
Peter Steinberger
f94ac213b5 fix: avoid lost writes by running bulk proxy pool updates sequentially against JSON db
Made-with: Cursor
2026-03-09 15:48:21 +07:00
decolua
880f4eca91 feat(proxy): add proxy pool and per-connection binding + strictProxy support
- Centralize proxy management with reusable proxy pools
- Per-connection proxy binding with legacy fallback
- Add strictProxy option: fail hard instead of silently falling back to direct
- Resolve alicode-intl conflict: keep alicode-intl support + proxy support

Made-with: Cursor
2026-03-09 15:46:06 +07:00
Andrew Peltekci
4c469291a1
fix(test): support cline and kilocode oauth checks (#258) 2026-03-07 11:10:53 +07:00
decolua
758224749d Feat : Add support for the new "alicode-intl" provider 2026-03-07 10:08:55 +07:00
mxskeen
97860a0629 fix: custom model compatibility with antigravity/mitm (PR #250) 2026-03-06 16:44:16 +07:00
decolua
d347de8092 feat: enhance translator functionality and UI 2026-03-06 16:26:33 +07:00
decolua
cd6962c7a2 feat: implement batch processing for README translation
- Introduce BATCH_SIZE configuration for parallel language translation
- Update translation logic to process languages in batches with a delay to avoid rate limits
- Enhance logging to display current batch being processed

Also, add a new TimeAgo component for auto-updating time display in UsageStats.
2026-03-06 12:18:30 +07:00
eachann
afb83f4563 feat: add runtime i18n with English, Vietnamese, and Simplified Chinese support
- Implement runtime i18n using MutationObserver for automatic DOM translation
- Add language switcher dropdown in dashboard header (EN/VI/ZH)
- Support 3 languages: English (default), Tiếng Việt, 简体中文
- Add translation files: vi.json (197 entries), zh-CN.json (513 entries, cleaned)
- Translate dashboard UI: sidebar menu, header, settings, MITM page
- Use cookie-based locale persistence with /api/locale endpoint
- Zero component changes required - translations applied at runtime
- Fix Header flicker on route change with key={pathname}

Co-authored-by: eachann <each1024@qq.com>
Based on PR #247 from decolua/9router with runtime approach

Made-with: Cursor
2026-03-06 10:57:42 +07:00
decolua
b7b4ac5592 Fix bug 2026-03-06 09:59:15 +07:00
decolua
75f486b7a2 Added profile ARN handling in OAuth provider mapping and improved polling logic in OAuth modal for better user experience. 2026-03-06 00:21:27 +07:00
decolua
f4e08fcd16 Fix : MITM 2026-03-05 21:13:09 +07:00
decolua
1c3ba6ef69 - Enhanced the description of how the MITM server operates with a clearer flow of information. 2026-03-05 14:59:40 +07:00
maskeen
85ddb4753c
fix: show API Key Compatible providers in Antigravity CLI Tools model selector (#241) 2026-03-05 14:47:22 +07:00
decolua
573b0f0241 - Refines the overall structure of the CLI tools and MITM server functionalities.
- Add buildQwenBaseUrl function to construct URLs for Qwen resources.
- Update buildProviderUrl to support Qwen model requests.
- Enhance token refresh logic to include provider-specific data for Qwen.
- Refactor CLI Tools page to exclude MITM tools and streamline model retrieval.
- Introduce new components for MITM server management.
- Update API routes to handle Qwen-specific resource URLs and improve error handling.
2026-03-05 11:25:03 +07:00
decolua
7195fee2f6 Refactor UsageChart and UsageStats components to support dynamic period selection 2026-03-03 16:19:44 +07:00
decolua
11b2fcd643 Fix Antigravity OAuth 2026-03-03 16:01:10 +07:00
decolua
f2306e6962 Fix MITM 2026-03-03 15:52:20 +07:00
decolua
07d4cdfa7e Fix : Claude OAuth 2026-03-03 14:46:05 +07:00
decolua
38ded5c62f feat(cli-tools): add OpenCode tool integration to CLI Tools page 2026-03-03 11:04:56 +07:00
decolua
03fc685f72 Add OpenCode CLI 2026-03-03 10:10:03 +07:00
decolua
bfd9614fa2 - Add new "Quota Tracker" item to the sidebar navigation. 2026-03-03 09:53:30 +07:00
Thiên Toán
4e92a66379
fix(auth): wire up dashboard auth guard as Next.js proxy (#227)
Dashboard routes were accessible without authentication because
dashboardGuard.js was not connected to Next.js middleware pipeline.

Created src/proxy.js to export the auth guard using Next.js 16
proxy convention. Now /dashboard routes properly redirect to
/login when auth_token cookie is missing or invalid.
2026-03-02 15:21:50 +07:00
Владимир Акимов
0c832c9c59
feat(gemini): convert OpenAI SSE to Gemini SSE format in /v1beta/models route (#225)
* fix(translator): filter nameless hosted tools when converting Responses API to Chat format

Codex CLI sends "hosted" tools (e.g. `request_user_input`) via the OpenAI
Responses API. These tools have no explicit `name` field. The previous
`body.tools.map()` pass propagated `name: undefined` into the resulting
Chat Completions function declarations, which then became anonymous
`functionDeclarations` after the OpenAI→Gemini translation step.

Gemini strictly requires every function declaration to have a valid name
and rejects the entire request with:

  GenerateContentRequest.tools[0].function_declarations[4].name:
  Invalid function name. Must start with a letter or an underscore.

Fix: filter out any Responses API tool that lacks a non-empty `name`
string before converting to `{ type: "function", function: { name, ... } }`.
Named function tools are unaffected; only unnamed hosted tools are skipped.

Fixes: Gemini 400 error when Codex CLI is routed through 9router.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(gemini): convert OpenAI SSE to Gemini SSE format in /v1beta/models route

The @google/genai SDK always uses :streamGenerateContent?alt=sse for chat
and expects Gemini SSE chunk format. The upstream handleChat returns OpenAI
SSE format, causing the SDK to crash on the [DONE] sentinel.

Changes:
- Add transformOpenAISSEToGeminiSSE() using TransformStream that converts
  each OpenAI SSE chunk (choices[0].delta) to Gemini SSE format
  (candidates[0].content.parts) on the fly
- Drop the OpenAI [DONE] sentinel (Gemini SSE ends by stream close)
- Map finish_reason -> finishReason, attach usageMetadata on final chunk
- Support reasoning_content -> thought: true parts for thinking models
- Refactor finishReasonMap to shared FINISH_REASON_MAP constant
- Fix streaming dispatch: stream=true now calls transformOpenAISSEToGeminiSSE
  instead of passing OpenAI SSE through raw

Fixes: SyntaxError: "[DONE]" is not valid JSON in Gemini CLI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-02 09:36:08 +07:00
decolua
4903a9b2cb Feat : console log 2026-03-02 09:31:16 +07:00
decolua
50990e84b4 Fix AG MITM 2026-03-01 18:40:55 +07:00
decolua
a7365c5a4e Fix : Codex on cursor 2026-03-01 15:35:41 +07:00
decolua
a84477e815 chore: update version and enhance dashboard components
- Add a warning message for Windows users in AntigravityToolCard to run the terminal as Administrator for MITM functionality.
- Refactor model testing logic in ProviderDetailPage to improve state management and user experience.
- Introduce new version notification in Sidebar for available updates.
2026-02-28 16:33:18 +07:00
decolua
2f4b813c5b feat(usage): implement timeout and error handling for antigravity usage and subscription requests
- Add a 10-second timeout for fetch requests in getAntigravityUsage and getAntigravitySubscriptionInfo functions.
- Include error logging for fetch failures in both functions.
- Update headers to include "x-request-source" for MITM bypass.
- Enhance proxyFetch with DNS resolution and MITM bypass capabilities.
- Ensure proxyFetch is loaded in the API route for proper fetch patching.
2026-02-28 12:12:49 +07:00
decolua
04ba66bc1e chore: Refactor CursorAuthModal to handle manual instructions for Windows users. 2026-02-28 12:12:49 +07:00
Thiên Toán
d1ce98ca8a
feat: add API key visibility toggle in Endpoint dashboard (#214)
- Added eye icon button to show/hide individual API keys
- Keys hidden by default on page load for security
- Copy button always copies full key regardless of visibility state
- Implemented per-key visibility state with React useState
- Added maskKey helper to display first 8 characters + "..."
- Clean up visibility state when keys are deleted

Improves security and UX when managing API keys in the dashboard.
2026-02-28 11:07:51 +07:00