Repository navigation
fix(ui): failed replies say which provider rejected the credentials - #193996
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThe PR preserves provider failure classifications and shows credential or billing problems with an Open Models action. Example: The fixture provider rejects the configured key with HTTP 401.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain Keep open: this maintainer-authored PR addresses a concrete recovery problem, but packaging, E2E readiness, and bundle-budget failures need repair. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherAgent lifecycle observations enter the session recorder, become saved transcript notices, and pass through Gateway display projection into Control UI recovery controls. flowchart LR
A[Provider rejection] --> B[Agent error observation]
B --> C[Session lifecycle projection]
C --> D[Saved failure notice]
D --> E[Gateway display projection]
E --> F[Chat failure line]
F --> G[Models settings]
Technical reviewBest possible solution: Retain the existing recorder, display projection, and provider navigation while repairing the wrapper inventory, browser readiness wait, and bundle growth. Do we have a high-confidence way to reproduce the issue? Current-main source drops the provider classification from saved failure notices, and the supplied before screenshot shows the resulting generic failure line. Is this the best way to solve the issue? Preserving the existing classification through the owning recorder is a focused solution; the added tests cover distinct credential, billing, and unchanged transient-failure behavior. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 530ea65a5782. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +126, Tests +173. Total +299 across 17 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 6, 2026, 1:41 AM ET / 06:41 UTC. |
9d37de6 to
18fcdb5
Compare
4b8612b to
9adb9b9
Compare
A reply that failed because the provider rejected the saved key, or reported a billing problem, now names the provider on the failure line and offers Open Models at that provider. Try again stays available as a secondary action. The run's existing error observation (provider, failover reason) is recorded with the failure notice, so the cause survives a reload. Co-authored-by: obviyus <[email protected]>
… budgets The lifecycle projection passes the raw error observation and the failure recorder bounds it, so the scripts/pr closure is unchanged. The shared reader bounds the cause without importing the full failover reason list. Phone widths give a failure's title its own line using the existing rules. Adds the test-lines allocation for the new contract tests. Co-authored-by: obviyus <[email protected]>
The notice reads the application context and opens Models at the provider directly, so no callback is threaded through the chat pane. This keeps the chat boot bundle within its cap. Co-authored-by: obviyus <[email protected]>
Approved by Ayaan Zaidi: +1 KiB for naming a failed reply's provider cause and offering Open Models on the failure line. Co-authored-by: obviyus <[email protected]>
Use the shared chat Gateway fixture (no bundled plugins, no catalog refresh) instead of a full Gateway, and wait out the Gateway's "assets are still preparing" reply before taking the dashboard handoff. Co-authored-by: obviyus <[email protected]>
The serial-standalone CI shard does not build dist/, so use the fixture's default launcher instead of pinning dist/index.js. Co-authored-by: obviyus <[email protected]>
9adb9b9 to
28597cb
Compare
|
Merged via squash.
|
…penclaw#193996) * fix(ui): say which provider rejected a failed reply's credentials A reply that failed because the provider rejected the saved key, or reported a billing problem, now names the provider on the failure line and offers Open Models at that provider. Try again stays available as a secondary action. The run's existing error observation (provider, failover reason) is recorded with the failure notice, so the cause survives a reload. Co-authored-by: obviyus <[email protected]> * fix(ui): keep the failure cause out of the PR wrapper and inside size budgets The lifecycle projection passes the raw error observation and the failure recorder bounds it, so the scripts/pr closure is unchanged. The shared reader bounds the cause without importing the full failover reason list. Phone widths give a failure's title its own line using the existing rules. Adds the test-lines allocation for the new contract tests. Co-authored-by: obviyus <[email protected]> * fix(ui): open Models from the failure notice itself The notice reads the application context and opens Models at the provider directly, so no callback is threaded through the chat pane. This keeps the chat boot bundle within its cap. Co-authored-by: obviyus <[email protected]> * chore(ui): raise the chat boot budget for failed-reply causes Approved by Ayaan Zaidi: +1 KiB for naming a failed reply's provider cause and offering Open Models on the failure line. Co-authored-by: obviyus <[email protected]> * test(ui): start the failure-cause E2E with the lean chat Gateway Use the shared chat Gateway fixture (no bundled plugins, no catalog refresh) instead of a full Gateway, and wait out the Gateway's "assets are still preparing" reply before taking the dashboard handoff. Co-authored-by: obviyus <[email protected]> * test(ui): let the failure-cause E2E prepare its own Gateway entrypoint The serial-standalone CI shard does not build dist/, so use the fixture's default launcher instead of pinning dist/index.js. Co-authored-by: obviyus <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes: when a reply fails because the provider rejected the saved API key (or reported a billing problem), chat only says "Couldn't finish this reply" and offers Try again. The cause is hidden behind the chevron, and retrying can't help.
User Impact
The failure line names the provider and the problem, for example "Fixture didn't accept the saved credentials" or "OpenRouter reports a billing problem". Open Models opens that provider in Models, and Try again stays as a secondary action. The cause still shows after a reload. Other failures are unchanged.
Why This Change Was Made
The run already classifies the failure: its error observation has the provider and failover reason. That was used only for the live error event and dropped from the stored failure notice. The notice now records those two facts, bounded to a known reason and a short provider id, and the failure line uses them for auth, auth_permanent and billing failures. On phone widths the named cause gets its own line above the actions, so it isn't squeezed out.
Evidence
Real Gateway with a provider that returns 401 for the configured key (
chat-provider-failure-cause.real-gateway.e2e.test.ts):Before (main): the cause is hidden and Try again is the only primary action.
After: the provider and cause are on the line, with Open Models.
Phone width:
/settings/model-providers?provider=fixture. On main the line reads "Couldn't finish this reply".check:changedis green except the changelog-attribution check, which also fails on main.