Skip to content

Enable TTS support for xai-oauth (oauth-proxy scope) - #36130

Open
Helvio88 wants to merge 7 commits into
NousResearch:mainfrom
Helvio88:main
Open

Enable TTS support for xai-oauth (oauth-proxy scope)#36130
Helvio88 wants to merge 7 commits into
NousResearch:mainfrom
Helvio88:main

Conversation

@Helvio88

@Helvio88 Helvio88 commented May 31, 2026

Copy link
Copy Markdown

What does this PR do?

This PR changes the oauth proxy server to account for arbitrary path and request body transformations.
This, essentially, enables TTS through xai-oauth, but also provides a framework for future oauth adapters to stay compatible with the OpenAI API schema.

Related Issue

Fixes #36124

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • hermes_cli/proxy/server.py - Call optional transformers (no-op lambda fallback ensures nous won't break).
  • hermes_cli/proxy/adapters.xai.py - Implemented path and body transformers to make xai's API compatible with OpenAI.

How to Test

  1. Enable xai-oauth
  2. Start oauth proxy
  3. Connect to Open WebUI and try TTS

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Ubuntu 24.04

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

image

@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard provider/xai xAI (Grok) tool/tts Text-to-speech and transcription P3 Low — cosmetic, nice to have labels May 31, 2026

@mxnstrexgl mxnstrexgl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — automated review passed. No security, quality, or test coverage issues detected.

@Helvio88 Helvio88 changed the title Enable TTS support for xai-auto Enable TTS support for xai-oauth Jun 23, 2026
@Helvio88 Helvio88 changed the title Enable TTS support for xai-oauth Enable TTS support for xai-oauth (oauth-proxy scope) Jun 23, 2026
Helvio88 added 2 commits July 28, 2026 20:02
The optional adapter hook is called as (path, body), but the getattr
fallback was a 1-arg lambda. Adapters without transform_request_body
(e.g. nous) would TypeError on every proxied request.

Match the two-arg signature. Tests follow in a subsequent update.

Addresses review note on NousResearch#36124 / PR NousResearch#36130.
@Helvio88

Copy link
Copy Markdown
Author

Signature amended, can we reevaluate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have provider/xai xAI (Grok) tool/tts Text-to-speech and transcription type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: xai-oauth proxy does not support TTS

3 participants