Skip to content

fix(tests): Uses gemini-embedding-001 by default#2306

Merged
kevinmessiaen merged 2 commits intomainfrom
2305-fix-skipped-embedding-integration-tests
Mar 13, 2026
Merged

fix(tests): Uses gemini-embedding-001 by default#2306
kevinmessiaen merged 2 commits intomainfrom
2305-fix-skipped-embedding-integration-tests

Conversation

@kevinmessiaen
Copy link
Copy Markdown
Member

Description

Fix skipped tests by using gemini model by default

Related Issue

Fixes #2305

Type of Change

  • 🔧 Bug fix (non-breaking change which fixes an issue)

@kevinmessiaen kevinmessiaen requested a review from a team as a code owner March 13, 2026 03:29
@kevinmessiaen kevinmessiaen linked an issue Mar 13, 2026 that may be closed by this pull request
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 resolves an issue where certain functional tests were being skipped by updating the default embedding model used in the test suite. By switching the default to gemini/gemini-embedding-001, the previously skipped test_embedding_model_real_embedding can now run, enhancing test coverage and ensuring the functionality of embedding models is properly validated.

Highlights

  • Default Embedding Model Update: The default embedding model used in tests has been updated from 'text-embedding-3-small' to 'gemini/gemini-embedding-001' to ensure tests can run without specific API keys.
  • Test Unskip: A functional test, test_embedding_model_real_embedding, which was previously skipped due to requiring an OpenAI API key, has been unskipped, allowing it to execute with the new default Gemini model.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • libs/giskard-agents/tests/conftest.py
    • Updated the default embedding model from "text-embedding-3-small" to "gemini/gemini-embedding-001" in the embedding_model fixture.
  • libs/giskard-agents/tests/test_embedding_model.py
    • Removed the @pytest.mark.skip decorator from the test_embedding_model_real_embedding function.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/integration-tests.yml
Activity
  • The pull request was created by kevinmessiaen to fix skipped tests.
  • Changes were implemented to use the Gemini embedding model by default in the test configuration.
  • A functional test was unskipped to allow it to run with the updated default model.
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.

@kevinmessiaen kevinmessiaen requested a review from henchaves March 13, 2026 03:30
@kevinmessiaen kevinmessiaen self-assigned this Mar 13, 2026
Copy link
Copy Markdown
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 updates the default embedding model for tests from OpenAI's text-embedding-3-small to gemini/gemini-embedding-001. This change also enables a previously skipped functional test for real embeddings, which is a good improvement. I've added one suggestion in conftest.py to improve maintainability by avoiding code duplication.

Comment on lines 18 to 21
return EmbeddingModel(
model=os.getenv("TEST_EMBEDDING_MODEL", "text-embedding-3-small"),
model=os.getenv("TEST_EMBEDDING_MODEL", "gemini/gemini-embedding-001"),
params=EmbeddingParams(dimensions=1536),
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To improve maintainability and avoid duplicating the default model name, we can refactor this fixture. The default model gemini/gemini-embedding-001 is already specified in the LitellmEmbeddingModel definition. By conditionally adding the model argument only when the TEST_EMBEDDING_MODEL environment variable is set, we can rely on the default defined in the model class and have a single source of truth for the default model.

Suggested change
return EmbeddingModel(
model=os.getenv("TEST_EMBEDDING_MODEL", "text-embedding-3-small"),
model=os.getenv("TEST_EMBEDDING_MODEL", "gemini/gemini-embedding-001"),
params=EmbeddingParams(dimensions=1536),
)
model_name = os.getenv("TEST_EMBEDDING_MODEL")
init_kwargs = {"params": EmbeddingParams(dimensions=1536)}
if model_name:
init_kwargs["model"] = model_name
return EmbeddingModel(**init_kwargs)

@kevinmessiaen kevinmessiaen merged commit c215d0a into main Mar 13, 2026
23 checks passed
@kevinmessiaen kevinmessiaen deleted the 2305-fix-skipped-embedding-integration-tests branch March 13, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Fix skipped embedding integration tests

2 participants