-
Notifications
You must be signed in to change notification settings - Fork 37
[feature] Add TogetherAI backend support #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # README.md # docs/examples/index.md
This reverts commit 03c2825.
Summary of ChangesHello @CatherineSue, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces support for the TogetherAI backend, which is a valuable addition. The implementation is comprehensive, covering authentication, CLI integration, a new TogetherUser for benchmarking, and corresponding tests. The code correctly leverages existing OpenAI-compatible components. However, I've identified a critical issue in the authentication header construction that would prevent the integration from working correctly. Additionally, there are several medium-severity issues, including copy-paste errors in documentation and comments, an incorrect model in an example command, and some unclear code in the TogetherUser implementation. Once these points are addressed, the pull request will be in excellent shape.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| self.headers = { | ||
| "Authorization": f"Bearer {self.auth_provider.get_credentials()}", | ||
| "Content-Type": "application/json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build Together Authorization header from dict credentials
When running the Together backend, UnifiedAuthFactory.create_model_auth returns a TogetherModelAuthAdapter whose get_credentials() returns a dict ({"api_key": ...}), but TogetherUser.on_start builds the Authorization header directly from that method. The resulting header becomes Bearer {'api_key': ...} instead of the actual API key (the adapter exposes proper headers via get_headers()), so all Together requests will be sent with an invalid bearer token and rejected with 401. Use the adapter’s headers as done in OpenAIUser.
Useful? React with 👍 / 👎.
Description
Copy of #95 but with syntetic data and qps mode removed.
This PR focuses on adding together AI support.
Checklist
git pull origin main)make checkto ensure code is properly formatted and passes all lint checksmake testormake test_changedto verify test coverage (~90% required)Additional Information
Add any other context, screenshots, or information about the PR here.