feat(xai): add realtime voice provider#99088
Conversation
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes are blockedOpenClaw does not accept dependency graph changes through PRs unless a repository admin or security explicitly authorizes the current head SHA. Dependency updates are generated internally by maintainers so external PRs cannot change the resolved graph. Detected dependency graph changes:
Auto-scrub was not attempted because this PR changes package manifest dependency graph fields:
Dependency graph changes must be reviewed by security or handled by maintainers internally. Please remove lockfile changes manually if they are not needed. To remove lockfile changes, restore them from the target branch: git fetch origin
git checkout 'origin/main' -- 'pnpm-lock.yaml'
git commit -m 'chore: remove dependency lockfile change'
git pushIf this PR intentionally needs a dependency graph change, ask a repository admin or member of The action will approve the current head SHA ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 870d0cfa97
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs real behavior proof before merge. Reviewed July 10, 2026, 3:20 PM ET / 19:20 UTC. Summary PR surface: Source +1269, Tests +1678, Docs +59, Config 0, Other 0. Total +3006 across 12 files. Reproducibility: not applicable. as a bug reproduction; current main clearly lacks the requested provider, while the PR supplies source coverage and prior live smoke for the proposed capability. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Rebase onto current main, retain the plugin-owned xAI bridge and provider-neutral relay clear semantics, publish redacted exact-head Talk proof covering audio, transcripts, a tool round trip, barge-in, and close or resumed reconnect behavior, then obtain maintainer approval for the config surface and trusted authorization or regeneration of the dependency graph. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction; current main clearly lacks the requested provider, while the PR supplies source coverage and prior live smoke for the proposed capability. Is this the best way to solve the issue? Yes on architecture: the existing xAI plugin plus generic Talk gateway-relay seam is the narrowest maintainable ownership boundary; merge still requires exact-head proof and maintainer acceptance of the public config and dependency contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e1934d968e43. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1269, Tests +1678, Docs +59, Config 0, Other 0. Total +3006 across 12 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (11 earlier review cycles; latest 8 shown)
|
870d0cf to
b6f54f2
Compare
|
Follow-up pushed for the ClawSweeper/Codex review finding. What changed:
Current-head proof: Dependency guard note: the remaining dependency-graph block is expected and maintainer/security-owned because @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6f54f2801
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Follow-up pushed at current head This addresses the remaining ClawSweeper/Codex feedback together:
Fresh current-head validation: The dependency guard remains expected and maintainer/security-owned for the current head SHA because this PR intentionally changes the xAI runtime dependency metadata for @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
9cafc3c to
e484c09
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(xai): add realtime voice provider This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Superseded by #106267, which preserves @TheAngryPit’s contributor credit and landed the canonical xAI realtime Talk implementation in The landed version keeps xAI auth, session configuration, events, tools, server VAD, reconnect, and resumption in the xAI plugin while core and clients carry only generic realtime relay contracts. Exact-head release gate 29248320992 passed all 117 jobs, and authenticated live proof covered real audio, tool results, barge-in, reconnect, and resumed context. Closing this older ancestry-noisy branch as superseded. Thank you, Vitor, for the original implementation and the sustained review iterations. |
What Problem This Solves
OpenClaw Talk already has a realtime provider contract and gateway-relay path, but the bundled xAI plugin did not expose Grok Voice Agent as a native realtime voice provider.
Without this, users who want xAI/Grok voice in OpenClaw either cannot use it through Talk or have to fall back to a lower-quality STT -> model -> TTS loop. That is especially limiting for long-running assistants where supplier choice and realtime voice cost matter.
Closes #99087.
Why This Change Was Made
This adds one canonical bundled xAI realtime voice provider through the existing Talk
gateway-relaycontract instead of creating a separate voice stack.The provider:
grok-voice-latest) over WebSocket;registerRealtimeVoiceProviderseam;The follow-up commits address the ClawSweeper/Codex review findings:
response.cancelplusconversation.item.truncate;input_audio_transcription.updatedevents are treated as cumulative replacements and emitted once on completion;onReady/greeting callbacks;sessionResumption;session.resumption.enabled=trueand fail closed on disconnect instead of silently starting a fresh provider conversation.Dependency note:
wsis intentionally moved into the xAI runtime dependency set because the new provider imports it at runtime. The repository dependency guard correctly requires maintainer/security approval for the exact head SHA or a maintainer-owned regeneration path. This PR does not try to bypass that policy.User Impact
Users selecting xAI realtime Talk get native Grok voice replies through the existing OpenClaw Talk relay path rather than a synthetic STT/TTS loop.
Expected behavior:
provider: "xai"withtransport: "gateway-relay".sessionResumption: trueis configured.This is intentionally scoped to the xAI realtime voice provider and Talk relay integration. It does not weaken gateway auth and does not include secrets or production token values.
Evidence
Prior published validation head (superseded by the transcript checkpoint below):
Prior published proof retained for continuity:
Live Windows + WSL smoke proof already captured for the xAI gateway-relay voice path:
Workflow note:
Agent Transcript
Sanitized worklog for PR #99088: xAI realtime voice provider
Goal
Add xAI realtime voice through OpenClaw's existing realtime voice provider and gateway relay contracts, while preserving the expanded official xAI provider now present on upstream
main.Continuity of work
This transcript is the latest checkpoint in a multi-day implementation and review effort, not a single-session change. Work on the PR was already active by July 3, 2026, when the branch had been rebased, provider tests were passing, and the external-contributor dependency gate was documented. Subsequent review rounds addressed barge-in truncation, assistant transcript buffering, reconnect behavior, delayed tool-result ownership, and relay cancellation. The July 10 pass rebased that accumulated work onto the official bundled xAI provider and re-proved the resulting integration.
Decisions and implementation
main.Failed-first proof and correction
chat.abortand closed the session without submitting the synthetic cancellation result to the provider.git diff --checkpassed.Remaining gate
No secrets, credentials, raw prompts, private paths, or raw tool output are included.