Skip to content

Add Gemini 2.5 Pro and Flash API Bots#1033

Open
PeterDaveHello wants to merge 1 commit into
mainfrom
add-gemini-2.5-bots
Open

Add Gemini 2.5 Pro and Flash API Bots#1033
PeterDaveHello wants to merge 1 commit into
mainfrom
add-gemini-2.5-bots

Conversation

@PeterDaveHello

@PeterDaveHello PeterDaveHello commented Jun 9, 2025

Copy link
Copy Markdown
Collaborator

This commit introduces support for the new Gemini 2.5 Pro and Gemini 2.5 Flash models.

Key changes:

  • Added Gemini25ProAPIBot.js and Gemini25FlashAPIBot.js based on existing Gemini bot implementations.
  • Registered the new bots in src/bots/index.js, making them available in the API category.
  • Included new logo files (gemini-2.5-pro-logo.png and gemini-2.5-flash-logo.png) in public/bots/.
  • Updated all localization files under src/i18n/locales/ to include translations for the new models within the geminiApi section.

Summary by CodeRabbit

  • New Features
    • Introduced two new Gemini model variants: Gemini 2.5 Pro Preview and Gemini 2.5 Flash Preview, now available for selection.
  • Localization
    • Added support for new Gemini model names across multiple languages, including English, German, Spanish, French, Italian, Japanese, Korean, Russian, Vietnamese, Simplified Chinese, and Traditional Chinese.

@PeterDaveHello PeterDaveHello requested a review from Copilot June 9, 2025 15:58
@coderabbitai

coderabbitai Bot commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Two new Gemini API bot classes, Gemini25ProAPIBot and Gemini25FlashAPIBot, were introduced as subclasses of GeminiAPIBot. These are registered in the main bot index and categorized under API bots. Localization files in multiple languages were updated to include labels for the new Gemini 2.5 Pro and Flash preview models.

Changes

Files Change Summary
src/bots/google/Gemini25ProAPIBot.js,
src/bots/google/Gemini25FlashAPIBot.js
Added new bot classes Gemini25ProAPIBot and Gemini25FlashAPIBot, each specifying static metadata.
src/bots/index.js Imported and registered the new bots; updated API bot categorization arrays.
src/i18n/locales/en.json,
de.json,
es.json,
fr.json,
it.json,
ja.json,
ko.json,
ru.json,
vi.json,
zh.json,
zhtw.json
Added localization entries for "gemini-2.5-pro-preview-06-05" and "gemini-2.5-flash-preview-05-20".

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant BotIndex
    participant Gemini25ProAPIBot
    participant Gemini25FlashAPIBot

    User->>BotIndex: Request available bots
    BotIndex-->>User: List includes Gemini25ProAPIBot, Gemini25FlashAPIBot

    User->>Gemini25ProAPIBot: Interact with Gemini 2.5 Pro Preview
    User->>Gemini25FlashAPIBot: Interact with Gemini 2.5 Flash Preview
Loading

Possibly related PRs

  • ai-shifu/ChatALL#983: Adds a Gemini 2.0 Flash-Lite API bot class, following a similar pattern of extending GeminiAPIBot for new variants.
  • ai-shifu/ChatALL#974: Introduces new Gemini Flash bot subclasses with static properties and updates the bot index, closely mirroring this PR's structure.

Poem

Two new bots hop into view,
Gemini 2.5—Pro and Flash, brand new!
With logos and models, they join the crowd,
Their names now spoken in languages proud.
Rabbits cheer and tap their feet—
More choices make our bot list sweet!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for the new Gemini 2.5 Pro and Gemini 2.5 Flash API Bots by introducing two new bot implementations, updating the bots index registration, and adding corresponding localization strings and logos.

  • Introduces Gemini25ProAPIBot and Gemini25FlashAPIBot in the bots folder.
  • Updates localization files in 10 languages to support the new models.
  • Registers the new bots in the central bots index.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

File Description
src/i18n/locales/* Adds new localization entries for Gemini 2.5 bots.
src/bots/index.js Registers Gemini25ProAPIBot and Gemini25FlashAPIBot.
src/bots/google/Gemini25ProAPIBot.js New bot implementation for Gemini 2.5 Pro.
src/bots/google/Gemini25FlashAPIBot.js New bot implementation for Gemini 2.5 Flash.
Comments suppressed due to low confidence (1)

src/i18n/locales/es.json:173

  • The 'topK' key is mistakenly set to 'topP'. It should be corrected to 'topK' to maintain consistency with the other localization files.
      "topK": "topP",

This commit introduces support for the new Gemini 2.5 Pro and Gemini 2.5 Flash models.

Key changes:
- Added `Gemini25ProAPIBot.js` and `Gemini25FlashAPIBot.js` based on existing Gemini bot implementations.
- Registered the new bots in `src/bots/index.js`, making them available in the API category.
- Included new logo files (`gemini-2.5-pro-logo.png` and `gemini-2.5-flash-logo.png`) in `public/bots/`.
- Updated all localization files under `src/i18n/locales/` to include translations for the new models within the `geminiApi` section.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/bots/google/Gemini25ProAPIBot.js (1)

8-10: Remove unnecessary constructor.

The constructor only calls super() with no extra logic; it can be omitted to simplify the class:

-export default class Gemini25ProAPIBot extends GeminiAPIBot {
-  static _className = "Gemini25ProAPIBot";
-  static _logoFilename = "gemini-2.5-pro-logo.png";
-  static _model = "gemini-2.5-pro-preview-06-05";
-
-  constructor() {
-    super();
-  }
-}
+export default class Gemini25ProAPIBot extends GeminiAPIBot {
+  static _className = "Gemini25ProAPIBot";
+  static _logoFilename = "gemini-2.5-pro-logo.png";
+  static _model = "gemini-2.5-pro-preview-06-05";
+}
🧰 Tools
🪛 Biome (1.9.4)

[error] 8-10: This constructor is unnecessary.

Unsafe fix: Remove the unnecessary constructor.

(lint/complexity/noUselessConstructor)

src/bots/google/Gemini25FlashAPIBot.js (1)

8-10: Remove unnecessary constructor.

This constructor only delegates to super() and can be removed for brevity:

-export default class Gemini25FlashAPIBot extends GeminiAPIBot {
-  static _className = "Gemini25FlashAPIBot";
-  static _logoFilename = "gemini-2.5-flash-logo.png";
-  static _model = "gemini-2.5-flash-preview-05-20";
-
-  constructor() {
-    super();
-  }
-}
+export default class Gemini25FlashAPIBot extends GeminiAPIBot {
+  static _className = "Gemini25FlashAPIBot";
+  static _logoFilename = "gemini-2.5-flash-logo.png";
+  static _model = "gemini-2.5-flash-preview-05-20";
+}
🧰 Tools
🪛 Biome (1.9.4)

[error] 8-10: This constructor is unnecessary.

Unsafe fix: Remove the unnecessary constructor.

(lint/complexity/noUselessConstructor)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a2d9b85 and c140aec.

⛔ Files ignored due to path filters (2)
  • public/bots/gemini-2.5-flash-logo.png is excluded by !**/*.png
  • public/bots/gemini-2.5-pro-logo.png is excluded by !**/*.png
📒 Files selected for processing (14)
  • src/bots/google/Gemini25FlashAPIBot.js (1 hunks)
  • src/bots/google/Gemini25ProAPIBot.js (1 hunks)
  • src/bots/index.js (3 hunks)
  • src/i18n/locales/de.json (1 hunks)
  • src/i18n/locales/en.json (1 hunks)
  • src/i18n/locales/es.json (1 hunks)
  • src/i18n/locales/fr.json (1 hunks)
  • src/i18n/locales/it.json (1 hunks)
  • src/i18n/locales/ja.json (1 hunks)
  • src/i18n/locales/ko.json (1 hunks)
  • src/i18n/locales/ru.json (1 hunks)
  • src/i18n/locales/vi.json (1 hunks)
  • src/i18n/locales/zh.json (1 hunks)
  • src/i18n/locales/zhtw.json (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/bots/google/Gemini25FlashAPIBot.js (1)
src/bots/google/GeminiAPIBot.js (1)
  • GeminiAPIBot (5-40)
🪛 Biome (1.9.4)
src/bots/google/Gemini25FlashAPIBot.js

[error] 8-10: This constructor is unnecessary.

Unsafe fix: Remove the unnecessary constructor.

(lint/complexity/noUselessConstructor)

src/bots/google/Gemini25ProAPIBot.js

[error] 8-10: This constructor is unnecessary.

Unsafe fix: Remove the unnecessary constructor.

(lint/complexity/noUselessConstructor)

🔇 Additional comments (15)
src/i18n/locales/fr.json (1)

171-172: New Gemini 2.5 French entries look correct.
The two new keys under geminiApi use proper French translations ("Aperçu") and are placed consistently.

src/i18n/locales/de.json (1)

171-172: German localization for Gemini 2.5 entries is accurate.
Both new entries use appropriate German terms ("Vorschau") and follow the existing ordering under geminiApi.

src/i18n/locales/zhtw.json (1)

171-172: Traditional Chinese Gemini 2.5 labels are correctly added.
The new values ("預覽版") match the style used elsewhere in this locale file.

src/i18n/locales/ko.json (1)

171-172: Korean translations for the Gemini 2.5 preview variants are correct.
The new entries use the Korean loanword "프리뷰" consistently with other preview labels.

src/i18n/locales/vi.json (1)

164-165: Add Gemini 2.5 Pro & Flash preview entries
Inserted two new localization keys for the Gemini 2.5 Pro and Flash preview models, matching the new API bot implementations.

src/i18n/locales/ru.json (1)

171-172: Add Gemini 2.5 Pro & Flash preview entries
Added two new Russian labels under geminiApi for the Gemini 2.5 Pro and Flash preview models to support the new bots.

src/i18n/locales/en.json (1)

171-172: Add Gemini 2.5 Pro & Flash preview entries
Inserted English labels for the new Gemini 2.5 Pro and Flash preview variants in the geminiApi section.

src/i18n/locales/zh.json (1)

171-172: Add Gemini 2.5 Pro & Flash preview entries
Added Chinese translations for the Gemini 2.5 Pro and Flash preview models under geminiApi.

src/i18n/locales/ja.json (1)

171-172: Add Gemini 2.5 Pro & Flash preview entries
Inserted Japanese localization keys for the new Gemini 2.5 Pro and Flash preview bots.

src/bots/google/Gemini25ProAPIBot.js (1)

4-6: New bot subclass configuration looks correct.

Static properties _className, _logoFilename, and _model properly define the Gemini 2.5 Pro preview bot.

src/i18n/locales/it.json (1)

172-173: Localization entries for new models are correct.

The keys "gemini-2.5-pro-preview-06-05" and "gemini-2.5-flash-preview-05-20" match the model identifiers and provide appropriate Italian labels.

src/bots/google/Gemini25FlashAPIBot.js (1)

4-6: New bot subclass configuration looks correct.

Static properties _className, _logoFilename, and _model correctly configure the Gemini 2.5 Flash preview bot.

src/bots/index.js (3)

7-8: Imports of new bots look correct.

Gemini25ProAPIBot and Gemini25FlashAPIBot are imported alongside existing API bots using the same alias path.


102-103: Bot registration is accurate.

The new bots’ getInstance() calls are inserted in the all array following version order.


199-200: Classification under API tags is correct.

Both new bot classes are properly added to the botTags.api group.

Comment thread src/i18n/locales/es.json
Comment on lines +171 to +172
"gemini-2.5-pro-preview-06-05": "Gemini 2.5 Pro Preview",
"gemini-2.5-flash-preview-05-20": "Gemini 2.5 Flash Preview",

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.

⚠️ Potential issue

Translate “Preview” into Spanish.
The values for gemini-2.5-pro-preview-06-05 and gemini-2.5-flash-preview-05-20 currently use the English word "Preview". Please replace with the Spanish equivalent, "Vista previa", for consistency.

Suggested diff:

-"gemini-2.5-pro-preview-06-05": "Gemini 2.5 Pro Preview",
-"gemini-2.5-flash-preview-05-20": "Gemini 2.5 Flash Preview",
+"gemini-2.5-pro-preview-06-05": "Gemini 2.5 Pro Vista previa",
+"gemini-2.5-flash-preview-05-20": "Gemini 2.5 Flash Vista previa",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"gemini-2.5-pro-preview-06-05": "Gemini 2.5 Pro Preview",
"gemini-2.5-flash-preview-05-20": "Gemini 2.5 Flash Preview",
"gemini-2.5-pro-preview-06-05": "Gemini 2.5 Pro Vista previa",
"gemini-2.5-flash-preview-05-20": "Gemini 2.5 Flash Vista previa",
🤖 Prompt for AI Agents
In src/i18n/locales/es.json around lines 171 to 172, the values for keys
"gemini-2.5-pro-preview-06-05" and "gemini-2.5-flash-preview-05-20" use the
English word "Preview". Replace "Preview" with the Spanish translation "Vista
previa" in both values to maintain language consistency.

@PeterDaveHello

Copy link
Copy Markdown
Collaborator Author

There's something wrong with Gemini bots need to be resolved first.

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