Skip to content

feat: 支持 gemini-robotics-er-1.5-preview - #1945

Merged
seefs001 merged 1 commit into
mainfrom
gemini-robotics-er
Oct 1, 2025
Merged

seefs001 merged 1 commit into
mainfrom
gemini-robotics-er

Conversation

@creamlike1024

@creamlike1024 creamlike1024 commented Oct 1, 2025 •

Copy link
Copy Markdown
Collaborator

https://ai.google.dev/gemini-api/docs/pricing?hl=zh-cn#gemini-robotics-er
image

Summary by CodeRabbit

  • New Features

    • Added support for the Gemini Robotics ER 1.5 (preview) model family.
    • Recognizes requests using the “gemini-robotics-er-1.5” prefix and applies appropriate handling.
    • Introduced pricing for audio input on the new model.
  • Chores

    • Updated default model ratios to optimize routing/behavior for the Gemini Robotics ER 1.5 (preview) family.

@coderabbitai

coderabbitai Bot commented Oct 1, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adds pricing and ratio support for the new Gemini Robotics ER 1.5 model: a new audio input price constant and a branch in GetGeminiInputAudioPricePerMillionTokens, plus default/derived model ratio entries handling the "gemini-robotics-er-1.5" prefix.

Changes

Cohort / File(s) Summary
Pricing constants & lookup
setting/operation_setting/tools.go
Added GeminiRoboticsER15InputAudioPrice constant. Updated GetGeminiInputAudioPricePerMillionTokens to detect "gemini-robotics-er-1.5" prefix and return the new price.
Model ratio configuration
setting/ratio_setting/model_ratio.go
Added defaultModelRatio entry for "gemini-robotics-er-1.5-preview": 0.15. Extended getHardcodedCompletionModelRatio to handle "gemini-robotics-er-1.5" with 2.5/0.3, false. Reordered submodel block without value changes.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant Pricing as operation_setting.tools
  participant Ratios as ratio_setting.model_ratio

  Note over Caller,Pricing: Price lookup for audio input
  Caller->>Pricing: GetGeminiInputAudioPricePerMillionTokens(modelName)
  alt modelName startsWith "gemini-robotics-er-1.5"
    Pricing-->>Caller: GeminiRoboticsER15InputAudioPrice
  else other prefixes
    Pricing-->>Caller: Existing mapped price
  end

  Note over Caller,Ratios: Ratio lookup for completions
  Caller->>Ratios: getHardcodedCompletionModelRatio(modelName)
  alt modelName startsWith "gemini-robotics-er-1.5"
    Ratios-->>Caller: ratio=2.5/0.3, isDefault=false
  else other prefixes
    Ratios-->>Caller: Existing ratio logic
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit taps keys with a quiet cheer,
New ER bots hop into pricing here.
Ratios aligned, prefixes in tow,
Tokens and models in tidy flow.
With carrots of constants neatly arrayed,
This burrow now bills the bots we’ve made. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly states the addition of support for the gemini-robotics-er-1.5-preview model, which aligns directly with the changes in both the pricing constant and model ratio configuration. It clearly identifies the feature being introduced without unnecessary detail or generic phrasing. This ensures that anyone scanning the commit history can immediately understand the pull request’s primary purpose.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gemini-robotics-er

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 15db5c0 and 70263e9.

📒 Files selected for processing (2)
  • setting/operation_setting/tools.go (2 hunks)
  • setting/ratio_setting/model_ratio.go (3 hunks)
🔇 Additional comments (5)
setting/ratio_setting/model_ratio.go (3)

591-592: LGTM! Completion ratio matches Gemini 2.5 Flash pattern.

The completion ratio calculation 2.5 / 0.3 (≈8.33) aligns with the existing gemini-2.5-flash handling at line 590, which is appropriate given both models share similar pricing characteristics.


256-266: Submodel block reformatting noted.

The submodel entries were reformatted without value changes. No issues.


182-182: Model naming aligns with official codes. "gemini-robotics-er-1.5-preview" is the official API model identifier and using the prefix "gemini-robotics-er-1.5" for completion ratio is intentional; no changes needed.

setting/operation_setting/tools.go (2)

78-79: LGTM! Prefix matching is consistent.

The prefix check for "gemini-robotics-er-1.5" correctly handles all ER 1.5 model variants and follows the established pattern used for other Gemini model families in this function.


32-32: Pricing verification passed: the 1.00 value for GeminiRoboticsER15InputAudioPrice matches the official Gemini Robotics-ER 1.5 documentation.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@seefs001
seefs001 merged commit 96b172e into main Oct 1, 2025
@Calcium-Ion
Calcium-Ion deleted the gemini-robotics-er branch October 3, 2025 13:52
x22x22 pushed a commit to x22x22/new-api that referenced this pull request Apr 24, 2026
feat: 支持 gemini-robotics-er-1.5-preview
salem-2007 added a commit to salem-2007/new-api that referenced this pull request Sep 10, 2026
feat: 支持 gemini-robotics-er-1.5-preview
junjundesk pushed a commit to junjundesk/new-api that referenced this pull request Oct 3, 2026
feat: 支持 gemini-robotics-er-1.5-preview
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