Commit Graph
176 Commits
Author SHA1 Message Date
nezumiandCopilot fbbc435bfd merge: sync master into dev
Sync master into dev while preserving dev-specific feature logic and include the required co-author trailer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-23 11:52:27 +07:00
nezumi 06d6873d52 fix: update the logic for add model from admin side 2026-07-21 17:17:14 +07:00
nezumi 188d5f87b4 feat: integration the github action for deployment 2026-07-21 15:10:57 +07:00
nezumi 580bf9d9ae fix: logic reset quota by session 2026-07-20 16:18:00 +07:00
long2ice 6994cd1f70 fix(cursor): HTTP/2 AgentService support + version bump to 3.12.17
Real Cursor IDE now uses AgentService at agent.api5.cursor.sh (HTTP/2-only)
while 9router still spoke the retired ChatService at api2.cursor.sh with
outdated headers, producing HTTP 429 "Update Required". Add an executeAgent
path that builds an agent.v1.RunRequest Connect RPC over a raw http2 stream
and fetches the account-specific usable model catalog via GetUsableModels.

Also implement MCP tool calling over AgentService: encode OpenAI tools as
AgentRunRequest.mcp_tools (McpToolDefinition with google.protobuf.Value
input_schema), decode McpArgs tool calls, and forward them to the client as
OpenAI tool_calls so the client runs the tool and resumes in the next turn.
Reply to request_context_args with a non-empty RequestContext, to server
heartbeats with client_heartbeat, and to KV blob get/set with empty results,
so action queries no longer stall the stream. Fold the client system prompt
into the user message (custom_system_prompt makes the server return an empty
turn). Bump clientVersion to 3.12.17 and add the x-cursor-client-commit
header so the gateway identifies as a current Cursor IDE release.
2026-07-20 15:39:55 +07:00
Edison42 cef5dd4d61 fix(kiro): map GPT-5.6 reasoning effort fields
Route GPT-5.6 reasoning effort through Kiro's native reasoning.effort field instead of the legacy Claude output_config.effort path. GPT-5.6 models now emit reasoning.effort for low/medium/high/xhigh, with max mapped to the xhigh wire value.

Preserve the Responses API reasoning.effort through the OpenAI intermediate by copying it to reasoning_effort before the field is dropped. Skip legacy thinking_mode prompt tags when a supported native GPT effort is emitted, while keeping the legacy fallback for unsupported values (auto/minimal/ultra) and explicit disable semantics (none/off/disabled). Claude adaptive effort continues to use thinking plus output_config.effort.
2026-07-20 11:11:37 +07:00
Edison42 7c7fae3955 fix(kiro): validate terminal streams before emitting output
Validate AWS EventStream framing, header bounds, CRCs, error frames,
and terminal stop metadata before exposing Kiro output. Classify stop
reasons into dispositions (complete / retryable / terminal_incomplete /
refusal) and retry once when the stream ends with a malformed tool call,
ellipsis-only output, or a short future-action sentence.

Fail closed: propagate streaming failures as error SSE (502) instead of
collapsing them into a successful stop, so incomplete responses no longer
leak as final answers.

Detect the observed evidence-prefixed trailing progress final without
broadening the Chinese heuristic to completed findings.
2026-07-20 10:55:33 +07:00
nezumi cb0807fe74 fix: update the logic to update thinking in cli tools page 2026-07-20 10:14:02 +07:00
nezumi 5329a4bd67 feat: allow choose multiple models for some cli tools 2026-07-19 22:16:57 +07:00
nezumi c9d17d3586 fix: update the save configuration of the cli tools 2026-07-19 20:56:53 +07:00
nezumi 16eabec743 fix: remove the suggest model in provider page 2026-07-19 20:09:43 +07:00
nezumi 62975ab15b fix: update the logic for remove model in provider 2026-07-19 18:32:14 +07:00
decoluaandClaude Fable 5 55628eea02 fix(alicode-intl): split into Coding Plan + Model Studio providers
8b9cac1 swapped alicode-intl to the DashScope compatible-mode endpoint to
fix #2591 for standard DashScope keys, but that broke Coding Plan keys
(sk-sp-...) which only work on coding-intl.dashscope.aliyuncs.com. The two
key types use two different hosts and are not interchangeable.

- alicode-intl: revert to coding-intl endpoint (Coding Plan keys)
- alims-intl: new provider for dashscope-intl/compatible-mode (standard keys)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 16:29:55 +07:00
Edison42 eb00222c4f fix(kiro): map GPT reasoning effort fields
GPT-5.6 via Kiro needs reasoning.effort while Claude uses output_config.effort.
Resolve the effort path per-model schema (like Kiro CLI/KAS) so GPT-5.6
receives the correct structured thinking level. Claude path unchanged.

- Add resolveKiroEffortPath returning "reasoning" | "output_config" | null
- buildKiroAdditionalModelRequestFields emits schema-specific shape
- Keep prompt tags for backward compatibility
- Add OpenAI/Claude translator coverage for GPT-5.6 effort mapping
2026-07-19 13:53:30 +07:00
rixzkiye e0ba667450 feat(cli-tools): configure Grok Build subagent models
Add separate model selectors for Grok Build main, general-purpose,
explore, and plan agents. Each override gets an independent 9Router
custom-model slot and context_window derived from 9Router model
capabilities. Preserve and restore pre-existing config on reset.
2026-07-19 13:35:38 +07:00
nezumi 6bb03d85f7 feat: remove tunnel and tailscale feature 2026-07-18 19:46:52 +07:00
nezumi 21532e0f00 fix: improve the UI for set the limit token for the user 2026-07-18 16:03:34 +07:00
nezumi 8f6e57dfc6 fix: update the quota tracker for user role 2026-07-18 13:23:02 +07:00
nezumi c77127aaf3 fix: improve the UI for check quota of the user 2026-07-17 22:24:11 +07:00
nezumi b700a070c0 feat: limit quota for user 2026-07-17 18:08:50 +07:00
nezumi 2e595627d0 feat: implement the feature for checking quota of orbit provider 2026-07-17 16:43:15 +07:00
nezumi 7ff4ebeed1 feat: add orbit provider 2026-07-17 16:17:50 +07:00
decoluaandCursor 68566f53dc feat(kimi): merge OAuth into dual-auth provider, add K3/K2.7 models
Gộp kimi-coding vào kimi (oauth+apikey), parity CLIProxyAPI device flow/headers/refresh.
Thêm K3 + K2.7 Code (+ Kimi Code ids), pricing/caps vision, cập nhật baseline.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 12:09:14 +07:00
nezumi 0b7bd09646 Merge branch 'master' into dev
# Conflicts:
#	src/app/(dashboard)/dashboard/cli-tools/[toolId]/ToolDetailClient.js
#	src/app/(dashboard)/dashboard/cli-tools/components/index.js
#	src/app/(dashboard)/dashboard/providers/[id]/AddApiKeyModal.js
#	src/app/api/cli-tools/all-statuses/route.js
#	src/app/api/settings/route.js
#	src/app/api/v1/models/route.js
#	src/shared/constants/cliTools.js
2026-07-17 11:15:18 +07:00
asynx6 de680e789f fix(providers): bulk-add API keys no longer overwrite existing keys
Bulk-add named auto-generated keys by paste-line index, blind to existing
connection names. The backend upserts apikey connections by exact name
(connectionsRepo), so a colliding generated name silently replaced an
existing key instead of inserting a new one.

Add a collision-aware planner (src/shared/utils/bulkAdd.js) that gap-fills
the smallest free "<base> <n>" against both existing connection names and
names assigned earlier in the same batch, so a generated name is never
reused and the backend always inserts. Applies to auto-named lines, custom
name|apiKey lines, and Cloudflare name|apiKey|accountId lines.

Wire the planner into AddApiKeyModal and pass existing connection names
from the provider detail page. Add unit tests covering gap-fill, custom
names, Cloudflare 3-part format, and robustness.
2026-07-16 17:20:10 +07:00
nezumi 448a8aedc7 feat: add the feature for user save combo 2026-07-16 16:52:37 +07:00
Ella CEO 8b9cac180e fix(alicode-intl): use DashScope compatible-mode endpoint so standard keys work
Switch baseUrl from coding-intl.dashscope.aliyuncs.com (Coding Plan keys
only) to dashscope-intl.aliyuncs.com/compatible-mode so ordinary DashScope
API keys authenticate. Path /v1/chat/completions and preserveCacheControl
quirk unchanged.

Fixes #2591
2026-07-16 15:56:19 +07:00
ryanngit 59b7828237 fix(grok-cli): align Grok Build with current subscription protocol (#2590) 2026-07-16 15:33:19 +07:00
ann d6761c6fb0 feat(xai): add Grok Imagine video generation (/v1/videos) + CLI
Async video job proxy mirroring the existing image-generation layer split:
Next routes → src/sse/handlers/videoGeneration.js (auth gate, account
fallback loop, refresh persistence) → open-sse/handlers/videoCore.js
(transparent upstream proxy, 401 refresh-once/retry-once, secret sanitization).

- POST /v1/videos/{generations,edits,extensions}: byte-exact body forward
  (JSON + multipart), request_id passthrough, Idempotency-Key forwarded
- GET /v1/videos/{request_id}: status/progress/video.url passthrough
- Register grok-imagine-video (kind: "video"); add "video" to MODEL_TYPE_TO_KIND
  so video models stay out of chat lists (also fixes runwayml leak)
- 9router xai video CLI: submit → poll → atomic MP4 download
- No auto-retry of creation POSTs (billable jobs); rotate accounts only on
  401/403/429; sanitize Bearer tokens + credential values from errors/logs

Closes #1285
2026-07-16 15:29:52 +07:00
Edison42 9c58ba645e fix(kiro): improve direct session cache reuse
Reshape Kiro direct requests so resumed client sessions reuse Kiro's
cache-affinity fields instead of starting unrelated CodeWhisperer
conversations.

- keep conversationState.conversationId stable when the client sends an
  explicit session id (x-session-id, session_id, conversation_id, Claude
  Code session metadata)
- add a stable conversationState.agentContinuationId per Kiro session
- send conversationState.agentTaskType: "vibe" and agentMode: "vibe",
  matching the normal Kiro CLI/KAS chat path
- move Kiro thinking instructions into Kiro-compatible systemPrompt /
  additionalModelRequestFields instead of generic top-level thinking
- keep volatile timestamp context out of the top-level systemPrompt; it
  remains only in user content fallback
- suppress additionalModelRequestFields for legacy 4.5-era Claude/Kiro
  models that reject it, while defaulting future Claude/Kiro model ids
  to supported
- preserve Kiro meteringEvent credit usage internally for accounting
  without leaking provider-specific fields into OpenAI-compatible usage
- prevent unrelated headerless Kiro requests from sharing one
  connection-wide continuation
- cap/evict continuation sessions so long-running processes do not grow
  the continuation map unbounded
- treat generated headerless Kiro sessions as one-shot so they do not
  evict real explicit-session continuations
- keep credit-only Kiro metering valid for internal persistence when
  token metrics are unavailable
2026-07-16 15:15:05 +07:00
nezumi e3cf2e7708 fix: update the permission for viewing models 2026-07-16 15:07:32 +07:00
Edison42 b94685b80d feat(kiro): add GPT-5.6 model family (#2596)
Add GPT-5.6 Sol/Terra/Luna and their synthetic thinking/agentic/
thinking-agentic variants to the Kiro static catalog with the observed
272k context window and credit multipliers (2.4/1.2/0.6), register MITM
mapping slots for the new base ids, and override runtime capabilities so
the GPT-5.6 family reports the 272k window instead of the generic GPT-5
profile.
2026-07-16 14:38:08 +07:00
hungtrinh 27b37705b3 perf(startup): skip inactive background services 2026-07-16 12:09:48 +07:00
Ella CEO 7dfb346667 fix(grok-cli): surface expiresAt so proactive token refresh fires (#2546) 2026-07-16 12:00:14 +07:00
decolua a6a41dfb3c Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	.gitignore
#	open-sse/handlers/chatCore.js
2026-07-16 11:59:46 +07:00
joachimBrindeau c9926897ba feat(rtk): add X-9Router-Token-Saver header to bypass token savers per request 2026-07-16 11:27:42 +07:00
nezumi 5c8d9f80b0 fix: update the permission for viewing provider pages 2026-07-15 17:56:14 +07:00
nezumi 76a82bcfc9 fix: update the logic code for combos pages 2026-07-14 17:09:56 +07:00
nezumi 330eb4d936 fix: update cli tools 2026-07-12 22:44:11 +07:00
nezumi 43a0c90dac fix: update the permission for request api key 2026-07-12 21:08:14 +07:00
nezumi 69927775ed fix: import the behavior of the web 2026-07-12 20:28:25 +07:00
nezumi 268e2ac21f fix: cli tool page to update the config correctly 2026-07-12 18:16:52 +07:00
nezumi be7c210161 fix: update the permission for token saver page 2026-07-12 17:24:33 +07:00
nezumi 2427852593 fix: update the permission access for combo page 2026-07-12 16:54:40 +07:00
nezumi 4a97d1c14f fix: update the logic for disable model by alias 2026-07-12 11:33:15 +07:00
nezumi 8d731d84fb fix: improve the behavior for the web app 2026-07-11 20:30:05 +07:00
nezumi 71b0bfb6d8 feat: add models page for the web application 2026-07-11 19:33:00 +07:00
nezumi e1232ed1bd fix: update the tracking usage filter for the usage page 2026-07-11 18:36:55 +07:00
nezumi 40606ce39f feat: update the permission for showing the usage of the user 2026-07-11 17:24:27 +07:00
nezumi 1e8204ebab feat: update the permission for view combos page 2026-07-11 16:45:29 +07:00