Enable TTS support for xai-oauth (oauth-proxy scope) - #36130
Open
Helvio88 wants to merge 7 commits into
Open
Conversation
mxnstrexgl
approved these changes
Jun 1, 2026
mxnstrexgl
left a comment
There was a problem hiding this comment.
LGTM — automated review passed. No security, quality, or test coverage issues detected.
1 task
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.
Author
|
Signature amended, can we reevaluate? |
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs