From 0caa9bece475c7caa3f1b708790620defa843f40 Mon Sep 17 00:00:00 2001
From: BaaRai <130491490+BaaRai@users.noreply.github.com>
Date: Mon, 16 Nov 2026 23:49:49 +0100
Subject: [PATCH] fix(llm-rotation): precise exhaustion wording and binding
check state
Follow-up to #270 by @Toys0125:
- README: an intent pinned to an exhausted profile falls back to the task's
current profile instead of retrying it, and saving the chain does not reset
the rotation cursor.
- api.ts: the update response carries llm_rotate.
- TaskLLMProfileChain: keep a failed worker-binding lookup separate from the
initial load, which flashed the "could not be checked" warning.
---
README.md | 9 ++++++---
web/src/components/task-llm-profile-chain.tsx | 7 ++++---
web/src/lib/api.ts | 1 +
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index d8bf4d7..5dc107c 100644
--- a/README.md
+++ b/README.md
@@ -77,9 +77,12 @@ Rotation assigns successive worker intents A, B, A, B, regardless of completion
order. Separate intents can run concurrently on different providers; each intent
keeps its selected provider unless it fails over. Planner and other unbound roles
continue using the task's current profile. Turning rotation off restores ordered
-task-level failover. Exhausted providers are skipped; saving the chain resets their
-failure state. Changes do not interrupt in-flight calls. The rotation cursor starts
-again after a server restart; the profile order and switch remain persisted.
+task-level failover. An excluded provider is skipped, so an intent pinned to an
+exhausted profile falls back to the task's current profile instead of retrying it;
+rotation keeps cycling the whole list and does not rebalance around a dead provider.
+Saving the chain resets their failure state. Changes do not interrupt in-flight
+calls. The rotation cursor starts again after a server restart and saving the chain
+does not reset it; the profile order and switch remain persisted.
The task creation and `PUT /api/tasks/{id}/llm` APIs accept `llm_rotate: true` alongside
the ordered `llm_profile_ids`. Omitting `llm_rotate` on an update preserves its value.
diff --git a/web/src/components/task-llm-profile-chain.tsx b/web/src/components/task-llm-profile-chain.tsx
index 2bc5b4c..3ff98ad 100644
--- a/web/src/components/task-llm-profile-chain.tsx
+++ b/web/src/components/task-llm-profile-chain.tsx
@@ -60,12 +60,13 @@ export function TaskLLMProfileChain({
portalContainer,
}: TaskLLMProfileChainProps) {
const rotationID = React.useId();
- const [workerBinding, setWorkerBinding] = React.useState
Worker binding could not be checked. A fixed Worker model overrides rotation; verify Agent settings.
diff --git a/web/src/lib/api.ts b/web/src/lib/api.ts index b15e6fc..5d1e8ca 100644 --- a/web/src/lib/api.ts +++ b/web/src/lib/api.ts @@ -316,6 +316,7 @@ export const api = { put<{ id: string; llm_profile_ids: number[]; + llm_rotate: boolean; active_llm_profile_id?: number; llm_failover_state: string; reopened_intents: number;