Repository navigation
improve(talk): live transcription uses a saved Deepgram, ElevenLabs or Mistral API key - #199858
Conversation
…tral live transcription Live transcription for these three providers read its key only from the Voice Call streaming config and the environment, while voice notes and the OpenAI and xAI live providers also read the provider's saved API key. When the config and the environment have no key, the three providers look up the saved API key, the same lookup the OpenAI and xAI live providers use. A config or environment key is used as before and the saved key is not read. With no key anywhere, "API key missing" is reported when the session connects instead of when it is created, because the saved key is looked up asynchronously. Callers check isConfiguredAsync first and handle a failed connect.
Deepgram, ElevenLabs and Mistral live transcription count their saved API key only when config or the request names the provider. Automatic selection among candidates sees the same readiness as without a saved key, so it picks the same provider. The selection owners (Gateway Talk, the capability provider selection helper that Voice Call uses, and the meeting bot) pass `selectedExplicitly` in the readiness context when a provider is named.
|
🦞👀 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: ready, awaiting a maintainer decision. What this changesExplicitly selected Deepgram, ElevenLabs, and Mistral live transcription providers can use saved API keys after existing credential sources. Example: streaming.provider is deepgram, with only a saved Deepgram API key.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⏳ Ready, awaiting maintainer decision Keep open: this PR supplies a distinct, demonstrated credential-reuse feature with no concrete introduced bug found; SDK owner acceptance and successful exact-head CI remain outstanding. Priority: P3 Decision needed
Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherTalk, Voice Call, and meeting-bot selection pass readiness context to provider plugins, which obtain credentials from existing host auth operations and connect through the shared WebSocket transport. flowchart LR
A[Talk Voice Call and meetings] --> B[Provider selection]
B --> C[Transcription provider plugin]
D[Config and environment keys] --> C
E[Host saved credential resolver] --> C
C --> F[Shared WebSocket transport]
F --> G[Transcription endpoint]
Technical reviewBest possible solution: Reuse the existing provider factories and host credential resolver, preserving current selection and credential precedence, subject to owner acceptance of the additive SDK context. Do we have a high-confidence way to reproduce the issue? Current-main source and the contributor's paired Gateway captures establish that saved-only credentials are unavailable to these live providers; no target code was executed during this review. Is this the best way to solve the issue? The implementation uses existing plugin, auth, selection, and transport owners without adding parallel machinery, and its explicit-selection flag preserves the demonstrated automatic-selection behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7d90a907c0de. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +100, Tests +189, Docs +12. Total +301 across 24 files. Added test files: 2. 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. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 HistoryReview history (1 earlier review cycle)
Reviewed November 15, 2026, 8:41 PM ET / November 16, 2026, 01:41 UTC (Revision 2). |
…y when named The fixture provider is ready only when it is told it was selected explicitly. Media streaming starts when `streaming.provider` names it and stays off under automatic selection.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
This reverts commit 70322ea. The label is outside this change's purpose and no screen shows it today.
…r Mistral API key (openclaw#199858) * feat(providers): use a saved API key for Deepgram, ElevenLabs and Mistral live transcription Live transcription for these three providers read its key only from the Voice Call streaming config and the environment, while voice notes and the OpenAI and xAI live providers also read the provider's saved API key. When the config and the environment have no key, the three providers look up the saved API key, the same lookup the OpenAI and xAI live providers use. A config or environment key is used as before and the saved key is not read. With no key anywhere, "API key missing" is reported when the session connects instead of when it is created, because the saved key is looked up asynchronously. Callers check isConfiguredAsync first and handle a failed connect. * fix(ui): show ElevenLabs with its brand capitalization * fix(talk): count a saved transcription key only for the named provider Deepgram, ElevenLabs and Mistral live transcription count their saved API key only when config or the request names the provider. Automatic selection among candidates sees the same readiness as without a saved key, so it picks the same provider. The selection owners (Gateway Talk, the capability provider selection helper that Voice Call uses, and the meeting bot) pass `selectedExplicitly` in the readiness context when a provider is named. * test(voice-call): show the streaming outcome for a provider ready only when named The fixture provider is ready only when it is told it was selected explicitly. Media streaming starts when `streaming.provider` names it and stays off under automatic selection. * revert(ui): leave the ElevenLabs display label as it is This reverts commit 70322ea. The label is outside this change's purpose and no screen shows it today.
…r Mistral API key (openclaw#199858) * feat(providers): use a saved API key for Deepgram, ElevenLabs and Mistral live transcription Live transcription for these three providers read its key only from the Voice Call streaming config and the environment, while voice notes and the OpenAI and xAI live providers also read the provider's saved API key. When the config and the environment have no key, the three providers look up the saved API key, the same lookup the OpenAI and xAI live providers use. A config or environment key is used as before and the saved key is not read. With no key anywhere, "API key missing" is reported when the session connects instead of when it is created, because the saved key is looked up asynchronously. Callers check isConfiguredAsync first and handle a failed connect. * fix(ui): show ElevenLabs with its brand capitalization * fix(talk): count a saved transcription key only for the named provider Deepgram, ElevenLabs and Mistral live transcription count their saved API key only when config or the request names the provider. Automatic selection among candidates sees the same readiness as without a saved key, so it picks the same provider. The selection owners (Gateway Talk, the capability provider selection helper that Voice Call uses, and the meeting bot) pass `selectedExplicitly` in the readiness context when a provider is named. * test(voice-call): show the streaming outcome for a provider ready only when named The fixture provider is ready only when it is told it was selected explicitly. Media streaming starts when `streaming.provider` names it and stays off under automatic selection. * revert(ui): leave the ElevenLabs display label as it is This reverts commit 70322ea. The label is outside this change's purpose and no screen shows it today. (cherry picked from commit d275ff6) Release adaptation: Use the existing provider-types context owner instead of importing an absent extracted module; preserve synchronous session creation, config/environment precedence and automatic selection. Adapt Deepgram documentation to the release owner. Provider baselines reproduce six failures; fixed media 32, Mistral 18, Voice Call 27, selection 7, Gateway 1 and meeting 1 pass. Live provider qualification remains outstanding. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 42b5318700bbd56a994938f5fc52638a6b1833e8)
Closes #199684
What Problem This Solves
Live transcription with Deepgram, ElevenLabs or Mistral reads its API key only from the Voice Call streaming config or the Gateway's environment. A key for the same provider that is already saved in OpenClaw, the one voice notes use, is not used there, so it has to be entered a second time.
User Impact
When Deepgram, ElevenLabs or Mistral is the named live transcription provider and has no key in the Voice Call streaming config or the environment, it uses the provider's saved API key. A key saved with
openclaw models auth paste-api-key --provider deepgram(or, for Mistral, in Settings → Models) is then enough.A provider is named by any of these:
plugins.entries.voice-call.config.streaming.provider(Talk and Voice Call)realtime.transcriptionProvider, for exampleplugins.entries.google-meet.config.realtime.transcriptionProviderprovidera client passes totalk.session.createApart from the two changes listed below, every setup behaves as on
main:DEEPGRAM_API_KEY;ELEVENLABS_API_KEYorXI_API_KEY;MISTRAL_API_KEY), then the saved key. When the config or the environment has a key, the saved key is not looked up.main, and a provider that has only a saved key is never picked ahead of one that has a config or environment key.agents.defaults.voiceModelis tried as a candidate, not as a named provider. With only a saved key it stays "not ready" there, as onmain.main.What changes:
talk.cataloglists it as configured.main, it refuses the session with "not configured". The Talk relay, Voice Call and the meeting bot all checkisConfiguredAsyncfirst and handle a failed connect.Plugin SDK, additive only:
RealtimeTranscriptionProviderConfiguredContext, the argument of a live transcription provider'sisConfiguredAsync, gains an optional booleanselectedExplicitly.resolveConfiguredCapabilityProviderAsyncand its deprecated synchronous twin passselectedExplicitlyto theirisProviderConfiguredcallback.main.Not in this PR: a place in the Control UI to enter a Deepgram or ElevenLabs key, any config option, any protocol change. The saved key is read from the default agent's store, as the OpenAI and xAI live providers do, so a key saved only for another agent is not used.
Why This Change Was Made
One saved key should serve both voice notes and live transcription. The OpenAI and xAI live transcription providers already fall back to the provider's saved API key (its auth profile). Deepgram, ElevenLabs and Mistral take the same lookup, after their existing key sources, and only for saved API keys (not token or OAuth profiles).
The saved key counts only for a named provider, so it cannot change which provider automatic selection picks. A provider's readiness is a single boolean and its
autoSelectOrderis fixed, so a provider cannot tell "I am the named provider" from "I am one of several candidates" unless the caller says so.selectedExplicitlyis that statement, and it is opt-in: without it, readiness is what it is onmain.Evidence
Real behavior on a built Gateway
An isolated Gateway built from
main(the PR's merge base) and one built from this branch ran the same scenario script. The Deepgram, ElevenLabs and Mistral endpoints were replaced by local WebSocket stand-ins that log the credential they receive, and every key is made up. No real provider key or service was used.Settings → Talk, with Deepgram named in
streaming.providerand only a saved Deepgram key:mainWhat the Gateway did, with the same result for Deepgram, ElevenLabs and Mistral in the first four rows:
maintalk.session.createrefused, no connectionopenclaw models auth paste-api-key)streaming.providers, none named,ELEVENLABS_API_KEYsetCaptured output of the scenario script on
main(key lines)Captured output of the scenario script on this branch (key lines)
Tests
The focused tests (80 in 6 files), run against the production code on
mainand on this branch:main9 of the 80 fail on
main's code and all 80 pass on this branch: the saved-key test and the no-key test of each provider (6), and the named case of each of the three selection owners (3). The other 71 pass on both, including the 7 key-precedence cases (ElevenLabs has two environment variables).The 80 are Deepgram 18, ElevenLabs 15, Mistral 18, Gateway Talk selection 1, meeting bot selection 1 and Voice Call webhook 27. 391 tests in 29 files that consume the changed code pass: the Talk catalog and session handlers, the transcription relay, the meeting bot, Voice Call media streaming, the SDK selection helper and its other caller, the capability catalog contract, plugin loading, and the three plugins' other tests. Typecheck (core, extensions, and the test projects that hold the changed tests), lint, formatting and the test-line budget (+189 lines of the 400 allowed) pass. The full suite was not run locally.
Three existing tests assert the "no key" error at connect instead of at creation, following change 2 above: Deepgram's
DEEPGRAM_API_KEYvalidation case, ElevenLabs "rejects whitespace-only environment keys", and Mistral "requires an API key".Size: production +141 and -41 lines, tests +197 and -8, docs +38 and -26 (the API key row and one note on each of the three provider pages, and one sentence in the Talk docs).
Gaps:
pnpm plugin-sdk:api:diffwas not run locally. It will list the optionalselectedExplicitlyfield and the added callback argument.