dograh/ui
Tararais a2240db45a
feat(tts): add xAI as a Voice (TTS) provider (#476)
* feat(tts): add xAI as a Voice (TTS) provider

pipecat already ships an xAI TTS service (XAITTSService, WebSocket
streaming) but dograh never wired it into the service configuration, so
xAI could not be selected as a Voice provider in the cascading pipeline.

Wire it through:
- registry: ServiceProviders.XAI + XAITTSConfiguration (voices
  eve/ara/leo/rex/sal, language, computed model) registered in TTSConfig
- service_factory: build XAITTSService in create_tts_service
- check_validity: api-key validation hook
- tests for the factory + docs

The Voice provider dropdown is schema-driven, so xAI appears with no UI
changes.

* fix(tts): validate xAI API key and drop misleading auto-language hint

Addresses review feedback on the xAI Voice provider:

- check_validity: replace the no-op xAI key check with real validation
  against xAI's OpenAI-compatible API (models.list on https://api.x.ai/v1),
  so a bad BYOK key is caught at configuration time instead of at call time.
- registry: remove the "auto" language hint from the field description.
  pipecat's Language enum has no "auto" member, so the factory fell back to
  English silently; the description no longer advertises detection we don't do.
- tests: cover xAI key validation (registered, accepts valid, rejects bad).

* fix(tts): validate xAI key against the TTS voices endpoint

xAI supports endpoint-scoped API keys, so a key scoped to Text-to-Speech
may lack the /v1/models ACL and would be wrongly rejected by the previous
models.list() check. Validate against GET /v1/tts/voices instead — the
scope the key actually needs for TTS — treating 401/403 as an invalid key
and connection errors as a clean, actionable message.

* fix: harden xAI TTS integration

---------

Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
Co-authored-by: Sabiha Khan <87858386+chewwbaka@users.noreply.github.com>
2026-07-08 09:05:43 +05:30
..
public embed cal and chatwoot bubble missing fix (#483) 2026-06-29 23:02:55 +05:30
scripts feat: refactor node spec and add mcp tools (#244) 2026-04-21 07:56:16 +05:30
src feat(tts): add xAI as a Voice (TTS) provider (#476) 2026-07-08 09:05:43 +05:30
.dockerignore Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
.env.example feat: UI refresh and user onboarding (#430) 2026-06-17 19:49:33 +05:30
.gitignore chore: setup worktree script 2026-06-30 15:59:18 +05:30
.pre-commit-config.yaml Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
AGENTS.md fix: support object and array parameters in custom HTTP tools (#373) 2026-06-02 11:35:38 +05:30
CLAUDE.md Chore/add setup and contributing docs (#90) 2025-12-27 09:25:20 +05:30
components.json Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
Dockerfile feat: enable stack auth config from backend 2026-06-18 14:17:28 +05:30
eslint.config.mjs feat: agent versioning and model configurations override (#227) 2026-04-08 19:20:31 +05:30
next.config.ts chore: improve upon mcp prompts (#494) 2026-07-03 18:14:03 +05:30
openapi-ts.config.ts chore: improve upon mcp prompts (#494) 2026-07-03 18:14:03 +05:30
package-lock.json chore: cleaup mps v1 billing (#507) 2026-07-07 18:38:29 +05:30
package.json chore(main): release dograh 1.41.0 (#497) 2026-07-06 21:37:02 +05:30
postcss.config.mjs Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
README.md Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30
sentry.edge.config.ts chore: fix ui and add "Get Help" button (#27) 2025-10-07 17:40:01 +05:30
sentry.server.config.ts chore: fix ui and add "Get Help" button (#27) 2025-10-07 17:40:01 +05:30
tsconfig.json Initial Commit 🚀 🚀 2025-09-09 14:37:32 +05:30

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Login Flow

  1. The redirection happens server side using ui/src/stack.tsx after the user has logged in.

Sentry and PostHog

  1. Initialized in ui/src/instrumentation-client.ts