Skip to content

[Feat] Add configurable model fallbacks - #3360

Merged
brunobergher merged 7 commits into
developfrom
feature/configurable-model-fallbacks-149brqxtk0emo
Oct 1, 2026
Merged

brunobergher merged 7 commits into
developfrom
feature/configurable-model-fallbacks-149brqxtk0emo

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Added an opt-in fallback model and reasoning selection for every model role, stored independently from the existing runtime model mapping.
  • Added shared provider-error classification and sticky fallback switching across task harnesses, mapped subagents, sessions, and control-plane helper calls.
  • Added transcript notices, originating-thread notifications, anonymous fallback telemetry, public documentation, and contributor guardrails for future model roles.
  • Prune fallback selections when their provider is removed or their model is removed or disabled, so later settings saves are not blocked by stale model IDs.
  • Deliver child-task fallback notices to the owning session as dedicated durable events with redacted provider details; direct customer channels receive a fully static Roomote-controlled fallback notice with explicit non-terminal presentation.
  • Stabilized the worker test suite with bounded fork concurrency and complete harness event mocks for the new fallback subscription.
  • Kept OpenCode-private helper calls explicitly out of scope because their provider failures are not observable to Roomote.

Why this change was made

Provider quota, credential, model-availability, and transient failures should not strand running work when an administrator has configured another enabled model. The shared fallback contract keeps retry thresholds and long-lived model selection consistent across Roomote runtimes.

Impact

Fallback behavior remains off by default. When enabled, quota and supported 401/403/404 failures switch immediately, other eligible provider failures switch after three Roomote retries, and the selected fallback remains active for the rest of that task or session unless a person changes the model manually. Removing or disabling a provider or model now removes only affected fallback selections, and delegated-task fallback progress continues safely into its owning session and source conversation.

@roomote-community

roomote-community Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Fast-originated child-task fallback notices are dropped instead of reaching the parent conversation.
  • Removing a provider leaves stale fallback models that block subsequent fallback-setting saves.
  • Disabling a fallback model leaves its stale fallback selection and blocks later fallback-setting saves.
  • Fast fallback notices can forward provider-supplied credentials into the owning session.
  • Fallback notices can post unsafe provider-supplied error Markdown into direct customer channels.
  • Fallback notices still interpolate unrestricted model identifiers into direct customer-channel Markdown.
  • Static fallback notices are rendered as terminal errors that say the task stopped even though it continues.

Reviewed b0d3638

@brunobergher
brunobergher marked this pull request as ready for review October 1, 2026 11:24
Comment thread apps/web/src/trpc/commands/task-models/index.ts
@roomote-roomote

roomote-roomote Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

All Roomote review findings and the Test failure are resolved on b0d3638. Direct fallback delivery uses a fully static Roomote-controlled message plus an explicit fallback discriminator, so no provider/model/error data can inject customer-channel Markdown and the notice is never rendered as a terminal error. Worker Vitest concurrency is capped at four and every runTask harness mock implements the event subscription contract. The full worker suite passes 187/187 files and 2,162/2,162 tests locally. GitHub Test and Roomote code review checks now pass, all review threads are resolved, and all other current checks are green. Visual proof was not retried per the explicit timeout instruction.

Comment thread packages/sdk/src/server/lib/task-runs/notify-source-thread-provider-error.ts Outdated
Comment thread apps/web/src/trpc/commands/task-models/index.ts Outdated
Comment thread packages/sdk/src/server/lib/task-runs/notify-source-thread-provider-error.ts Outdated
@brunobergher
brunobergher merged commit 06496e7 into develop Oct 1, 2026
24 of 26 checks passed
@brunobergher
brunobergher deleted the feature/configurable-model-fallbacks-149brqxtk0emo branch October 1, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants