Skip to content

Conversation

@lukehinds
Copy link
Collaborator

  • Add test_llm_client_integration.py with 6 tests:
    • TestLLMClientOpenAI: basic structured output, async output, streaming
    • TestLLMClientGemini: basic output, async topic list, schema handling
  • Gemini tests use async-only API (generate_async)
  • Tests use shared fixtures from conftest.py

- Add test_llm_client_integration.py with 6 tests:
  - TestLLMClientOpenAI: basic structured output, async output, streaming
  - TestLLMClientGemini: basic output, async topic list, schema handling
- Gemini tests use async-only API (generate_async)
- Tests use shared fixtures from conftest.py

Signed-off-by: Luke Hinds <[email protected]>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @lukehinds, 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 introduces a new suite of integration tests for the LLMClient, ensuring its reliable operation with both OpenAI and Gemini large language models. The tests validate various generation patterns, including structured data output, asynchronous calls, and streaming responses, while also addressing provider-specific nuances like Gemini's schema handling requirements. This enhancement aims to improve the stability and confidence in the LLMClient's interactions with external LLM services.

Highlights

  • New Integration Test File: A new file test_llm_client_integration.py has been added to house integration tests for the LLMClient.
  • OpenAI Tests: Three new tests for OpenAI cover basic structured output, asynchronous structured output, and asynchronous streaming capabilities.
  • Gemini Tests: Three new tests for Gemini include basic structured output, asynchronous topic list generation, and specific schema handling, noting that Gemini tests exclusively use the generate_async API.
  • Shared Fixtures: The tests leverage shared fixtures from conftest.py for configuration.
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.

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 adds a valuable set of integration tests for the LLMClient with OpenAI and Gemini providers, covering basic, async, and streaming generation. The tests are well-structured and use pytest features like markers and fixtures effectively. My review includes a couple of suggestions to improve the tests further: one to refactor the client setup using fixtures to reduce code duplication, and another to strengthen an assertion to make the test more robust. Overall, this is a great addition to the test suite.

- Add openai_client and gemini_client fixtures to reduce duplication
- Fix test_gemini_schema_handling to assert >= 2 subtopics

Signed-off-by: Luke Hinds <[email protected]>
Signed-off-by: Luke Hinds <[email protected]>
@lukehinds lukehinds merged commit aef92b7 into main Dec 27, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants