Skip to content

Conversation

@CatherineSue
Copy link
Collaborator

@CatherineSue CatherineSue commented Nov 25, 2025

Description

Copy of #95 but with syntetic data and qps mode removed.

This PR focuses on adding together AI support.

Checklist

  • I have rebased my branch on top of the latest main branch (git pull origin main)
  • I have run make check to ensure code is properly formatted and passes all lint checks
  • I have run make test or make test_changed to verify test coverage (~90% required)
  • I have added tests that fail without my code changes (for bug fixes)
  • I have added tests covering variants of new features (for new features)

Additional Information

Add any other context, screenshots, or information about the PR here.

@github-actions github-actions bot added documentation Improvements or additions to documentation core Updates to core modules (cli, auth, storage, users) labels Nov 25, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 genai-bench tool's capabilities by adding a new backend for Together AI. This integration allows users to benchmark a wide array of models available on the Together AI platform for various tasks, including conversational AI and embedding generation. The implementation ensures seamless compatibility with existing benchmarking workflows and metrics collection, providing a robust and flexible solution for evaluating model performance.

Highlights

  • Together AI Backend Integration: Introduced full support for Together AI as a new backend, enabling benchmarking of models hosted on their platform.
  • Feature Support: The integration supports chat completions (text-to-text and image-text-to-text), embeddings, and full streaming capabilities.
  • Authentication: Implemented API key-based authentication for Together AI, with support for both direct key input and environment variables.
  • CLI and Internal Integration: Updated the command-line interface to include 'together' as a supported backend and integrated the new authentication and user classes into the framework's factories and validation.
  • Documentation: Added a comprehensive TOGETHER_AI_INTEGRATION.md document detailing the features, usage, supported models, tasks, and implementation specifics.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Nov 25, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Comment on lines +43 to +45
self.headers = {
"Authorization": f"Bearer {self.auth_provider.get_credentials()}",
"Content-Type": "application/json",

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@slin1237 slin1237 merged commit 4f25bf4 into main Nov 25, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Updates to core modules (cli, auth, storage, users)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants