Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Align Assistant route wait status
rcourtman13b2c33dfdf4
diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.mdindex 8687972552..047bee8ce7 100644--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md@@ -177,7 +177,11 @@ deriving an older display status from `workflowStatusHistory`.streaming assistant message first and the selected route only as a fallback;live progress text remains the activity description, while route identity isseparate compact chrome so provider/model state stays inspectable without- polluting status copy.+ polluting status copy. Provider-start copy must stay route-neutral+ ("Waiting for assistant.") because selected-route identity belongs in the+ route chrome and stream metadata, not in transient activity text; retry copy+ must say Pulse is retrying the selected route, not imply automatic provider+ or model fallback.Legacy bare model names, provider response IDs without a Pulse route prefix,URLs, and malformed route strings must be ignored so loading older sessionscannot corrupt the active selector. The referenced OpenCode source at fetcheddiff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 1f6a5ff3f1..2f69836d8a 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -124,7 +124,11 @@ Provider retry progress must use typed fields (`attempt`, `max_attempts`,`retry_after_ms`) on that same event instead of frontend-only string parsing orprovider-specific ad hoc events; the Assistant UI may format those fields, butmust not invent retry progress that the stream contract did not carry. Assistant-chat stream payloads must not expose automatic provider fallback metadata:+`provider_start` status text must remain route-neutral (`Waiting for+assistant.`) while selected route identity travels through the typed `provider`+and `model` fields. `provider_retry` status text must describe a selected-route+retry, not a provider fallback or hidden route switch. Assistant chat stream+payloads must not expose automatic provider fallback metadata:`workflow_state` may carry the selected `provider` and `model` plus same-routeretry fields, but `provider_fallback`, `failed_provider`, `failed_model`,`next_provider`, and `next_model` are retired from the generated stream eventdiff --git a/frontend-modern/src/api/__tests__/aiChat.test.ts b/frontend-modern/src/api/__tests__/aiChat.test.tsindex f9d98ed4e9..0c5bac6bde 100644--- a/frontend-modern/src/api/__tests__/aiChat.test.ts+++ b/frontend-modern/src/api/__tests__/aiChat.test.ts@@ -224,7 +224,7 @@ describe('AIChatAPI', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',model: 'openrouter:deepseek/deepseek-chat',},});@@ -327,7 +327,7 @@ describe('AIChatAPI', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',model: 'openrouter:qwen/qwen3.7-plus',},});@@ -414,7 +414,7 @@ describe('AIChatAPI', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',},@@ -558,7 +558,7 @@ describe('AIChatAPI', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',model: 'openrouter:qwen/qwen3.7-plus',},});@@ -776,7 +776,7 @@ describe('AIChatAPI', () => {type: 'workflow_state',data: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',provider: 'openrouter',model: 'openrouter:deepseek/deepseek-chat',attempt: 2,@@ -816,7 +816,7 @@ describe('AIChatAPI', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',},diff --git a/frontend-modern/src/api/__tests__/aiChatEvents.test.ts b/frontend-modern/src/api/__tests__/aiChatEvents.test.tsindex e538ef8725..7052210d8c 100644--- a/frontend-modern/src/api/__tests__/aiChatEvents.test.ts+++ b/frontend-modern/src/api/__tests__/aiChatEvents.test.ts@@ -36,7 +36,7 @@ describe('AI chat stream event contract', () => {it('exposes selected provider and model metadata on workflow state events', () => {const workflow: WorkflowStateData = {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',};@@ -51,7 +51,7 @@ describe('AI chat stream event contract', () => {it('exposes provider retry metadata on workflow state events', () => {const workflow: WorkflowStateData = {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',state: 'investigating',attempt: 2,max_attempts: 2,diff --git a/frontend-modern/src/api/aiChatDevStreamFixture.ts b/frontend-modern/src/api/aiChatDevStreamFixture.tsindex 188088776e..41df3c9a68 100644--- a/frontend-modern/src/api/aiChatDevStreamFixture.ts+++ b/frontend-modern/src/api/aiChatDevStreamFixture.ts@@ -114,28 +114,6 @@ const providerFromFixtureModel = (model: string): string => {return provider || 'dev';};-const providerDisplayNameForFixture = (provider: string): string => {- switch (provider) {- case 'openrouter':- return 'OpenRouter';- case 'deepseek':- return 'DeepSeek';- case 'anthropic':- return 'Anthropic';- case 'gemini':- return 'Gemini';- case 'ollama':- return 'Ollama';- default:- return (- provider- .replace(/[-_]+/g, ' ')- .replace(/\b[a-z]/g, (letter) => letter.toUpperCase())- .trim() || 'Assistant'- );- }-};-const buildUnknownFixtureEvents = (prompt: string): AIChatStreamEvent[] => [{type: 'session',@@ -248,7 +226,7 @@ const buildSendHoldFixtureEvents = (model?: string): AIChatStreamEvent[] => [type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: assistantFixtureModel(model),},@@ -332,7 +310,7 @@ const buildToolBurstFixtureEvents = (model?: string): AIChatStreamEvent[] => [type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',model: assistantFixtureModel(model),},},@@ -458,7 +436,7 @@ const buildWorkflowBurstFixtureEvents = (model?: string): AIChatStreamEvent[] =>type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',model: assistantFixtureModel(model),},},@@ -600,7 +578,7 @@ const buildStatusBoundaryFixtureEvents = (model?: string): AIChatStreamEvent[] =type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',model: assistantFixtureModel(model),},},@@ -801,7 +779,6 @@ const buildLongOutputFixtureEvents = (model?: string): AIChatStreamEvent[] => [const buildProviderRetryFixtureEvents = (model?: string): AIChatStreamEvent[] => {const selectedModel = assistantFixtureModel(model);const selectedProvider = providerFromFixtureModel(selectedModel);- const selectedProviderLabel = providerDisplayNameForFixture(selectedProvider);return [{@@ -819,7 +796,7 @@ const buildProviderRetryFixtureEvents = (model?: string): AIChatStreamEvent[] =>type: 'workflow_state',data: {phase: 'provider_start',- message: `${selectedProviderLabel} is starting the response.`,+ message: 'Waiting for assistant.',provider: selectedProvider,model: selectedModel,},@@ -828,7 +805,7 @@ const buildProviderRetryFixtureEvents = (model?: string): AIChatStreamEvent[] =>type: 'workflow_state',data: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',provider: selectedProvider,model: selectedModel,attempt: 2,@@ -870,7 +847,7 @@ const buildStreamIdleFixtureEvents = (model?: string): AIChatStreamEvent[] => [type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: assistantFixtureModel(model),},@@ -915,7 +892,7 @@ const buildQueueHoldFixtureEvents = (model?: string): AIChatStreamEvent[] => [type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: assistantFixtureModel(model),},diff --git a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsxindex 015d0902ad..bd4d98ff5b 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx+++ b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx@@ -4936,7 +4936,7 @@ describe('AIChat', () => {isStreaming: true,workflowStatus: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',},@@ -4950,7 +4950,7 @@ describe('AIChat', () => {type: 'workflow_status',workflowStatus: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',},@@ -5675,7 +5675,7 @@ describe('AIChat', () => {streamEvents: [],workflowStatus: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 3,retryAfterMs: 3200,@@ -5686,7 +5686,7 @@ describe('AIChat', () => {renderChat();expect(screen.getByLabelText('Assistant active turn status')).toHaveTextContent(- 'Provider connection failed before any output; retrying. · attempt 2/3 · retrying in 1.9s',+ 'Selected route connection failed before any output; retrying. · attempt 2/3 · retrying in 1.9s',);expect(screen.getByTestId('assistant-activity-dock').querySelector('[data-status-kind="retrying"]'),@@ -5755,7 +5755,7 @@ describe('AIChat', () => {},{phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_200,},];@@ -5786,13 +5786,13 @@ describe('AIChat', () => {const status = screen.getByLabelText('Assistant active turn status');await waitFor(() => expect(status).toHaveTextContent('Preparing Pulse context.'));- expect(status).not.toHaveTextContent('OpenRouter is starting the response.');+ expect(status).not.toHaveTextContent('Waiting for assistant.');await vi.advanceTimersByTimeAsync(WORKFLOW_STATUS_PACE_MS);expect(status).toHaveTextContent('Reading current Pulse inventory.');await vi.advanceTimersByTimeAsync(WORKFLOW_STATUS_PACE_MS);- expect(status).toHaveTextContent('OpenRouter is starting the response.');+ expect(status).toHaveTextContent('Waiting for assistant.');expect(status).not.toHaveTextContent('Preparing Pulse context.');expect(status).not.toHaveTextContent('Reading current Pulse inventory.');});@@ -5816,7 +5816,7 @@ describe('AIChat', () => {},{phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_200,},];@@ -5859,14 +5859,14 @@ describe('AIChat', () => {expect(screen.getByLabelText('Queued follow-up messages')).toHaveTextContent('1 follow-up queued',);- expect(status).not.toHaveTextContent('OpenRouter is starting the response.');+ expect(status).not.toHaveTextContent('Waiting for assistant.');await vi.advanceTimersByTimeAsync(WORKFLOW_STATUS_PACE_MS);expect(status).toHaveTextContent('Reading current Pulse inventory.');expect(status).not.toHaveTextContent('follow-up queued');await vi.advanceTimersByTimeAsync(WORKFLOW_STATUS_PACE_MS);- expect(status).toHaveTextContent('OpenRouter is starting the response.');+ expect(status).toHaveTextContent('Waiting for assistant.');expect(status).not.toHaveTextContent('follow-up queued');expect(status).not.toHaveTextContent('Preparing Pulse context.');expect(status).not.toHaveTextContent('Reading current Pulse inventory.');@@ -5900,7 +5900,7 @@ describe('AIChat', () => {isStreaming: true,workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_000,},streamEvents: [@@ -5908,7 +5908,7 @@ describe('AIChat', () => {type: 'workflow_status',workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_000,},startedAt: 1_000,@@ -5935,7 +5935,7 @@ describe('AIChat', () => {'Completed $ ls /dev | wc -l',);expect(screen.getByLabelText('Assistant active turn status')).not.toHaveTextContent(- 'OpenRouter is starting the response.',+ 'Waiting for assistant.',);});@@ -5968,14 +5968,14 @@ describe('AIChat', () => {streamEvents: [{ type: 'content', content: 'I checked the first source.' }],workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: Date.now() - 5_000,},},]);renderChat();expect(screen.getByLabelText('Assistant active turn status')).toHaveTextContent(- 'OpenRouter is starting the response.',+ 'Waiting for assistant.',);});diff --git a/frontend-modern/src/components/AI/Chat/__tests__/MessageItem.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/MessageItem.test.tsxindex 963eb7a381..aff211597b 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/MessageItem.test.tsx+++ b/frontend-modern/src/components/AI/Chat/__tests__/MessageItem.test.tsx@@ -738,7 +738,7 @@ describe('MessageItem', () => {type: 'workflow_status',workflowStatus: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 3,retryAfterMs: 1200,@@ -747,7 +747,7 @@ describe('MessageItem', () => {],workflowStatus: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 3,retryAfterMs: 1200,@@ -759,7 +759,7 @@ describe('MessageItem', () => {expect(screen.getByText(- 'Provider connection failed before any output; retrying. · attempt 2/3 · retrying in 1.2s',+ 'Selected route connection failed before any output; retrying. · attempt 2/3 · retrying in 1.2s',),).toBeInTheDocument();expect(screen.getByRole('status')).toHaveAttribute('data-status-kind', 'retrying');@@ -782,7 +782,7 @@ describe('MessageItem', () => {type: 'workflow_status',workflowStatus: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 3,retryAfterMs: 3200,@@ -792,7 +792,7 @@ describe('MessageItem', () => {],workflowStatus: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 3,retryAfterMs: 3200,@@ -805,7 +805,7 @@ describe('MessageItem', () => {expect(screen.getByText(- /Provider connection failed before any output; retrying\. · attempt 2\/3 · retrying in 1\.9s/,+ /Selected route connection failed before any output; retrying\. · attempt 2\/3 · retrying in 1\.9s/,),).toBeInTheDocument();expect(screen.getByRole('status')).toHaveAttribute('data-status-kind', 'retrying');@@ -829,7 +829,7 @@ describe('MessageItem', () => {},{phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_200,},];@@ -855,13 +855,13 @@ describe('MessageItem', () => {));expect(screen.getByText(/Preparing Pulse context\./)).toBeInTheDocument();- expect(screen.queryByText(/OpenRouter is starting the response\./)).not.toBeInTheDocument();+ expect(screen.queryByText(/Waiting for assistant\./)).not.toBeInTheDocument();await vi.advanceTimersByTimeAsync(WORKFLOW_STATUS_PACE_MS);expect(screen.getByText(/Reading current Pulse inventory\./)).toBeInTheDocument();await vi.advanceTimersByTimeAsync(WORKFLOW_STATUS_PACE_MS);- expect(screen.getByText(/OpenRouter is starting the response\./)).toBeInTheDocument();+ expect(screen.getByText(/Waiting for assistant\./)).toBeInTheDocument();expect(screen.queryByText(/Preparing Pulse context\./)).not.toBeInTheDocument();expect(screen.queryByText(/Reading current Pulse inventory\./),@@ -880,12 +880,12 @@ describe('MessageItem', () => {},{phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_100,},{phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 3,retryAfterMs: 3200,@@ -916,14 +916,14 @@ describe('MessageItem', () => {expect(screen.getByText('Preparing Pulse context.')).toBeInTheDocument();await vi.advanceTimersByTimeAsync(WORKFLOW_STATUS_PACE_MS);- expect(screen.getByText('OpenRouter is starting the response.')).toBeInTheDocument();+ expect(screen.getByText('Waiting for assistant.')).toBeInTheDocument();await vi.advanceTimersByTimeAsync(WORKFLOW_STATUS_PACE_MS);expect(- screen.getByText(/Provider connection failed before any output; retrying\. · attempt 2\/3/),+ screen.getByText(/Selected route connection failed before any output; retrying\. · attempt 2\/3/),).toBeInTheDocument();expect(screen.queryByText('Preparing Pulse context.')).not.toBeInTheDocument();- expect(screen.queryByText('OpenRouter is starting the response.')).not.toBeInTheDocument();+ expect(screen.queryByText('Waiting for assistant.')).not.toBeInTheDocument();});it('keeps separated transcript workflow rows tied to their own streamed status', () => {@@ -939,7 +939,7 @@ describe('MessageItem', () => {},{phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_300,},];@@ -979,7 +979,7 @@ describe('MessageItem', () => {expect(screen.getByText('Reading current Pulse inventory.')).toBeInTheDocument();expect(screen.getByText('3 devices found')).toBeInTheDocument();- expect(screen.getByText('OpenRouter is starting the response.')).toBeInTheDocument();+ expect(screen.getByText('Waiting for assistant.')).toBeInTheDocument();expect(screen.queryByText(/pulse_query/)).not.toBeInTheDocument();});@@ -994,7 +994,7 @@ describe('MessageItem', () => {streamEvents: [{ type: 'content', content: 'Partial answer' }],workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',},})}{...makeHandlers()}@@ -1002,7 +1002,7 @@ describe('MessageItem', () => {));expect(screen.getByText('Partial answer')).toBeInTheDocument();- expect(screen.queryByText('OpenRouter is starting the response.')).not.toBeInTheDocument();+ expect(screen.queryByText('Waiting for assistant.')).not.toBeInTheDocument();expect(screen.queryByText('Thinking...')).not.toBeInTheDocument();});@@ -1019,7 +1019,7 @@ describe('MessageItem', () => {type: 'workflow_status',workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',},},{ type: 'content', content: 'Partial answer' },@@ -1029,7 +1029,7 @@ describe('MessageItem', () => {/>));- expect(screen.getByText('OpenRouter is starting the response.')).toBeInTheDocument();+ expect(screen.getByText('Waiting for assistant.')).toBeInTheDocument();expect(screen.getByText('Partial answer')).toBeInTheDocument();expect(screen.queryByText('Thinking...')).not.toBeInTheDocument();});@@ -1047,7 +1047,7 @@ describe('MessageItem', () => {type: 'workflow_status',workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',},},{ type: 'content', content: 'Inventory has 3 devices.' },@@ -1057,7 +1057,7 @@ describe('MessageItem', () => {/>));- expect(screen.getByText('OpenRouter is starting the response.')).toBeInTheDocument();+ expect(screen.getByText('Waiting for assistant.')).toBeInTheDocument();expect(screen.getByText('Inventory has 3 devices.')).toBeInTheDocument();expect(screen.queryByText('Thinking...')).not.toBeInTheDocument();});diff --git a/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.ts b/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.tsindex adfeb0d25d..0d663c20a3 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.ts+++ b/frontend-modern/src/components/AI/Chat/__tests__/activeTurnStatus.test.ts@@ -72,7 +72,7 @@ describe('getAssistantActiveTurnStatus', () => {withAssistantQueuedFollowUpStatus({type: 'thinking',- text: 'OpenRouter is starting the response.',+ text: 'Waiting for assistant.',startedAt: 1_000,},[@@ -83,7 +83,7 @@ describe('getAssistantActiveTurnStatus', () => {),).toEqual({type: 'thinking',- text: 'OpenRouter is starting the response.',+ text: 'Waiting for assistant.',queuedFollowUpCount: 2,startedAt: 1_000,});@@ -219,7 +219,7 @@ describe('getAssistantActiveTurnStatus', () => {assistantMessage({workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt,},}),@@ -228,7 +228,7 @@ describe('getAssistantActiveTurnStatus', () => {),).toEqual({type: 'thinking',- text: 'OpenRouter is starting the response.',+ text: 'Waiting for assistant.',startedAt,});});@@ -244,7 +244,7 @@ describe('getAssistantActiveTurnStatus', () => {type: 'workflow_status',workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_000,},startedAt: 1_000,@@ -287,7 +287,7 @@ describe('getAssistantActiveTurnStatus', () => {},{phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_200,},];@@ -309,7 +309,7 @@ describe('getAssistantActiveTurnStatus', () => {expect(getAssistantActiveTurnStatus(messages, true, 1_200)).toEqual({type: 'thinking',- text: 'OpenRouter is starting the response.',+ text: 'Waiting for assistant.',startedAt: 1_200,});});@@ -323,12 +323,12 @@ describe('getAssistantActiveTurnStatus', () => {},{phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_100,},{phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 3,retryAfterMs: 3200,@@ -358,7 +358,7 @@ describe('getAssistantActiveTurnStatus', () => {),).toEqual({type: 'retrying',- text: 'Provider connection failed before any output; retrying. · attempt 2/3 · retrying in 3.2s',+ text: 'Selected route connection failed before any output; retrying. · attempt 2/3 · retrying in 3.2s',startedAt: 1_200,});});@@ -366,7 +366,7 @@ describe('getAssistantActiveTurnStatus', () => {it('keeps current provider retry liveness ahead of later generic content status', () => {const retryStatus = {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 3,retryAfterMs: 3200,@@ -400,7 +400,7 @@ describe('getAssistantActiveTurnStatus', () => {),).toEqual({type: 'retrying',- text: 'Provider connection failed before any output; retrying. · attempt 2/3 · retrying in 2.1s',+ text: 'Selected route connection failed before any output; retrying. · attempt 2/3 · retrying in 2.1s',startedAt: 1_200,});});@@ -414,7 +414,7 @@ describe('getAssistantActiveTurnStatus', () => {},{phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_100,},{@@ -540,7 +540,7 @@ describe('getAssistantActiveTurnStatus', () => {assistantMessage({workflowStatus: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 2,retryAfterMs: 200,@@ -552,7 +552,7 @@ describe('getAssistantActiveTurnStatus', () => {),).toEqual({type: 'retrying',- text: 'Provider connection failed before any output; retrying. · attempt 2/2 · retrying in 200ms',+ text: 'Selected route connection failed before any output; retrying. · attempt 2/2 · retrying in 200ms',startedAt,});});@@ -565,7 +565,7 @@ describe('getAssistantActiveTurnStatus', () => {assistantMessage({workflowStatus: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 2,retryAfterMs: 3200,@@ -578,7 +578,7 @@ describe('getAssistantActiveTurnStatus', () => {),).toEqual({type: 'retrying',- text: 'Provider connection failed before any output; retrying. · attempt 2/2 · retrying in 1.9s',+ text: 'Selected route connection failed before any output; retrying. · attempt 2/2 · retrying in 1.9s',startedAt,});});@@ -591,7 +591,7 @@ describe('getAssistantActiveTurnStatus', () => {assistantMessage({workflowStatus: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 2,retryAfterMs: 3200,@@ -604,7 +604,7 @@ describe('getAssistantActiveTurnStatus', () => {),).toEqual({type: 'retrying',- text: 'Provider connection failed before any output; retrying. · attempt 2/2 · retrying now',+ text: 'Selected route connection failed before any output; retrying. · attempt 2/2 · retrying now',startedAt,});});@@ -728,7 +728,7 @@ describe('getAssistantActiveTurnStatus', () => {isStreaming: true,workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_000,},streamEvents: [@@ -736,7 +736,7 @@ describe('getAssistantActiveTurnStatus', () => {type: 'workflow_status',workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_000,},startedAt: 1_000,@@ -789,7 +789,7 @@ describe('getAssistantActiveTurnStatus', () => {isStreaming: true,workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_000,},streamEvents: [@@ -797,7 +797,7 @@ describe('getAssistantActiveTurnStatus', () => {type: 'workflow_status',workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_000,},startedAt: 1_000,@@ -871,7 +871,7 @@ describe('getAssistantActiveTurnStatus', () => {assistantMessage({workflowStatus: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_000,},streamEvents: [diff --git a/frontend-modern/src/components/AI/Chat/__tests__/useChat.test.ts b/frontend-modern/src/components/AI/Chat/__tests__/useChat.test.tsindex 700c863376..a1c29a8984 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/useChat.test.ts+++ b/frontend-modern/src/components/AI/Chat/__tests__/useChat.test.ts@@ -209,7 +209,7 @@ describe('useChat', () => {workflowStatusHistory: [],workflowStatus: {phase: 'request_wait',- message: 'Assistant is starting the response.',+ message: 'Waiting for assistant.',},});expect(mockCreateSession).not.toHaveBeenCalled();@@ -242,7 +242,7 @@ describe('useChat', () => {isStreaming: true,workflowStatus: {phase: 'request_wait',- message: 'Assistant is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_000,},});@@ -250,14 +250,14 @@ describe('useChat', () => {await vi.advanceTimersByTimeAsync(899);expect(chat.messages()[1].workflowStatus).toMatchObject({phase: 'request_wait',- message: 'Assistant is starting the response.',+ message: 'Waiting for assistant.',});await vi.advanceTimersByTimeAsync(1);expect(chat.messages()[1]).toMatchObject({workflowStatus: {phase: 'request_wait',- message: 'Assistant is starting the response.',+ message: 'Waiting for assistant.',startedAt: 1_000,},streamEvents: [@@ -265,7 +265,7 @@ describe('useChat', () => {type: 'workflow_status',workflowStatus: expect.objectContaining({phase: 'request_wait',- message: 'Assistant is starting the response.',+ message: 'Waiting for assistant.',}),}),],@@ -362,7 +362,7 @@ describe('useChat', () => {workflowStatusHistory: [],workflowStatus: {phase: 'request_wait',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',},@@ -377,7 +377,7 @@ describe('useChat', () => {type: 'workflow_status',workflowStatus: expect.objectContaining({phase: 'request_wait',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',}),@@ -407,7 +407,7 @@ describe('useChat', () => {const assistant = chat.messages()[1];expect(assistant.workflowStatus).toMatchObject({phase: 'request_wait',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',startedAt: 2_000,@@ -422,7 +422,7 @@ describe('useChat', () => {type: 'workflow_status',workflowStatus: expect.objectContaining({phase: 'request_wait',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',}),@@ -1461,7 +1461,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,max_attempts: 2,retry_after_ms: 200,@@ -1472,7 +1472,7 @@ describe('useChat', () => {expect(assistant.workflowStatus).toEqual(expect.objectContaining({phase: 'provider_retry',- message: 'Provider connection failed before any output; retrying.',+ message: 'Selected route connection failed before any output; retrying.',attempt: 2,maxAttempts: 2,retryAfterMs: 200,@@ -1598,27 +1598,27 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',},});assistant = chat.messages().find((m) => m.role === 'assistant')!;expect(assistant.workflowStatus).toEqual(expect.objectContaining({- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',}),);expect(assistant.streamEvents).toEqual([expect.objectContaining({type: 'workflow_status',workflowStatus: expect.objectContaining({- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',}),}),]);expect(assistant.workflowStatusHistory?.map((status) => status.message)).toEqual(['Reading current Pulse inventory with pulse_query.','Built compact inventory context for the model.',- 'OpenRouter is starting the response.',+ 'Waiting for assistant.',]);dispose();@@ -1635,7 +1635,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',},@@ -1723,7 +1723,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',},@@ -1732,7 +1732,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',},@@ -1757,7 +1757,7 @@ describe('useChat', () => {type: 'workflow_status',workflowStatus: expect.objectContaining({phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',}),}),);@@ -1786,7 +1786,7 @@ describe('useChat', () => {type: 'workflow_status',workflowStatus: expect.objectContaining({phase: 'request_wait',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',provider: 'openrouter',model: 'openrouter:qwen/qwen3.7-plus',}),@@ -1805,7 +1805,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'DeepSeek is starting the response.',+ message: 'Waiting for assistant.',provider: 'deepseek',model: 'deepseek:deepseek-chat',},@@ -1847,7 +1847,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'DeepSeek is starting the response.',+ message: 'Waiting for assistant.',provider: 'deepseek',model: 'deepseek:deepseek-chat',},@@ -1922,7 +1922,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',},});fire({ type: 'content', data: 'Here is the answer.' });@@ -1939,7 +1939,7 @@ describe('useChat', () => {type: 'workflow_status',workflowStatus: expect.objectContaining({phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',}),}),);@@ -1992,7 +1992,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',},});fire({ type: 'tool_start', data: { id: 'tool-1', name: 'pulse_alerts', input: '{}' } });@@ -2876,7 +2876,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',},});fire({ type: 'content', data: 'partial response' });@@ -2944,7 +2944,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',},});fire({ type: 'content', data: 'partial response' });@@ -4130,7 +4130,7 @@ describe('useChat', () => {type: 'workflow_state',data: {phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',},});fire({ type: 'tool_start', data: { id: 'a', name: 'pulse_read', input: '{}' } });@@ -4157,7 +4157,7 @@ describe('useChat', () => {type: 'workflow_status',workflowStatus: expect.objectContaining({phase: 'provider_start',- message: 'OpenRouter is starting the response.',+ message: 'Waiting for assistant.',}),}),);diff --git a/frontend-modern/src/components/AI/Chat/hooks/useChat.ts b/frontend-modern/src/components/AI/Chat/hooks/useChat.tsindex 739aca88bc..ed5b03103c 100644--- a/frontend-modern/src/components/AI/Chat/hooks/useChat.ts+++ b/frontend-modern/src/components/AI/Chat/hooks/useChat.ts@@ -77,23 +77,13 @@ const routeAwareWorkflowStatusFields = (modelRoute?: string) => {};};-const routeProviderLabel = (modelRoute?: string) => {- const model = modelRoute?.trim() || '';- if (!model) return '';- const provider = getProviderFromModelId(model);- return provider ? getAIProviderDisplayName(provider) : '';-};-const createAssistantRouteStartWorkflowStatus = (modelRoute?: string,startedAt = Date.now(),): WorkflowStatus => {- const providerLabel = routeProviderLabel(modelRoute);return {phase: 'request_wait',- message: providerLabel- ? `${providerLabel} is starting the response.`- : 'Assistant is starting the response.',+ message: 'Waiting for assistant.',...routeAwareWorkflowStatusFields(modelRoute),startedAt,};diff --git a/internal/ai/chat/agentic.go b/internal/ai/chat/agentic.goindex 2d77818263..deb670af11 100644--- a/internal/ai/chat/agentic.go+++ b/internal/ai/chat/agentic.go@@ -122,18 +122,18 @@ func sessionFSMState(fsm *SessionFSM) string {func providerRetryStatusMessage(err error) string {if err == nil {- return "Provider stream interrupted before any output; retrying."+ return "Selected route stream interrupted before any output; retrying."}msg := strings.ToLower(strings.TrimSpace(err.Error()))switch {case strings.Contains(msg, "rate limit"), strings.Contains(msg, "too many requests"), strings.Contains(msg, "429"):- return "Provider is rate limiting the request; retrying."+ return "Selected route is rate limiting the request; retrying."case strings.Contains(msg, "timeout"), strings.Contains(msg, "timed out"), strings.Contains(msg, "deadline"):- return "Provider timed out before any output; retrying."+ return "Selected route timed out before any output; retrying."case strings.Contains(msg, "connection"), strings.Contains(msg, "broken pipe"), strings.Contains(msg, "eof"):- return "Provider connection failed before any output; retrying."+ return "Selected route connection failed before any output; retrying."default:- return "Provider stream interrupted before any output; retrying."+ return "Selected route stream interrupted before any output; retrying."}}diff --git a/internal/ai/chat/agentic_additional_test.go b/internal/ai/chat/agentic_additional_test.goindex 48230e0ea2..7400d4bdb2 100644--- a/internal/ai/chat/agentic_additional_test.go+++ b/internal/ai/chat/agentic_additional_test.go@@ -432,7 +432,7 @@ func TestAgenticLoop_RetriesProviderStreamBeforeEvents(t *testing.T) {if retry.RetryAfterMS != 200 {t.Fatalf("retry backoff = %dms, want 200ms", retry.RetryAfterMS)}- if retry.Message != "Provider connection failed before any output; retrying." {+ if retry.Message != "Selected route connection failed before any output; retrying." {t.Fatalf("retry message = %q", retry.Message)}if len(results) != 1 || results[0].Content != "hello" {diff --git a/internal/ai/chat/service.go b/internal/ai/chat/service.goindex a8dbfead36..a64eb4db4c 100644--- a/internal/ai/chat/service.go+++ b/internal/ai/chat/service.go@@ -867,7 +867,7 @@ func (s *Service) ExecuteStream(ctx context.Context, req ExecuteRequest, callbacemitWorkflowState(streamCallback,"provider_start",- fmt.Sprintf("%s is starting the response.", providerLabelForAttempt(attempt)),+ "Waiting for assistant.",sessionFSMState(sessionFSM),"",withWorkflowModelRoute(attempt.Model),@@ -3032,36 +3032,6 @@ func emitChatProviderError(callback StreamCallback, err error) {callback(StreamEvent{Type: "error", Data: data})}-func providerLabel(provider string) string {- switch strings.ToLower(strings.TrimSpace(provider)) {- case config.AIProviderAnthropic:- return "Anthropic"- case config.AIProviderOpenAI:- return "OpenAI"- case config.AIProviderOpenRouter:- return "OpenRouter"- case config.AIProviderDeepSeek:- return "DeepSeek"- case config.AIProviderGemini:- return "Gemini"- case config.AIProviderOllama:- return "Ollama"- default:- return provider- }-}--func providerLabelForAttempt(attempt chatProviderAttempt) string {- provider := ""- if strings.TrimSpace(attempt.Model) != "" {- provider, _ = config.ParseModelString(strings.TrimSpace(attempt.Model))- }- if strings.TrimSpace(provider) == "" {- return "the selected provider"- }- return providerLabel(provider)-}-func (s *Service) createPatrolProviderForModel(modelStr string) (providers.StreamingProvider, error) {if s.patrolProviderFactory != nil {return s.patrolProviderFactory(modelStr)diff --git a/internal/ai/chat/service_execute_additional_test.go b/internal/ai/chat/service_execute_additional_test.goindex b73c83d053..710492fb5a 100644--- a/internal/ai/chat/service_execute_additional_test.go+++ b/internal/ai/chat/service_execute_additional_test.go@@ -689,7 +689,7 @@ func TestService_ExecuteStream_EmitsProviderStartupBeforeProviderCall(t *testing}if data.Phase == "provider_start" {providerStartSeen.Store(true)- if data.Message != "OpenRouter is starting the response." {+ if data.Message != "Waiting for assistant." {t.Fatalf("provider_start message = %q", data.Message)}if data.Provider != config.AIProviderOpenRouter {diff --git a/internal/api/contract_test.go b/internal/api/contract_test.goindex 233d80d7c3..92372ae678 100644--- a/internal/api/contract_test.go+++ b/internal/api/contract_test.go@@ -3563,7 +3563,7 @@ func TestContract_AISettingsOllamaAuthJSONSnapshot(t *testing.T) {aiCfg := config.NewDefaultAIConfig()aiCfg.Enabled = true- aiCfg.Model = "openai:gpt-4o"+ aiCfg.Model = "ollama:llama3"aiCfg.PatrolModel = "ollama:llama3"aiCfg.OllamaBaseURL = "http://ollama.example:11434"aiCfg.OllamaUsername = "unai"@@ -10608,24 +10608,24 @@ func TestContract_ChatStreamEventJSONSnapshots(t *testing.T) {name: "workflow_state_provider_start",event: mustStreamEvent(t, "workflow_state", chat.WorkflowStateData{Phase: "provider_start",- Message: "OpenRouter is starting the response.",+ Message: "Waiting for assistant.",State: "investigating",Provider: "openrouter",Model: "openrouter:qwen/qwen3.7-plus",}),- want: `{"type":"workflow_state","data":{"phase":"provider_start","message":"OpenRouter is starting the response.","state":"investigating","provider":"openrouter","model":"openrouter:qwen/qwen3.7-plus"}}`,+ want: `{"type":"workflow_state","data":{"phase":"provider_start","message":"Waiting for assistant.","state":"investigating","provider":"openrouter","model":"openrouter:qwen/qwen3.7-plus"}}`,},{name: "workflow_state_provider_retry",event: mustStreamEvent(t, "workflow_state", chat.WorkflowStateData{Phase: "provider_retry",- Message: "Provider connection failed before any output; retrying.",+ Message: "Selected route connection failed before any output; retrying.",State: "investigating",Attempt: 2,MaxAttempts: 2,RetryAfterMS: 200,}),- want: `{"type":"workflow_state","data":{"phase":"provider_retry","message":"Provider connection failed before any output; retrying.","state":"investigating","attempt":2,"max_attempts":2,"retry_after_ms":200}}`,+ want: `{"type":"workflow_state","data":{"phase":"provider_retry","message":"Selected route connection failed before any output; retrying.","state":"investigating","attempt":2,"max_attempts":2,"retry_after_ms":200}}`,},{name: "workflow_state_stream_idle",diff --git a/scripts/release_control/subsystem_lookup_test.py b/scripts/release_control/subsystem_lookup_test.pyindex 3eb12dda11..295683521a 100644--- a/scripts/release_control/subsystem_lookup_test.py+++ b/scripts/release_control/subsystem_lookup_test.py@@ -2860,7 +2860,7 @@ class SubsystemLookupTest(unittest.TestCase):{"heading": "## Shared Boundaries","path": "internal/api/access_control_handlers.go",- "line": 436,+ "line": 440,"heading_line": 117,}],