Skip to content

Conversation

@tenowg
Copy link
Contributor

@tenowg tenowg commented Aug 19, 2025

Just added a few of the newer models so embedding works with new releases, the pattern could be improved, if you want i will work on it.

Summary by CodeRabbit

  • New Features
    • Added support for Google Gemini 2.5 Flash and 2.5 Pro models.
    • Enabled the new Gemini Embedding 001 and included it in the supported embedding models list.
  • Chores
    • Deprecated the previous experimental embedding model; use Gemini Embedding 001 instead.

@coderabbitai
Copy link

coderabbitai bot commented Aug 19, 2025

Walkthrough

Added new Google model constants (Gemini 2.5 Flash/Pro and Gemini Embedding), marked the experimental embedding constant as obsolete, and included the new embedding model in the supported embeddings list.

Changes

Cohort / File(s) Change Summary
Google AI model constants
src/GenerativeAI/Constants/GoogleAIModels.cs
Added constants: Gemini25Flash ("models/gemini-2.5-flash"), Gemini25Pro ("models/gemini-2.5-pro"), GeminiEmbedding ("models/gemini-embedding-001"); marked GeminiEmbeddingExp as [Obsolete] with guidance.
Supported embedding models list
src/GenerativeAI/Constants/SupportedEmbedingModels.cs
Included GoogleAIModels.GeminiEmbedding in the All list after TextEmbedding; no signature changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

I twitch my ears at models new,
2.5s hop into view—flash and pro, a shiny crew.
Old “exp” now rests, retired to bed,
While embeddings bloom in lines we’ve read.
Thump-thump! I stamp the merge with glee—
More carrots for the API! 🥕

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/GenerativeAI/Constants/GoogleAIModels.cs (2)

17-21: Fix XML doc tag spacing; optionally consider updating the default model.

  • The XML doc tag on Line 17 is missing a space after the triple slashes, unlike the rest of the file.
  • Optional: Given stable 2.5 models are now introduced, consider bumping DefaultGeminiModel to Gemini25Flash if backward compatibility allows.

Apply this diff for the doc tag:

-    ///<summary>
+    /// <summary>

94-98: Typo in XML summary: “Emedding” → “Embedding”.

Correct the spelling in the summary to avoid leaking typos into generated docs.

-    /// The current Gemini Emedding model name.
+    /// The current Gemini Embedding model identifier.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 037fc20 and ab8402e.

📒 Files selected for processing (2)
  • src/GenerativeAI/Constants/GoogleAIModels.cs (2 hunks)
  • src/GenerativeAI/Constants/SupportedEmbedingModels.cs (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/GenerativeAI/Constants/SupportedEmbedingModels.cs (1)
src/GenerativeAI/Constants/GoogleAIModels.cs (1)
  • GoogleAIModels (10-281)
🔇 Additional comments (2)
src/GenerativeAI/Constants/GoogleAIModels.cs (1)

27-31: Addition of Gemini 2.5 Pro constant looks good.

Naming and prefix ("models/") are consistent with recent constants.

src/GenerativeAI/Constants/SupportedEmbedingModels.cs (1)

30-31: Good inclusion of the new Gemini embedding model.

Adding GoogleAIModels.GeminiEmbedding keeps SupportedEmbedingModels up to date with current releases and avoids the deprecated experimental variant.

Comment on lines 99 to 103
/// <summary>
/// Gemini 2.0 Flash Exp model name.
/// </summary>
[Obsolete("Gemini-embedding-exp is deprecated. Use GeminiEmedding (gemini-embedding-001) instead.", false)]
public const string GeminiEmbeddingExp = "gemini-embedding-exp";
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Mismatched XML summary and typos in Obsolete message; consider qualifying Obsolete.

  • The XML summary (“Gemini 2.0 Flash Exp model name.”) doesn’t describe GeminiEmbeddingExp.
  • The Obsolete message has a typo (“GeminiEmedding”) and should reference the constant name accurately. Including the fully qualified model id is clearer.
  • To avoid depending on global usings, prefer [System.Obsolete(...)] (safe even if implicit usings are disabled).

Apply this diff:

-/// <summary>
-/// Gemini 2.0 Flash Exp model name.
-/// </summary>
-[Obsolete("Gemini-embedding-exp is deprecated. Use GeminiEmedding (gemini-embedding-001) instead.", false)]
+/// <summary>
+/// Gemini embedding experimental model (deprecated).
+/// </summary>
+[System.Obsolete("gemini-embedding-exp is deprecated. Use GeminiEmbedding (models/gemini-embedding-001) instead.", false)]
 public const string GeminiEmbeddingExp = "gemini-embedding-exp";

To verify and plan follow-ups, run this repo-wide search to find any remaining usages of the deprecated constant or literal and queue fixes:

I can prepare a follow-up PR to replace remaining usages (if any) with GoogleAIModels.GeminiEmbedding or route callers through SupportedEmbedingModels.All.


🏁 Script executed:

#!/bin/bash
# Find references to the constant and raw literal
rg -n -C2 --glob '!*bin*' --glob '!*obj*' '\bGeminiEmbeddingExp\b|gemini-embedding-exp'

Length of output: 1030


Update GeminiEmbeddingExp constants in both VertexAIModels.cs and GoogleAIModels.cs

The same constant and incorrect XML/Obsolete metadata exists in two places. Please apply these fixes to both files:

  • Change the XML summary to accurately describe the deprecated model.
  • Correct the typo in the Obsolete message (use “GeminiEmbedding”).
  • Fully qualify the attribute as [System.Obsolete(...)].
  • Reference the exact model ID (models/gemini-embedding-001) rather than an ambiguous string.

Proposed diffs:

--- a/src/GenerativeAI/Constants/VertexAIModels.cs
+++ b/src/GenerativeAI/Constants/VertexAIModels.cs
@@ -88,8 +88,8 @@
-    /// <summary>
-    /// Gemini 2.0 Flash Exp model name.
-    /// </summary>
-    [Obsolete("Gemini-embedding-exp is deprecated. Use GeminiEmedding (gemini-embedding-001) instead.", false)]
+    /// <summary>
+    /// Gemini embedding experimental model (deprecated).
+    /// </summary>
+    [System.Obsolete("gemini-embedding-exp is deprecated. Use GeminiEmbedding (models/gemini-embedding-001) instead.", false)]
     public const string GeminiEmbeddingExp = "gemini-embedding-exp";
--- a/src/GenerativeAI/Constants/GoogleAIModels.cs
+++ b/src/GenerativeAI/Constants/GoogleAIModels.cs
@@ -99,8 +99,8 @@
-    /// <summary>
-    /// Gemini 2.0 Flash Exp model name.
-    /// </summary>
-    [Obsolete("Gemini-embedding-exp is deprecated. Use GeminiEmedding (gemini-embedding-001) instead.", false)]
+    /// <summary>
+    /// Gemini embedding experimental model (deprecated).
+    /// </summary>
+    [System.Obsolete("gemini-embedding-exp is deprecated. Use GeminiEmbedding (models/gemini-embedding-001) instead.", false)]
     public const string GeminiEmbeddingExp = "gemini-embedding-exp";

After updating, re-run the search to catch any remaining references:

#!/bin/bash
rg -n -C2 --glob '!*bin*' --glob '!*obj*' '\bGeminiEmbeddingExp\b|gemini-embedding-exp'

I can help prepare a follow-up PR to replace all usages with GoogleAIModels.GeminiEmbedding or route through SupportedEmbeddingModels.All.

🤖 Prompt for AI Agents
In src/GenerativeAI/Constants/GoogleAIModels.cs around lines 99 to 103 (and
apply the same edits to src/GenerativeAI/Constants/VertexAIModels.cs), the
GeminiEmbeddingExp constant's XML summary and Obsolete attribute are incorrect:
update the XML summary to describe that this constant refers to the deprecated
Gemini embedding model, fix the typo in the Obsolete message to
"GeminiEmbedding", fully qualify the attribute as [System.Obsolete(...)] and
change the referenced model ID to the exact value "models/gemini-embedding-001";
make the same precise edits in the VertexAIModels file and then run the provided
ripgrep command to find any remaining references for follow-up replacement.

@gunpal5 gunpal5 merged commit e1ac5f4 into gunpal5:main Aug 24, 2025
1 check 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