Commit Graph
13 Commits
Author SHA1 Message Date
Peter Steinberger f1805ab54d fix: centralize provider thinking profiles 2026-04-21 09:13:35 +01:00
Peter Steinberger 6ce17db11a fix: gate max thinking by model support 2026-04-21 07:02:43 +01:00
Peter Steinberger 69c78fbef0 perf(test): dedupe model config fixtures 2026-04-20 12:26:47 +01:00
Peter Steinberger 15a7869bbc test: merge live model switch assertions 2026-04-18 23:34:49 +01:00
Peter Steinberger 23ff2a9cf7 test: dedupe live model switch fixtures 2026-04-18 22:03:30 +01:00
Vincent Koc 99755fcb2f perf(agents): lazy-load session store updates 2026-04-13 21:07:50 +01:00
Vincent Koc dd27aa945e perf(agents): lazy-load delivery runtime 2026-04-13 21:05:30 +01:00
Vincent Koc f126088761 perf(agents): keep attempt execution runtime cold 2026-04-13 21:03:52 +01:00
Peter Steinberger e7db987ce6 test: trim heavy imports and harden ci checks 2026-04-10 19:23:10 +01:00
Peter Steinberger 527601d7a5 fix: align channel owner context test types 2026-04-10 18:14:14 +01:00
Mariano c7b7dc335e test: fix current-main prep blockers (#61582)
Merged via squash.

Prepared head SHA: 49f7b121aa6f00e30b85b9bb0ccb2626c3a4341c
Reviewed-by: @mbelinky
2026-04-06 03:33:47 +02:00
Ayaan Zaidi ef7c84ae92 style: trim live model switch comment noise 2026-04-04 22:42:30 +05:30
wangchunyueandAyaan Zaidi 17f086c021 fix: handle subagent live model switches (#58178) (thanks @openperf)
* fix(agents): handle LiveSessionModelSwitchError in subagent execution

Add retry loop for cross-provider model switches in the subagent
command path, mirroring the existing logic in agent-runner-execution.ts.

- Wrap runWithModelFallback in a while(true) loop inside agentCommandInternal
- Catch LiveSessionModelSwitchError and update provider, model,
  fallbackProvider, fallbackModel, providerForAuthProfileValidation,
  sessionEntry.authProfileOverride, and storedModelOverride before retrying
- Guard storedModelOverride update: only set when the model genuinely
  changed (compared before mutation) or a session override already existed
- Reset lifecycleEnded flag so the retried iteration can emit lifecycle events
- Add comprehensive tests covering retry success, error propagation,
  lifecycle reset, auth-profile forwarding, and fallback override state

Fixes #57998

* fix(agents): include provider change in storedModelOverride guard

* fix(agents): validate allowlist and clear stale compaction count on live model switch

* fix(agents): remove broken allowlist guard on live model switch

* fix(agents): address security review — bound retry loop, validate allowlist, redact error in lifecycle events

* fix(agents): restore error observability in lifecycle events using err.message

* fix(agents): sanitize log inputs and shallow-copy sessionEntry on live model switch

* fix(agents): enforce allowlist on empty set and sanitize error message

* fix: handle subagent live model switches (#58178) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-04 21:56:11 +05:30