Commit graph

551 commits

Author SHA1 Message Date
decolua
bee8dad946 feat(db): migrate from lowdb to SQLite with repos pattern
- Add modular DB layer (adapters, migrations, repos, helpers)
- Replace localDb/usageDb/requestDetailsDb monoliths with repos
- Add Tailscale tunnel integration & status check API
- Add /api/cli-tools/all-statuses aggregated endpoint
- Add settingsStore (Zustand) and mitm/dbReader
- Add DB unit tests (benchmark, concurrent, migration, vs-lowdb)
2026-05-09 17:48:20 +07:00
decolua
145f588cc0 feat: Added McpMarketplaceModal to the CoworkToolCard for improved plugin management. 2026-05-09 10:15:38 +07:00
Tran Long
c734913b3f
Update DeepSeek model pricing and add V4 Pro (#938)
Update all DeepSeek model prices to match current V4 Flash pricing
($0.14/$0.28 per 1M input/output tokens), and add V4 Pro model with
its own pricing ($0.435/$0.87). Also add deepseek-v4-pro to the
provider model list.

Co-authored-by: smarthomeblack <truongbber@gmail.com>
2026-05-09 10:11:39 +07:00
Aqil Aziz
62a42851f4
fix: prevent cached settings responses (#951) 2026-05-09 10:08:17 +07:00
R3D347HR4Y
b9c61804d4
Add captain-definition for easy deployment on Caprover (#954)
With this single file, it becomes very easy to deploy this service on a caprover instance
All that needs to be done to do so on the caprover dashboard is:
- Create a new app with persistance
- Set these envs:
PORT=20128
HOSTNAME=0.0.0.0
NEXT_PUBLIC_BASE_URL=https://your-domain-here.com
DATA_DIR=/app/data
- Add a persistent directory with /app/data
- Set CONTAINER HTTP PORT to 20128, enable HTTPS and websockets
- Go in deployment -> Method 3 -> Set the git url to this repo on branch main and add your github email and a PAT
- Save and force build
2026-05-09 10:07:47 +07:00
Aqil Aziz
0f0c7ede46
fix: normalize Ollama Local provider input (#955) 2026-05-09 10:05:22 +07:00
Aqil Aziz
9080336c5d
docs: fix localized README links (#956) 2026-05-09 10:04:42 +07:00
isagoakira
f67ae26765
docs: add Chinese translation of README (#957) 2026-05-09 10:04:18 +07:00
tarun
ee00f82a50
Refactor connection proxy configuration logic (#970) 2026-05-09 09:58:52 +07:00
Aleksei
787d248030
Add Cloudflare Workers AI image generation (#973) 2026-05-09 09:53:39 +07:00
decolua
dd15d162fc Update changelog 2026-05-07 23:15:48 +07:00
decolua
ad661c1286 feat: enhance CommandCode integration with improved message handling 2026-05-07 23:02:07 +07:00
decolua
b72a443bd3 feat: add CommandCode provider support 2026-05-07 23:01:33 +07:00
decolua
ca84e988c0 Update changelog 2026-05-07 16:48:33 +07:00
decolua
0d61a1d546 feat: add OllamaLocalExecutor and update provider handling
- Introduced OllamaLocalExecutor to handle requests for the "ollama-local" provider.
- Removed the direct URL construction for "ollama-local" from BaseExecutor.
- Updated index.js to include the new OllamaLocalExecutor in the executors mapping.
- Enhanced the ProvidersPage component to support dynamic addition of OpenAI/Anthropic compatible providers.
2026-05-07 16:42:36 +07:00
Arden Hermawan
050e56f20b
Fix compatible provider API key setup (#925) 2026-05-07 16:17:03 +07:00
Tuan-TC
f77f90a828
fix(usage): filter totalRequests by selected time period (#857)
The totalRequests on dashboard/usage overview always showed lifetime total
instead of respecting the selected period (24h/7d/30d/60d). Now calculated
from period-filtered data like other stats.

Co-authored-by: Tuan-TC <tuan-tc@users.noreply.github.com>
2026-05-07 16:11:34 +07:00
Fajar Hidayat
0667a26b5a
feat: add model deselection functionality in ComboFormModal and ComboDetailPage (#889)
- Implemented handleDeselectModel function to allow users to deselect models in both ComboFormModal and ComboDetailPage.
- Updated ModelSelectModal to handle deselection and visually indicate selected models.
- Enhanced user experience by allowing models to be removed from the selection without closing the modal.
2026-05-07 15:55:43 +07:00
Muhammad Mugni Hadi
7f93df3a92
feat: add audio input support for Gemini translation (#913)
Add input_audio and audio_url content type handlers to
convertOpenAIContentToParts() in geminiHelper.js, converting
OpenAI audio format to Gemini inlineData format.

Also add audio types to VALID_OPENAI_CONTENT_TYPES in
openaiHelper.js so they are not stripped by filterToOpenAIFormat().

Fixes #912
2026-05-07 15:51:30 +07:00
0x01001
25182ff772
feat: add support for configurable tunnel transport protocols (#919)
- Introduced DEFAULT_QUICK_TUNNEL_PROTOCOL and QUICK_TUNNEL_PROTOCOLS to allow users to specify the transport protocol for quick tunnels.
- Updated spawnQuickTunnel function to utilize the specified protocol from environment variables, defaulting to HTTP/2 if not provided.
- Enhanced the child process environment to include the selected tunnel transport protocol.
2026-05-07 15:50:36 +07:00
Jaime Botero
0d182018ab
fix: resolve Kiro IDE MITM handler bugs for AWS CodeWhisperer translation (#921)
- Request translation: add codeWhispererToMessages() to convert CodeWhisperer conversationState to OpenAI messages array
- Response format: replace pipeSSE() with pipeOpenAIasEventStream() to return AWS EventStream binary frames instead of SSE text
- Protocol headers: add required Smithy system headers (:message-type, :event-type, :content-type) to every EventStream frame
- Tool support: add extractTools() to convert CodeWhisperer toolSpecification to OpenAI tool format
- Tool arguments: add safeArgsString() to prevent '[object Object]' corruption during SSE accumulation
- Multi-turn context: add convertAssistantResponseMessage() and convertUserInputMessage() to preserve toolUses and toolResults in history
- Tool dispatch: send toolUseEvent.input as raw JSON string instead of parsed object to match Kiro's internal JSON.parse() expectation
2026-05-07 15:49:51 +07:00
decolua
5c62e73cc6 - Cowork: ComboFormModal
- BaseUrlSelect: add cloud endpoint option, custom URL local state, always
  default to first option; new cliEndpointMatch helper; CLI tool cards refactor
- API: new /v1/audio/voices and /v1/models/info; /v1/models filters disabled
  models, drop unused timestamp
- initializeApp: guard tunnel/tailscale auto-resume to once-per-process
- geminiHelper: ensureObjectType for schemas with properties but no type
- skills: minor SKILL.md tweaks (chat/embeddings/image/stt/tts/web-*)
2026-05-07 15:45:09 +07:00
decolua
6344abcf8d Refactor CLI tool cards to use BaseUrlSelect component and pass additional tunnel and Tailscale configuration 2026-05-05 20:22:21 +07:00
decolua
1c8314252b Update Changelog 2026-05-05 10:36:38 +07:00
decolua
d4bc42e1f5 feat: add STT support, Gemini TTS, and expand usage tracking
- Speech-to-Text: full pipeline with sttCore handler, /v1/audio/transcriptions
  endpoint, sttConfig for OpenAI, Gemini, Groq, Deepgram, AssemblyAI,
  HuggingFace, NVIDIA Parakeet; new 9router-stt skill
- Gemini TTS: add gemini provider with 30 prebuilt voices and TTS_PROVIDER_CONFIG
- Usage: implement GLM (intl/cn) and MiniMax (intl/cn) quota fetchers; refactor
  Gemini CLI usage to use retrieveUserQuota with per-model buckets
- Disabled models: lowdb-backed disabledModelsDb + /api/models/disabled route
- Header search: reusable Zustand store (headerSearchStore) wired into Header
- CLI tools: add Claude Cowork tool card and cowork-settings API
- Providers: introduce mediaPriority sorting in getProvidersByKind, add
  Kimi K2.6, reorder hermes, drop qwen STT kind
- UI: expand media-providers/[kind]/[id] page (+314), enhance OAuthModal,
  ModelSelectModal, ProviderTopology, ProxyPools, ProviderLimits
- Assets: refresh provider PNGs (alicode, byteplus, cloudflare-ai, nvidia,
  ollama, vertex, volcengine-ark) and add aws-polly, fal-ai, jina-ai, recraft,
  runwayml, stability-ai, topaz, black-forest-labs
2026-05-05 10:32:59 +07:00
decolua
bfb7d42164 Fix Bug 2026-05-04 11:35:32 +07:00
decolua
1aedf5cfc0 update changelog 2026-05-04 11:30:40 +07:00
decolua
9c6be62a54 Feat : Skills 2026-05-04 11:29:02 +07:00
decolua
f08fa5f78d Fix input fields in tool cards 2026-05-03 22:24:57 +07:00
decolua
a7a4e851a7 Update ChangeLog 2026-05-03 22:13:17 +07:00
decolua
4ba546afe7 Enhance token refresh logic and improve MITM server handling
- Introduced a caching mechanism for in-flight token refresh requests to prevent race conditions and reduce unnecessary API calls.
- Added error handling for unrecoverable refresh errors, ensuring that the application can gracefully handle token reuse and invalidation scenarios.
- Updated the MITM server management to handle port 443 conflicts, allowing users to kill processes occupying the port before starting the server.
- Improved user feedback in the MitmServerCard component regarding port conflicts and admin privileges.
- Refactored the ComboList component to streamline the display of media provider combos.

This update aims to enhance the reliability and user experience of the token management and MITM functionalities.
2026-05-03 22:10:03 +07:00
decolua
b8e3a46add Update version 2026-05-03 18:06:39 +07:00
decolua
a3a0cc8379 Update changelog 2026-05-03 18:06:24 +07:00
decolua
6cdf40b44e Refactor global styles and enhance MITM functionality
- Updated global CSS to implement a new brand color palette and improve light/dark theme consistency.
- Enhanced the MitmServerCard component to provide clearer user feedback regarding admin privileges.
- Filtered LLM combos in the CombosPage to ensure only relevant data is displayed.
- Improved APIPageClient layout for better usability and visual consistency.
- Added functionality to save and load DNS tool states in the MITM manager.
- Updated OAuth configuration URLs for Qwen to reflect the new endpoint structure.
- Refined tunnel management logic to improve reliability and user experience.
2026-05-03 18:00:35 +07:00
decolua
1686adc704 Update ReadMe 2026-05-03 15:56:26 +07:00
decolua
f1bb5bd67e Squashed commit of the following:
commit 8b2ab7c9e05689c1bf55002cc79db8d22a398c75
Author: kundeng <kundeng@live.com>
Date:   Mon Apr 20 11:26:58 2026 -0400

    fix: send providerSpecificData in Edit modal validate calls

    The Check button in the Edit modal was sending only apiKey without the
    Azure endpoint/deployment/org, causing validation to fail.

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

commit c894fa838d035ecd9a160339342371042697c327
Author: kundeng <kundeng@live.com>
Date:   Mon Apr 20 01:45:13 2026 -0400

    fix: persist Azure providerSpecificData and add connection test

    - Read body.providerSpecificData in POST /api/providers so Azure fields
      (endpoint, deployment, apiVersion, organization) are actually stored
    - Add azure case to testApiKeyConnection so the Test button works
      correctly instead of falling through to "not supported"

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

commit 00bd1a4151f4e73616969e25d1786c87d1ec0d5e
Author: kundeng <kundeng@live.com>
Date:   Mon Apr 20 01:24:39 2026 -0400

    fix: add Azure validation and make Organization required

    - Add Azure case to /api/providers/validate that sends a test chat
      completion with api-key header and organization
    - Pass Azure-specific data (endpoint, deployment, apiVersion, org) from
      Add modal to validate endpoint
    - Make Organization field required (needed for billing)

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

commit a66a04daab69b07baa4cc6b28772249e4b25ea19
Author: kundeng <kundeng@live.com>
Date:   Mon Apr 20 01:15:53 2026 -0400

    fix: add Azure config fields to Add API Key modal

    The Add modal was missing the Azure-specific fields (endpoint, deployment,
    API version, organization) — only the Edit modal had them.

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

commit 6ac3f4a97af8468d210594495ce754f5d7a7978a
Author: kundeng <kundeng@live.com>
Date:   Mon Apr 20 01:06:45 2026 -0400

    feat: add Azure OpenAI as a dedicated provider

    Azure OpenAI uses a different URL scheme (deployments-based) and api-key
    header auth instead of Bearer tokens. This adds a dedicated AzureExecutor
    that constructs the correct URL and headers, plus dashboard UI fields for
    endpoint, deployment, API version, and organization.

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-03 15:35:34 +07:00
dmdfami
8f2e6685a6 feat(cli-tools): add browser-local endpoint presets (#819)
Add reusable EndpointPresetControl for CLI tool Base URL/API key
presets, stored in browser localStorage. Wire into Claude, Codex,
OpenCode, Droid, OpenClaw, Hermes, and Copilot cards. Allow
selecting preset API keys not in dashboard keys list.

Thanks @dmdfami for the contribution!

Co-authored-by: dmdfami <dmdfami@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-03 15:35:34 +07:00
kenlin
f7e85e3e06
fix(v1/models): include alias-backed models in listing (#730)
Ensure /v1/models includes provider models added through alias mappings so compatible provider entries like huoshan/kimi-k2.6 are discoverable by clients.

Made-with: Cursor

Co-authored-by: Ken Lin <kenlin1988@foxmail.com>
2026-05-03 15:22:05 +07:00
Anurag Saxena
8bdaeedb28
fix: strip stream_options for qwen non-streaming Claude Code requests (closes #557) (#663) 2026-05-03 15:21:43 +07:00
Anurag Saxena
67ca219fbf
fix: update Qwen OAuth URLs from chat.qwen.ai to qwen.ai (closes #574) (#687) 2026-05-03 15:18:45 +07:00
Anurag Saxena
e39801de71
fix: improve cloudflared exit code error messages for better debugging (closes #423) (#659) 2026-05-03 15:18:27 +07:00
Anurag Saxena
e1c092c297
fix: redirect ~/.9router to DATA_DIR in Docker to persist usage data across updates (closes #585) (#658) 2026-05-03 15:18:06 +07:00
zerray
52ad3b6630
fix: prevent SSE listener leak in console-logs stream (#751)
The ReadableStream cancel() callback is not reliably invoked on client
disconnect under Next.js, causing emitter listeners (line/clear) and the
keepalive interval to accumulate, eventually triggering
MaxListenersExceededWarning.

Use request.signal as the primary disconnect trigger, with cancel() and
enqueue failures as fallbacks. Cleanup is idempotent via state.closed.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 15:11:47 +07:00
辰ing
bb260a8c65
i18n: improve zh-CN translations (#755) 2026-05-03 15:10:43 +07:00
Rezky Hamid
e40f7ffb98
fix(mitm): gate sudo prompts on server platform (#822) 2026-05-03 15:00:43 +07:00
Rezky Hamid
a463ee00ff
feat(codex): add review model quota support (#836) 2026-05-03 14:57:33 +07:00
Zhen
14ff538f2e
Improve mobile layouts and restore Cloudflare provider (#840)
Co-authored-by: Delynn Assistant <zhen@dkzhen.org>
2026-05-03 14:55:43 +07:00
decolua
ef3abeacf1 Update ChangeLog 2026-05-01 17:06:27 +07:00
decolua
f410061e70 Refactor proxyFetch and enhance MediaProviderDetailPage layout
- Removed the isCloud check from proxyFetch.js, simplifying the fetch patching logic.
- Updated MediaProviderDetailPage to include a new section for API key retrieval, improving user experience with clearer layout and additional notice text.
- Enhanced ConnectionRow to better handle email display names.
- Improved ProviderDetailPage to conditionally render provider notices and API key links.
- Refactored localDb, requestDetailsDb, and usageDb to remove unnecessary isCloud checks, streamlining database interactions.
- Updated OAuthModal to combine waiting and manual input steps for a more cohesive user flow.
- Added API key URLs to several providers in providers.js for better accessibility.
2026-05-01 17:03:13 +07:00
decolua
f8d2a9ff76 Merge branch 'master' of https://github.com/decolua/9router 2026-05-01 16:37:11 +07:00