Skip to content

fix: explain when OpenAI voice needs an API key - #204200

Merged
hannesrudolph merged 11 commits into
openclaw:mainfrom
daniel-lxs:split-chatgpt-sign-in-speech-brfe9z
Nov 24, 2026
Merged

hannesrudolph merged 11 commits into
openclaw:mainfrom
daniel-lxs:split-chatgpt-sign-in-speech-brfe9z

Conversation

@daniel-lxs

@daniel-lxs daniel-lxs commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Related to #204128

What Problem This Solves

I can get text replies after choosing Sign in with ChatGPT. When OpenAI voice needs a separate API key, the Control UI can show a provider error or leave me without a next step.

User Impact

I show which API key is needed for Read aloud, Talk, Dictation, and recordings. Read aloud waits for the voice catalog to confirm the missing key before showing the notice. When the check finds no matching missing-key result, I show the provider error.

Configure opens Settings → Communications → Text-to-Speech for Read aloud and split Talk speech output. The existing TTS provider API-key field saves the credential synthesis reads. Transcription continues to open the provider in Settings → Models for the agent in that chat. The picker shares one Configure action when Talk and Dictation need the same key.

Before and after

Main shows the provider error beside the speaker button

The PR names the missing speech API key beside the speaker button

Configure opens the existing TTS provider API-key field

Why This Change Was Made

I raised the chat startup JavaScript gzip cap from 1,334,623 to 1,335,821 bytes to fit the five voice notices, following the measured-budget approach in #203448. The paired build measured 1,334,559 bytes on main and 1,335,714 bytes with this PR. Both used 21 requests.

Evidence

  • I ran 240 targeted tests, the UI typecheck, the formatter check, and the paired Control UI budget check. The Read aloud navigation regression fails when Configure opens Models and passes with the speech settings route.
  • I verified in the production Control UI that Read aloud and split Talk open Text-to-Speech. I used the existing form to save a synthetic key and verified that retrying Read aloud used the key at an isolated speech endpoint.
  • I checked that upgrading from published OpenClaw 2026.11.7 preserves existing settings and transcript entries. A new recording’s missing-key notice remains visible after reopening the conversation.
  • I did not test a real ChatGPT token or make a real OpenAI speech request.

… can't cover it

The Gateway marks voice providers whose saved sign-in the provider refuses for
voice (talk.catalog apiKeyRequired, models.authStatus voiceApiKeyRequired).
Talk, read aloud, dictation, recordings and Settings -> Models -> OpenAI show
one notice with Configure opening OpenAI's key, instead of raw provider errors.
@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling size: L labels Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Maintainer security review required

This external contributor PR changes sensitive security components. A maintainer must review these changes before merging.

Current SHA: 8fb65149d0c160ae19f821649ccfbe94809e906c

These sensitive security changes were made:

  • src/gateway/server-methods/models-auth-status.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server-methods/models-auth-status.types.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

After reviewing the changes, post a new PR comment containing only approval commands, each on its own line:

/allow-security-sensitive-change

A later push requires a fresh approval comment.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 23, 2026
@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Adds provider-specific API-key notices and Configure actions for Read aloud, Talk, Dictation, and failed recordings.

Example: A user with only Sign in with ChatGPT clicks Read aloud without an OpenAI speech API key.

  • Before: The reply shows “TTS conversion failed: openai: not configured”.
  • After: The reply explains that Read aloud needs an OpenAI API key, and Configure opens Text-to-Speech settings.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, visibly demonstrated recovery guidance with the prior defect repaired; it delivers only the guidance portion of the related audio capability request.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Control UI screenshots demonstrate the changed Read aloud notice and TTS settings destination; the body records synthetic-key recovery through an isolated speech endpoint and preservation of settings and transcripts after upgrading from v2026.11.7.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: Voice actions can fail after successful ChatGPT text sign-in without explaining which additional credential the user needs.
Reason: The maintainer-authored direction provides useful recovery while correctly leaving the broader same-sign-in audio request open.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR provides useful voice credential recovery guidance. The previous navigation finding is resolved, and no new actionable defects were found; current-head security approval remains required.

Priority: P2
Reviewed head: 8fb65149d0c160ae19f821649ccfbe94809e906c

Before merge

  • Await maintainer action - A maintainer must review and approve the security-sensitive changes at 8fb6514.

Findings

None.

Agent review details

How this fits together

Gateway speech and transcription owners report credential readiness and observed failures; Control UI turns those facts into scoped recovery actions, while the transcript owner persists recording failure metadata.

flowchart LR
  A[Voice action] --> B[Gateway speech and transcription]
  B --> C[Existing provider auth policy]
  B --> D[Readiness and failure facts]
  D --> E[Control UI notices]
  D --> F[Transcript metadata]
  E --> G[Existing credential settings]
Loading

Technical review

Best possible solution:

Ship the scoped recovery guidance through existing speech and model credential settings while retaining the separate SIWC audio capability tracker.

Do we have a high-confidence way to reproduce the issue?

Current-main error handling and the supplied before screenshot establish the unconfigured-speech error without an actionable credential destination; no target code was executed during this review.

Is this the best way to solve the issue?

The patch reuses provider policy, readiness, transcript persistence, and existing settings owners, and the latest navigation repair points speech recovery at a credential source synthesis consumes.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f1debfde108a.

Provenance checked

  • OpenAI credential eligibility keeps the original intent (1067523: Prevent SIWC credentials from being selected for unsupported media operations while retaining separately compatible credentials.)
  • Speech and dictation ownership keeps the original intent (c4649b0: Use configured Gateway speech services and session-scoped transcription without creating competing speech owners.)
  • Read aloud error presentation keeps the original intent (996fc33: Present rejected playback attempts through a narrow error boundary while retaining controls and retry behavior.)
  • Media failure reporting keeps the original intent (637f0c8: Carry the actual provider failure into attachment diagnostics without exposing response bodies or credentials.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +531, Tests +209, Other +5. Total +745 across 42 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 32 732 201 +531
Tests 7 212 3 +209
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 7 2 +5
Total 42 951 206 +745

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Chat startup JavaScript budget 1,334,623 → 1,335,821 gzip bytes The maintainer-authored PR records paired measurements of 1,334,559 bytes on main and 1,335,714 bytes with the notices, with the same request count.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: ⏳ waiting on maintainer.

Label justifications:

  • P2: Provides actionable recovery for unavailable voice features while text chat remains usable.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (4 earlier review cycles)
  • reviewed 2026-11-23T19:41:50.440Z sha 8b918ef :: blocked before merge. :: [P2] Scope published voice state to the consuming pane | [P2] Select credential guidance from the effective voice provider | [P2] Show recording failures from the recording's actual result | [P2] Preserve real exports in the new navigation mock
  • reviewed 2026-11-23T20:26:55.527Z sha a77ea8f :: blocked before merge. :: [P2] Use the effective general TTS provider for split Talk guidance
  • reviewed 2026-11-23T20:57:07.353Z sha c6f794a :: blocked before merge. :: none
  • reviewed 2026-11-24T00:02:00.699Z sha 0941f39 :: blocked before merge. :: [P2] [P2] Point speech Configure at a credential source speech consumes

Reviewed November 23, 2026, 8:06 PM ET / November 24, 2026, 01:06 UTC (Revision 5).

@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 23, 2026
@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 24, 2026
@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 24, 2026
@hannesrudolph
hannesrudolph merged commit 86fcb81 into openclaw:main Nov 24, 2026
253 of 275 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 24, 2026
* feat(ui): point voice to the OpenAI API key when Sign in with ChatGPT can't cover it

The Gateway marks voice providers whose saved sign-in the provider refuses for
voice (talk.catalog apiKeyRequired, models.authStatus voiceApiKeyRequired).
Talk, read aloud, dictation, recordings and Settings -> Models -> OpenAI show
one notice with Configure opening OpenAI's key, instead of raw provider errors.

* perf(ui): simplify voice notices and fit the chat boot budget

* fix(ui): show the Read aloud key notice as chat feedback

* fix(ui): bind voice guidance to the pane and recorded outcome

* fix(ui): use the selected speech and dictation in Talk mode

* fix: avoid shadowing the audio settings binding

* fix(ui): use the effective TTS provider for split Talk guidance

* fix(ui): keep voice API key guidance beside Read aloud

* fix(ui): clarify voice API key guidance

* fix(ui): route speech API key help to Text-to-Speech
obviyus added a commit that referenced this pull request Nov 24, 2026
#204389)

## Result

The `check-dependencies` job on `main` passes again. It has been red since #204200 (first red: scheduled run 45319833099 on a21974c). Knip reported a false unused export:

```
Unused exports are not allowed:
  ui/src/pages/chat/components/chat-read-aloud-status.tsx: RecordingApiKeyNotice
```

## Cause

`RecordingApiKeyNotice` has one real production consumer: `chat-message-bubble-view.tsx` loads it with `lazy(() => import("./chat-read-aloud-status.tsx"), { export: "RecordingApiKeyNotice" })`. Solid selects the export by a string, which Knip cannot see. `config/knip-vite-consumers.mjs` modeled that pattern for exactly one hard-coded loader (`settings-sidebar-lazy.tsx`). Every other lazy named-export loader either had an ignore entry or broke the gate, as this one did.

## Change

The consumer model now derives a named import edge from every non-test UI source file that contains a `lazy(() => import("…"), { export: "…" })` loader. A new loader needs no registration, and deleting a loader still removes its edge, so a truly unused export is still reported.

## Evidence

- `check-deadcode-exports.test.ts`: 36 passed. The updated case (two loaders in different directories, test files excluded, deleted loader dropped) fails on `main`.
- `pnpm deadcode:report` on this head: script, production and full-tree Knip reports all pass. On `main`, the production and full-tree reports fail with the error above.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 25, 2026
openclaw#204389)

## Result

The `check-dependencies` job on `main` passes again. It has been red since openclaw#204200 (first red: scheduled run 45319833099 on 1461dee). Knip reported a false unused export:

```
Unused exports are not allowed:
  ui/src/pages/chat/components/chat-read-aloud-status.tsx: RecordingApiKeyNotice
```

## Cause

`RecordingApiKeyNotice` has one real production consumer: `chat-message-bubble-view.tsx` loads it with `lazy(() => import("./chat-read-aloud-status.tsx"), { export: "RecordingApiKeyNotice" })`. Solid selects the export by a string, which Knip cannot see. `config/knip-vite-consumers.mjs` modeled that pattern for exactly one hard-coded loader (`settings-sidebar-lazy.tsx`). Every other lazy named-export loader either had an ignore entry or broke the gate, as this one did.

## Change

The consumer model now derives a named import edge from every non-test UI source file that contains a `lazy(() => import("…"), { export: "…" })` loader. A new loader needs no registration, and deleting a loader still removes its edge, so a truly unused export is still reported.

## Evidence

- `check-deadcode-exports.test.ts`: 36 passed. The updated case (two loaders in different directories, test files excluded, deleted loader dropped) fails on `main`.
- `pnpm deadcode:report` on this head: script, production and full-tree Knip reports all pass. On `main`, the production and full-tree reports fail with the error above.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts security-review-required security-sensitive-changed size: XL status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet