Repository navigation
fix: Daybreak chats fail with unsupported Ultrafast settings - #164597
Conversation
Co-authored-by: VACInc <[email protected]>
Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 53aa4aa0-d107-4e08-8485-a5b43c3fdba3
|
🦞👀 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: needs maintainer review before merge. Reviewed October 4, 2026, 11:02 AM ET / 15:02 UTC (Revision 6). ClawSweeper reviewWhat this changesThe PR restricts unsupported Daybreak speed choices, safely retries rejected native OpenAI service tiers, and displays bounded, credential-redacted provider diagnostics. Merge readiness✅ Ready for maintainer review The PR remains useful because current main lacks the requested tier restrictions and recovery. No blocking correctness finding remains; the prior SDK approval concern is resolved by the documented compatible repair boundary. Priority: P1 Review scores
Verification
How this fits togetherOpenClaw combines provider capabilities and account observations to offer chat speed choices and construct model requests. The Responses transport handles provider rejection before returning replies or actionable errors to chat clients. flowchart TD
A[Saved speed preference] --> B[Provider tier policy]
B --> C[Chat speed controls]
B --> D[Model request]
D --> E[OpenAI Responses API]
E --> F[Safe rejection recovery]
F --> E
E --> G[Reply or diagnostic]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +519, Tests +878, Docs +34, Other 0. Total +1431 across 61 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one provider-owned tier policy shared by controls and requests, with conservative transport recovery and actionable literal diagnostics. Do we have a high-confidence way to reproduce the issue? Yes, the source path is clear: current main permits Daybreak Ultrafast requests, and the supplied configured-account evidence records the API rejecting that tier. This review did not execute a current-main reproduction. Is this the best way to solve the issue? Yes, the patch repairs the existing provider and recovery owners, preserves explicit overrides and saved preferences, and avoids introducing a competing settings path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e785c56d8207. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Co-authored-by: steipete <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Resolve main conflicts and preserve transport-owned recovery capability. Suppress wrapped and malformed provider response bodies. Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
The SDK design-acceptance item does not require a separate approval under the applicable repository rules. AGENTS.md explicitly says that in-task compatible SDK fixes under repair-and-land authority need no renewed approval. The SDK approval boundary requires acceptance for shortened compatibility windows, source-incompatible shipped types, or wider trust/authority/persistence boundaries. None applies here: The hosted build failure is real and separate: this PR retained a caller of the |
Preserve unrelated catalog response shapes and normalize dynamic tier preferences through the supported primitive API. Co-authored-by: steipete <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash auto-merge.
|
…w#164597) * fix: prevent unsupported Daybreak Ultrafast requests Co-authored-by: VACInc <[email protected]> * fix: Daybreak chats fail with unsupported Ultrafast settings Worked on by: - @VACInc Co-authored-by: VACInc <[email protected]> OpenClaw-Publication: 53aa4aa0-d107-4e08-8485-a5b43c3fdba3 * fix: recover rejected response tiers and expose provider diagnostics Co-authored-by: steipete <[email protected]> * fix(ui): scope rejected-tier display fallback to native API runs Co-authored-by: steipete <[email protected]> * test: assert actionable provider rejection diagnostics Co-authored-by: steipete <[email protected]> * fix: align tier handling with current SDK exports Preserve unrelated catalog response shapes and normalize dynamic tier preferences through the supported primitive API. Co-authored-by: steipete <[email protected]> --------- Co-authored-by: VACInc <[email protected]> Co-authored-by: steipete <[email protected]>
… Anthropic API-key routes (#168164) Backport of 77e2261 (#168164) adapted for 2026.10.2. Adaptations for the release line: - attempt-stream.ts: 10.1 predates installStreamWrapper (#166690); keep the direct session.agent.streamFn wrapping and split the compaction-replay repair (Responses or compactionReplayEnabled) from the Responses-only message transform, as on main. - Extract supportsNativeOpenAIResponsesEndpoint/isOfficialOpenAIResponsesBaseUrl into transports/openai-responses-endpoint.ts and re-export it from @openclaw/ai/internal/openai-responses-payload-policy, matching main's layout (introduced there by #164597) without pulling that feature in. - supportsClaudeServerCompaction delegates to supportsClaudeAdaptiveThinking, which is already id-based on 10.1 (main's ById split came with #167658). - Tests: keep release-only cases (context-management preservation, xAI opt-out, release gate rows without the removed purpose argument), export createRawSseResponse from the new Anthropic transport test-support. (cherry picked from commit 77e2261)
What Problem This Solves
Fixes: unsupported Ultrafast settings prevent Daybreak chats from replying, and provider validation failures hide the actual error behind misleading advice to start a new conversation.
User Impact
Daybreak Blue keeps Standard and Fast; Daybreak Red uses Standard. Unsupported choices are disabled, and stale preferences fall back consistently in controls and requests without rewriting saved preferences. Other native OpenAI tier rejections retry at a slower tier only before output, tool activity, or active-response steering.
Unrecovered validation failures show a bounded, credential-redacted provider diagnostic, such as “Invalid service_tier argument,” as literal text rather than the response body. Provider messages can include noncredential request-value excerpts; this change intentionally preserves the actual diagnostic. Known context, token-limit, and storage failures retain their recovery guidance.
Why This Change Was Made
One provider-owned tier policy feeds request construction and catalog projection. The existing Responses recovery owner handles explicit tier rejection across native SSE and WebSocket without replaying ambiguous failures or already-started output. Account-bound observations keep advertised tier choices accurate; current-main credential identity and harness filtering remain authoritative. No new setting, persistence format, or deployment change.
Explicit low-level serviceTier / service_tier overrides remain selectable; the native API's explicit rejection can trigger the same safe slower-tier recovery. Custom compatible endpoints and native Codex tier policy are unchanged.
Thanks @VACInc for the picker report and implementation direction, and @steipete for requesting actionable diagnostics and safe fallback.
The optional tier-policy hook reuses the existing fast-mode context and changes no trust, authority, persistence, configuration, or required host capability. Review-policy disposition.
Evidence
Final hosted CI passed for reviewed head
99e84015ee7a4896f9458370f3f3f95b245d85bc: run 37211130712. Native landing and cleanup are complete; merged ascc030e67a67d1fef8aadf74183be6718aa14ab3d.CI run 37209994121 exposed one integration build defect across four jobs: this caller still imported an SDK forward removed by main. It now uses the existing public normalizer; the retired export stays removed. The correction passed 17 tests / 2 files in 36.24 s and the full build in 7m 19.7s. A final scalar catalog-projection correction keeps unrelated response shapes unchanged: five existing cases first failed, then 108 tests / 9 files passed in 70.24 s. Fresh independent delta review is scoped-clean. Cancelled hosted coverage remains unrun, not green.
431 tests / 24 files passed, including real-browser component tests, on the consolidated patch in 62.53 s with one worker. The final two-file UI correction then passed 26 UI/component tests in 3.84 s, including three added harness-isolation cases; unchanged backend proof was reused.
Full build passed in 6m 0.4s; the complete changed-file static plan passed, including all 27 core test type graphs, UI/extension types, lint, SDK boundaries, and source guards. After the final UI-only correction, UI build, production types, all eight affected test type graphs, lint, and diff checks passed again.
Fresh cumulative P0–P2 review is scoped-clean after resolving status-prefixed/malformed diagnostic envelopes and custom-endpoint recovery display. Each accepted finding has a failing/passing regression.
Live SDK 7.23.0 proof on the current recovery source completed after one Ultrafast rejection and a Priority retry, with effective Default. No user conversation or credentials were logged.
Final UI build succeeded (9.17 s). Its report-only startup-JS budget is 373,519 B versus 373,454 B (+65 B); Actions treats these size limits as advisory. Startup CSS is also above its advisory target and remains 610 B below its hard ceiling. No budget baseline changed.
Prior CI run 37166590653 exposed stale generic-diagnostic assertions, now corrected and verified by 57 local tests (13.93 s), scoped types/lint, and independent review. Its two UI module-collection failures came from the unchanged tested base; the already-landed source-alias repair e25a9815 is now incorporated. The actual standalone UI entrypoint passes both formerly failing files (14 tests, 4.52 s), and the alias-owner contract passes 23 tests (10.50 s). This historical base attribution is source-derived, not an executed exact-base replay.
9 selected integration cases passed on configured blacksmith-testbox lease
tbx_01m4281f22g4vqwgm3ebf55eyj, with physical checkout and source hashes verified: seven native session-recovery cases, one queued error-delivery case, and one Workshop failure case. Run 37167781601, CLI exit 0; the one-shot lease is confirmed completed/stopped. Selected Vitest runs including runtime preparation took 664.18 s; the delegated command took 1178.571 s. The backing Actions run can show cancellation during owned lease cleanup; the wrapper receipt owns the proof result. Other cases were intentionally filtered, not claimed tested.Pre-refresh head
6cc3f2fpassed all CI and completed ClawSweeper review. Main then introduced two conflicts, now resolved at the existing owners. Replacement-head hosted checks remain a separate gate.Conflict refresh: 165 tests / 9 files passed in 67.98 s. Diagnostic corrections passed 137 tests / 4 files in 34.55 s, followed by the final diagnostic file (47 tests in 24.57 s, including compiler preparation). Eight new cases first failed on the original defects.
Route capability correction: 46 tests / 6 files passed in 37.34 s, including real-browser controls, selected-route metadata, and runtime isolation. Two custom-endpoint UI cases first failed before the correction. Recovery support is explicit transport-owned metadata, not inferred from provider/runtime names.
Historical live checks used the same configured OpenAI account: supported models completed with terminal Ultrafast, while Daybreak rejected that tier. Recovery sent an identical request except for service_tier, retried Ultrafast → Priority, and completed at effective Default. HTTP 200 / response.created alone was not counted as fulfillment.
Screenshots are actual Control UI captures with deterministic mock-Gateway data, not production conversation data. They prove visible states; separate API and transport tests prove recovery.
Before and after: Daybreak Blue
Before: the rejected Ultrafast option can be selected.
After: the stale preference resolves to Fast; Ultrafast is disabled.
Before and after: Daybreak Red
Before: the rejected Ultrafast option can be selected.
After: Standard is selected and unsupported speed choices are disabled.
Provider diagnostic before and after
Before
After
Single-worker focused test cost
Measured test-body execution per file (rounded Vitest milliseconds; import/setup and shared compiler preparation excluded). All are below five seconds. The full command wall time was 62.53 seconds.
extensions/openai/openai-provider.responses.test.tsextensions/openai/provider-fast-mode.test.tspackages/ai/src/transports/openai-responses-client.continuation.test.tspackages/ai/src/transports/openai-responses-client.pricing.test.tspackages/ai/src/transports/openai-responses-replay-internal.test.tspackages/ai/src/transports/openai-responses-service-tier.test.tspackages/ai/src/transports/openai-responses-websocket-client.test.tspackages/ai/src/transports/openai-responses-websocket.test.tssrc/agents/embedded-agent-helpers.formatassistanterrortext.test.tssrc/agents/embedded-agent-runner/run/payloads.errors.test.tssrc/agents/failover/assistant-request-failure-copy.test.tssrc/agents/failover/user-copy.test.tssrc/agents/model-catalog-service-tiers.test.tssrc/agents/model-fast-mode.test.tssrc/agents/openai-transport-stream.replay-and-tools.test.tssrc/auto-reply/reply/agent-runner-failure-reply.test.tssrc/gateway/chat-display-projection.provider-owner.test.tssrc/gateway/server-methods/models-list-result.service-tiers.test.tssrc/gateway/worker-environments/inference-runtime.service-tiers.test.tssrc/llm/providers/stream-wrappers/openai-service-tier-observation.test.tssrc/plugins/provider-policy-surface.test.tsui/src/lib/chat/model-select-state.service-tiers.test.tsui/src/pages/chat/components/chat-effort-picker.browser.test.tsui/src/pages/new-session/model-control.fast-mode.test.tspnpm test \ extensions/openai/openai-provider.responses.test.ts \ extensions/openai/provider-fast-mode.test.ts \ packages/ai/src/transports/openai-responses-replay-internal.test.ts \ packages/ai/src/transports/openai-responses-service-tier.test.ts \ packages/ai/src/transports/openai-responses-websocket-client.test.ts \ packages/ai/src/transports/openai-responses-websocket.test.ts \ src/agents/embedded-agent-helpers.formatassistanterrortext.test.ts \ src/agents/embedded-agent-runner/run/payloads.errors.test.ts \ src/agents/failover/assistant-request-failure-copy.test.ts \ src/agents/failover/user-copy.test.ts \ src/agents/model-catalog-service-tiers.test.ts \ src/agents/model-fast-mode.test.ts \ src/agents/openai-transport-stream.replay-and-tools.test.ts \ src/auto-reply/reply/agent-runner-failure-reply.test.ts \ src/gateway/chat-display-projection.provider-owner.test.ts \ src/gateway/server-methods/models-list-result.service-tiers.test.ts \ src/llm/providers/stream-wrappers/openai-service-tier-observation.test.ts \ src/plugins/provider-policy-surface.test.ts \ ui/src/lib/chat/model-select-state.service-tiers.test.ts \ ui/src/pages/chat/components/chat-effort-picker.browser.test.ts \ ui/src/pages/new-session/model-control.fast-mode.test.ts \ packages/ai/src/transports/openai-responses-client.continuation.test.ts \ packages/ai/src/transports/openai-responses-client.pricing.test.ts \ src/gateway/worker-environments/inference-runtime.service-tiers.test.ts \ --maxWorkers=1 --reporter=verboseCustom endpoint: preserve the actual wire preference
Real Control UI, synthetic Gateway data, 1200 × 800, dark theme. Before uses the original
6cc3f2fmodel-selection module; other UI, viewport and data are identical. A custom endpoint lacks native tier recovery, so saved Ultrafast must not appear as Fast. The unsupported selection stays visible so it can be changed.Before
After
Worked on by
Work sessions
View the OpenClaw team session