Commit graph

148 commits

Author SHA1 Message Date
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
gen
5a015e5b4d feat(proxy): add outbound HTTP proxy support for OAuth + provider requests
- Patch Node fetch via undici ProxyAgent when HTTP_PROXY/HTTPS_PROXY/ALL_PROXY is set
- Ensure proxy patch is loaded for both chat pipeline and OAuth token exchange
- Add Dashboard Settings → Network to edit outbound proxy and apply immediately
- Persist outbound proxy settings in local db and initialize on server startup
- Move proxy helpers to src/lib/network/ for better structure
- Rename src/proxy.js → src/dashboardGuard.js to avoid naming confusion
- Re-apply proxy env after DB import
- Fix: close old dispatcher on proxy URL change to prevent connection pool leak
- Fix: idempotency guard to avoid patching globalThis.fetch multiple times

Made-with: Cursor
2026-02-28 10:11:53 +07:00
decolua
833069caac Fix MITM on window 2026-02-28 10:04:57 +07:00
decolua
5954b8f4eb - Refactor chatCore.js to streamline imports and remove unused functions.
- Fix streaming /v1/responses
2026-02-27 11:15:12 +07:00
decolua
25c2ad7360 feat: implement model lock functionality for connection management 2026-02-27 10:29:11 +07:00
BiuBiuHu
6e6ea7d97f feat: add Aliyun Bailian (alicode) provider support
- Add alicode provider with OpenAI-compatible API endpoint
- Support 8 models via Aliyun Bailian Coding Plan
- Add API key validation and connection testing
- Use getDefaultModel() instead of hardcoded model names

Co-authored-by: decolua <decoluadt@example.com>
Made-with: Cursor
2026-02-27 09:34:16 +07:00
decolua
0e285a9ed3 Merge branch 'pr-203' 2026-02-27 09:33:14 +07:00
decolua
9ae5487bc7 Fix antigravity 2026-02-27 09:17:49 +07:00
BiuBiu_Hu
d14c18f77f refactor: rename provider to alicode (Aliyun Coding)
Rename alicloud to alicode to clearly indicate Aliyun's Coding Plan service.

- Provider ID: alicode (short for Aliyun Coding)
- Model format: alicode/qwen3.5-plus
- Simplified mapping - no more bidirectional aliases

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 08:05:05 +08:00
BiuBiu_Hu
b0ec81f4a5 feat: add Alibaba Cloud Coding Plan support
Add support for Alibaba Cloud Bailian Coding Plan, a coding-focused AI service
that provides fixed monthly pricing for multiple models.

Changes:
- Add alicloud provider with OpenAI-compatible API endpoint
- Support 8 models: qwen3.5-plus, kimi-k2.5, glm-5, MiniMax-M2.5,
  qwen3-max, qwen3-coder-next, qwen3-coder-plus, glm-4.7
- Use "ali" as provider alias (ali/model format)
- Add API key validation and connection testing
- Add frontend provider definition with "ALi" text icon

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 07:58:40 +08:00
decolua
9003675b71 - Updated CLI tool components to accept initial status as a prop, improving state management for tool statuses.
- Added functionality to fetch and set statuses for various CLI tools (Claude, Codex, Droid, OpenClaw, Antigravity) on component mount.
- Enhanced error handling and logging in the OAuth provider test utilities and DNS management functions.
- Improved the MITM server to handle multiple target hosts and provide clearer error messages regarding port usage.
2026-02-25 16:32:05 +07:00
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
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
0baa299722 feat :
- Added tunnel
- Removed cloud feature
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