Files
openclaw/src/agents/live-model-switch-error.ts
JC 59e95fe3fd feat: support GPT-5.6 Ultra across OpenClaw and Codex runtimes (#98021)
* feat: support GPT-5.6 Ultra across agent runtimes

Co-authored-by: J Cai <anyech@gmail.com>

* fix: keep harness projections discovery-free

* fix(codex): mirror V2 native subagent tasks

* chore: refresh plugin SDK surface budgets

* test: expose Ultra wire effort proof

* test(cron): avoid hoisted mock initialization race

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-10 15:23:24 +01:00

32 lines
1.1 KiB
TypeScript

/**
* Live-session model switch control-flow error.
* Carries the requested provider/model/auth-profile selection out of live
* session setup code without treating the switch as a failure.
*/
type LiveSessionModelSelection = {
provider: string;
model: string;
agentRuntimeOverride?: string;
authProfileId?: string;
authProfileIdSource?: "auto" | "user";
};
/** Control-flow error used to request a live session model switch. */
export class LiveSessionModelSwitchError extends Error {
provider: string;
model: string;
agentRuntimeOverride?: string;
authProfileId?: string;
authProfileIdSource?: "auto" | "user";
constructor(selection: LiveSessionModelSelection) {
super(`Live session model switch requested: ${selection.provider}/${selection.model}`);
this.name = "LiveSessionModelSwitchError";
this.provider = selection.provider;
this.model = selection.model;
this.agentRuntimeOverride = selection.agentRuntimeOverride;
this.authProfileId = selection.authProfileId;
this.authProfileIdSource = selection.authProfileIdSource;
}
}