Commit graph

292 commits

Author SHA1 Message Date
musistudio
586dd0242f Expose browser account fetch helper to runtime plugins 2026-08-18 15:39:03 +08:00
musistudio
4344a2d6a7 Refactor routing configuration and improve provider support 2026-08-18 11:45:39 +08:00
musistudio
22b68fd907 Qualify target model selectors with routed provider 2026-08-15 23:47:32 +08:00
musistudio
83e01c3077 Sanitize target model header while preserving Unicode body 2026-08-15 23:16:15 +08:00
musistudio
f2860e165a Release 3.0.21 2026-08-14 17:51:29 +08:00
musistudio
d33cab9242 Update ai-gateway dependency to 1.0.17 2026-08-14 17:31:50 +08:00
musistudio
0fd9ea8f8b Add provider model refresh control 2026-08-14 16:24:25 +08:00
musistudio
9607c5f0a3 Improve provider account card layouts and meter visibility 2026-08-14 14:19:33 +08:00
musistudio
e4072137d4 Increase route script source size limit to 5 MiB 2026-08-14 11:44:33 +08:00
musistudio
48956f98cd Ensure request log tests close stores and cover row limit 2026-08-14 11:28:48 +08:00
musistudio
0104474e95 Merge branch 'main' into dev/3.1
# Conflicts:
#	packages/core/test/integration/observability/request-log-store.test.mjs
2026-08-14 11:17:06 +08:00
musi
34da9b6a70
Merge pull request #1657 from pacocartones/fix/request-log-store-test-teardown
test(core): close request log stores before temp cleanup
2026-08-14 09:20:44 +08:00
jesieleo
16f0868f40 fix(ui): 修复紧凑账户余额卡片裁切 2026-08-13 19:32:03 +08:00
pacocartones
2eb05b0e47 test(core): close request log stores before cleanup 2026-08-11 18:56:38 +02:00
musistudio
2a7aa9286b Update router configuration and provider handling 2026-08-11 16:15:53 +08:00
musistudio
3cb188c064 Report bounded agent analysis and handle missing session details 2026-08-11 15:00:59 +08:00
musi
56d7b37c64 Support multiple WorkBuddy models and generic app paths 2026-08-11 12:36:44 +08:00
musistudio
8fb38278f5 Merge branch 'main' of github.com:musistudio/claude-code-router into dev/3.1 2026-08-11 10:56:16 +08:00
musistudio
e38f9bc2dd Refactor router configuration and request handling 2026-08-11 10:53:45 +08:00
musistudio
28f0a2f2b9 Merge remote-tracking branch 'origin/dev/3.1' into dev/3.1
# Conflicts:
#	packages/core/src/profiles/service.ts
#	packages/ui/src/pages/home/components/profiles.tsx
#	packages/ui/src/pages/home/shared/profiles.ts
2026-08-11 10:05:44 +08:00
musistudio
551fc0e8ef Reuse healthy external gateways and decode Claude App routes 2026-08-11 10:00:33 +08:00
musi
c8e5e2b53d Add WorkBuddy app integration 2026-08-11 09:25:53 +08:00
musistudio
e8db9406a7 Add automatic provider model refresh and dialog Escape handling 2026-08-10 15:40:48 +08:00
musi
186fa619d2
Merge pull request #1640 from pacocartones/fix/raw-trace-directory-fsync-eperm-windows
fix(observability): raw trace spool never persists a bundle on Windows
2026-08-10 13:36:19 +08:00
musistudio
d48fd17105 Attribute Claude App encoded models to routed upstream usage 2026-08-10 13:04:07 +08:00
musistudio
6e34da7fca Enforce profile model allowlists across agent catalogs 2026-08-10 12:55:54 +08:00
musi
0d178f3732 Improve compact handoff fidelity and token limit sanitization 2026-08-10 08:34:21 +08:00
jesieleo
f39ab4d5c4 feat(providers): 增加小米 MiMo 及 Token Plan 预设 2026-08-08 19:08:47 +08:00
pacocartones
92eeec11a9 fix(observability): raw trace spool never persists a bundle on Windows
Windows implements fsync as FlushFileBuffers, which behaves differently
from POSIX in two ways the raw trace spool relied on.

Flushing a directory handle is rejected outright with EPERM. syncDirectory
only tolerated EINVAL, ENOTSUP and EISDIR, so the durability barrier that
follows every rename threw instead of being skipped.

Flushing a file handle requires that handle to carry write access, and both
file flush sites opened their target read-only, so they also failed with
EPERM.

Together these made every durable write fail on Windows: with
observability.requestLogs enabled the sync handler answered 503
spool_unavailable for every bundle and nothing was ever persisted.

Tolerate EPERM alongside the other directory-flush rejections, and reopen
files as "r+" so their flush stays a real barrier rather than a tolerated
error. The tolerated set is extracted into a predicate so a test can pin
down which codes are skipped and, just as importantly, which ones still
propagate.

Fixes #1635
2026-08-07 21:45:10 +02:00
musistudio
47b23298fb Implement requested changes 2026-08-07 22:49:28 +08:00
musistudio
065be3bf99 chore: release v3.0.20 2026-08-07 15:49:19 +08:00
musistudio
8cab2dbb7a Merge dev/3.1 into main for v3.0.20 2026-08-07 15:41:27 +08:00
musistudio
c8825cf5cd Rename browser usage mode to Browser request 2026-08-07 15:04:43 +08:00
musistudio
83a7979c0b Implement routing updates 2026-08-07 14:57:45 +08:00
musistudio
1f5cc499f1 Improve Claude Design asset discovery and product runtime support 2026-08-07 11:51:19 +08:00
musistudio
860f41b187 Add provider logos to account balance widgets 2026-08-06 17:51:51 +08:00
musistudio
4097bbe5e7 Improve router configuration and request handling 2026-08-06 17:41:41 +08:00
musi
70b51b08d4
Merge pull request #1634 from flaviomartil/fix/grok-peer-rotated-credential
fix(grok): adopt peer-rotated credential on refresh 401
2026-08-06 16:12:24 +08:00
musistudio
240cd73c1c Merge branch 'dev/3.1' into dev/docs
# Conflicts:
#	docs/src/content/docs/en/configuration/profiles.md
#	docs/src/content/docs/zh/configuration/profiles.md
2026-08-06 14:16:12 +08:00
musi
3c71252de1 Add interactive docs demos 2026-08-06 14:10:32 +08:00
musistudio
89081a2082 Preserve target-provider slash model routing 2026-08-06 14:07:56 +08:00
Flavio martil
01d275892e fix(grok): coalesce in-process refreshes and unexport GrokRefreshAuthError
Address review on #1634:

- keep GrokRefreshAuthError module-private, consistent with the updated
  Kimi implementation, avoiding new public API surface;
- dedupe concurrent resolveGrokAuth calls with a per-credential in-flight
  refresh map keyed by sourceFile + authRecordKey, mirroring
  kimiRefreshInFlight, so parallel requests share one refresh (and its
  peer-rotation adoption outcome) instead of racing the same stale
  refresh token;
- add a test proving concurrent refreshes coalesce into a single token
  request.
2026-08-06 01:14:09 -03:00
musistudio
94674ba2e6 Add web content JSON provider account connectors 2026-08-06 11:36:11 +08:00
Flávio Martil
c2e478691a fix(kimi): harden peer-rotation adoption per review
Address review feedback: keep KimiRefreshAuthError internal to the
module, and require an access token on the adopted credential so a
partially written file cannot mask the real refresh failure.
2026-08-05 10:54:53 -03:00
Flávio Martil
bb018e95cf fix(grok): adopt only the same account record on peer rotation
Address review feedback: in a multi-account auth.json, re-reading all
records could adopt a different account just because its refresh token
differs. Restrict adoption to the same sourceFile + authRecordKey that
was being refreshed, and require an access token on the adopted record
so a partially written file cannot mask the real failure.
2026-08-05 10:53:56 -03:00
Flávio Martil
b6248f3708 fix(grok): adopt peer-rotated credential on refresh 401
The Grok refresh token rotates on every refresh. CCR reads and writes
the same ~/.grok/auth.json as the Grok CLI, so when the CLI (or any
other consumer of the file) refreshes first, the refresh token CCR
holds is invalidated and the refresh fails with 401/403. Previously the
error propagated to the caller even though the file on disk already
held a valid, newer credential.

On 401/403 from the refresh endpoint, re-read the credential records
once and, when the stored refresh token differs from the rejected one,
adopt the on-disk credential instead of failing the request. Other
errors propagate unchanged, and a 401 without a peer rotation still
surfaces as before. Same treatment as the Kimi provider fix.
2026-08-05 10:53:22 -03:00
musistudio
b4e6185172 Separate enhanced route from profile routing settings 2026-08-05 20:23:08 +08:00
musistudio
df42fe8683 Propagate provider context for Fusion model discovery 2026-08-05 20:06:58 +08:00
Flávio Martil
1ea0c960a7 fix(kimi): adopt peer-rotated credential on refresh 401
The Kimi refresh token rotates on every refresh. CCR reads and writes
the same ~/.kimi/credentials file as the Kimi CLI, so when the CLI (or
any other consumer of the file) refreshes first, the refresh token CCR
holds is invalidated and the refresh fails with 401/403. Previously the
error propagated to the caller even though the file on disk already
held a valid, newer credential.

On 401/403 from the refresh endpoint, re-read the credential file once
and, when the stored refresh token differs from the rejected one, adopt
the on-disk credential instead of failing the request. Other errors
propagate unchanged, and a 401 without a peer rotation still surfaces
as before.
2026-08-05 08:59:22 -03:00
musistudio
b41890610c chore: release v3.0.19 2026-08-05 18:58:13 +08:00