Commit Graph

26191 Commits

Author SHA1 Message Date
Peter Steinberger 05da802e1c
refactor: split device-pair command helpers 2026-04-04 19:55:04 +09:00
Peter Steinberger fdb1be0079
docs: refresh mattermost slash auth refs 2026-04-04 11:54:52 +01:00
Peter Steinberger 8a532dead2
docs: refresh browser cdp validation refs 2026-04-04 11:53:36 +01:00
Peter Steinberger 2a65bfee96
fix(mattermost): harden slash command token validation 2026-04-04 19:51:41 +09:00
Peter Steinberger 53d3fbcef6
docs: refresh browser existing session docs 2026-04-04 11:51:07 +01:00
Peter Steinberger 5583bda61d docs: note browser profile CDP validation fix (#60477) (thanks @eleqtrizit) 2026-04-04 19:51:02 +09:00
Agustin Rivera 5da360cada fix(browser): trim validation error prefix 2026-04-04 19:51:02 +09:00
Agustin Rivera aefc6fc161 fix(browser): validate profile cdp urls 2026-04-04 19:51:02 +09:00
Peter Steinberger 36cc397548
fix: reuse shared Synology Chat secret compare 2026-04-04 19:49:35 +09:00
Peter Steinberger c5b2b69f94
docs: refresh live model switch docs 2026-04-04 11:49:23 +01:00
Peter Steinberger bc356cc8c2 fix: harden direct CDP websocket validation (#60469) (thanks @eleqtrizit) 2026-04-04 19:48:01 +09:00
Agustin Rivera c3f8427973 fix(browser): validate initial cdp endpoints 2026-04-04 19:48:01 +09:00
Agustin Rivera 80720b4994 fix(browser): validate cdp websocket pivots 2026-04-04 19:48:01 +09:00
Peter Steinberger e4ea3c03cf fix: scope live model switch pending state (#60266) (thanks @kiranvk-2011) 2026-04-04 19:45:53 +09:00
kiranvk2011 b36a3a3295 fix: add .catch() to fire-and-forget stale-flag clear to prevent unhandled rejection 2026-04-04 19:45:53 +09:00
kiranvk2011 e8f6ceedd4 fix: clear stale liveModelSwitchPending flag when model already matches
When the liveModelSwitchPending flag is set but the current model already
matches the persisted selection (e.g. the switch was applied as an override
and the current attempt is already using the new model), the flag is now
consumed eagerly via a fire-and-forget clearLiveModelSwitchPending() call.

Without this, the stale flag could persist across fallback iterations and
later cause a spurious LiveSessionModelSwitchError when the model rotates
to a fallback candidate that differs from the persisted selection.

Also expands JSDoc on shouldSwitchToLiveModel to document the stale-flag
clearing and deferral semantics.
2026-04-04 19:45:53 +09:00
kiranvk2011 251e086eac fix: use explicit flag for live model switch detection in fallback chain
Replace the ambiguous comparison-based approach (hasDifferentLiveSessionModelSelection
+ in-memory map EMBEDDED_RUN_MODEL_SWITCH_REQUESTS) with a persisted
`liveModelSwitchPending` flag on SessionEntry.

The root cause: the in-memory map was never populated in production because
requestLiveSessionModelSwitch() was removed in commit 622b91d04e and replaced
with refreshQueuedFollowupSession(). This left the comparison-based detection
as the only path, which could not distinguish user-initiated model switches
(via /model command) from system-initiated fallback rotations.

The fix:
- Add `liveModelSwitchPending?: boolean` to SessionEntry (persisted)
- Set the flag to true ONLY when /model command applies a model override
- New `shouldSwitchToLiveModel()` checks the flag + model mismatch together
- New `clearLiveModelSwitchPending()` resets the flag after consumption
- Replace throw-site logic in run.ts to use the new flag-based functions
- Remove orphaned resolveCurrentLiveSelection helper

Only the /model command sets this flag, so system-initiated fallback rotations
are never mistaken for user-initiated model switches. This restores the
live-switch-during-active-run feature that was accidentally broken.

Fixes #57857, #57760, #58137
2026-04-04 19:45:53 +09:00
Peter Steinberger 678e9e6078
docs: refresh gemini cli oauth references 2026-04-04 11:45:37 +01:00
Peter Steinberger 20a7b1a9dc fix: finalize device-pair scope hardening (#55996) (thanks @coygeek) 2026-04-04 19:44:43 +09:00
Coy Geek 9dcef6df02 fix: scope pairing guard to internal gateway callers 2026-04-04 19:44:43 +09:00
Coy Geek 05ca581ed0 fix: fail closed when pairing scopes are missing 2026-04-04 19:44:43 +09:00
Coy Geek 353d93613c fix: enforce pairing approval scopes 2026-04-04 19:44:43 +09:00
Peter Steinberger 5d0562badf
docs: clarify cli backend mcp overlays 2026-04-04 11:43:29 +01:00
Peter Steinberger cc602fe9d4
docs: refresh anthropic cli backend docs 2026-04-04 11:40:58 +01:00
Peter Steinberger 3f042ed002
fix: stabilize async provider test types 2026-04-04 19:39:22 +09:00
Peter Steinberger 87d840e9ee
fix: tighten Teams and device typing 2026-04-04 19:39:22 +09:00
Peter Steinberger 75fb29ffe6
docs: refresh provider sdk hook docs 2026-04-04 11:38:25 +01:00
Peter Steinberger d1bf2c6de1
docs: clarify device token role bounds 2026-04-04 11:36:02 +01:00
Peter Steinberger e675634eb3
fix: preserve streamed Kimi tool args on repair fallback 2026-04-04 11:35:49 +01:00
Peter Steinberger 5bef64bc31 test: harden media provider auto-registration (#56279) (thanks @Ezio0) 2026-04-04 19:35:28 +09:00
Peter Steinberger 277df463d6
docs: clarify openrouter cache markers 2026-04-04 11:34:17 +01:00
Vincent Koc 39d2a719c9 refactor(providers): add family replay and tool hooks 2026-04-04 19:33:31 +09:00
Peter Steinberger 4e099689c0
feat: stream Claude CLI JSONL output 2026-04-04 19:33:08 +09:00
Peter Steinberger 2ab1f1c054
docs: clarify openai usage normalization 2026-04-04 11:32:58 +01:00
Peter Steinberger 10e0592ed0
refactor: extract device token rotate target guard 2026-04-04 19:32:25 +09:00
Vincent Koc 0a3211df2d
fix(openrouter): gate prompt cache markers by endpoint (#60761)
* fix(openrouter): gate prompt cache markers by endpoint

* test(openrouter): use claude sonnet 4.6 cache model
2026-04-04 19:32:13 +09:00
Peter Steinberger ee742cec40 fix: fallback ws usage totals (#54940) (thanks @lyfuci) 2026-04-04 19:32:05 +09:00
Peter Steinberger 4ee648c508
docs: refresh model picker provider filtering 2026-04-04 11:30:18 +01:00
复试资料 e955cffd32 Agents: widen WS usage aliases 2026-04-04 19:28:54 +09:00
复试资料 d166f2648e Agents: normalize WS usage aliases 2026-04-04 19:28:54 +09:00
Peter Steinberger 9367379771
docs: clarify prompt cache stability 2026-04-04 11:28:19 +01:00
Peter Steinberger f0d3e231ef fix: cover bundled provider picker aliases (#58819) (thanks @Luckymingxuan) 2026-04-04 19:27:26 +09:00
Mingxuan c4a903319e fix(model-picker): fallback to unfiltered list when provider filter yields empty results 2026-04-04 19:27:26 +09:00
Mingxuan 360fdaa4f2 fix(model-picker): use matchesPreferredProvider for plan variant matching 2026-04-04 19:27:26 +09:00
Mingxuan fd3b7b5ae7 fix: add augmentModelCatalog hooks to bundled providers for proper filtering 2026-04-04 19:27:26 +09:00
Mingxuan 792558de01 fix(model-picker): use preferredProvider presence for filtering instead of catalog check
When auth choice explicitly sets a preferred provider (e.g., volcengine-api-key or byteplus-api-key), the model picker should always filter by that provider. Previously, it relied on providerIds.includes(preferredProvider), which could be false if the catalog hadn't loaded that provider's models yet due to a race condition between auth choice setup and catalog loading.

This ensures that selecting a provider via auth choice consistently filters the model list to only that provider's models, rather than showing all providers.
2026-04-04 19:27:26 +09:00
Peter Steinberger 6b82140336 fix: land device token role guard follow-up (#60462) (thanks @eleqtrizit) 2026-04-04 19:27:10 +09:00
Agustin Rivera 7cda9df4cb fix(device): reject unapproved token roles 2026-04-04 19:27:10 +09:00
Peter Steinberger d58b4d7425 fix: respect MINIMAX_API_HOST in bundled minimax catalogs (#34524) (thanks @caiqinghua) 2026-04-04 19:26:12 +09:00
Peter Steinberger 2c36ca562d
docs: clarify minimax usage window semantics 2026-04-04 11:25:51 +01:00