docs: add cloud Gemini agent setup recipes#30
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughThis PR updates documentation for the Gemini LLM backend configuration. The gemini_llm example is updated to use the newer ChangesGemini Cloud Model Configuration Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/user-guide/backend/llm.md`:
- Around line 143-157: Update the example Gemini model IDs to the current Flash
/ Flash‑Lite variants: replace occurrences of "gemini-2.5-flash-lite" with
"gemini-3.1-flash-lite" and "gemini-2.5-flash" with "gemini-3.5-flash" in the
gemini_llm section, leaving the Gemma 4 guidance and references to
openai_compatible_llm, ollama_llm, lmstudio_llm, and llama_cpp_llm unchanged.
- Line 139: Update the docs entry that specifies the model string
"gemini-2.5-flash" by adding a brief deprecation/shutdown note stating that
"gemini-2.5-flash" is deprecated and scheduled for shutdown on Oct 16, 2026, and
recommend switching to "gemini-3.5-flash"; place this warning adjacent to the
model declaration (the line containing model: "gemini-2.5-flash") so readers see
the replacement recommendation and shutdown date immediately.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bd06ec65-c9b1-475c-8311-42f2f5afa174
📒 Files selected for processing (2)
docs/user-guide/backend/llm.mdi18n/en/docusaurus-plugin-content-docs/current/user-guide/backend/llm.md
| #### 使用 Gemini 云端模型降低本地运行需求 | ||
|
|
||
| `gemini_llm` 使用 Google Gemini API 的 [OpenAI 兼容端点](https://ai.google.dev/gemini-api/docs/openai)。如果你希望减少本地 GPU/CPU 负担,可以把主要对话模型切到云端 Gemini,只在本地运行 Live2D、TTS、ASR 或其他你需要保留在本机的组件。 | ||
|
|
||
| 常见选择: | ||
|
|
||
| - `gemini-2.5-flash-lite`:适合高频、轻量、低延迟对话。 | ||
| - `gemini-2.5-flash`:适合需要更强理解与推理能力的常规对话。 | ||
| - 其他 Gemini Flash / Flash-Lite 模型:请以 [Gemini 模型列表](https://ai.google.dev/gemini-api/docs/models) 和 AI Studio 中可用的模型名称为准。 | ||
|
|
||
| 如果你想使用托管的 Gemma 4,请先确认服务提供的实际端点和模型名称。Gemma 4 是 Google 的开放模型系列,可以通过 Google AI Studio、Vertex AI 或其他托管服务使用;如果该服务提供 OpenAI 兼容接口,请优先把它配置到 `openai_compatible_llm`,而不是假设它一定属于 `gemini_llm`。Gemma 4 的本地运行路线仍然适合放在 `ollama_llm`、`lmstudio_llm` 或 `llama_cpp_llm`。 | ||
|
|
||
| :::tip | ||
| Gemini 的 RPM、TPM、RPD 限制会随模型、项目、计费层级和账号状态变化,并且是按 Google Cloud/AI Studio 项目计算,不是按单个 API key 计算。请在 AI Studio 查看当前项目的实际限制,并参考 [Gemini API rate limits](https://ai.google.dev/gemini-api/docs/rate-limits)。如果遇到 429,请降低并发、缩短上下文、减少连续重试,或换用更高配额的项目。 | ||
| ::: |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Does the Google Gemini API provide an OpenAI-compatible endpoint as of June 2026? What are the currently available Gemini Flash and Flash-Lite model variants?
💡 Result:
Yes. Google’s Gemini API provides an OpenAI-compatible REST endpoint for use with the OpenAI client libraries by pointing them at a Gemini “OpenAI compatibility” base URL. The docs show using the OpenAI library with base_url="https://generativelanguage.googleapis.com/v1beta/openai/" and calling the OpenAI-style path /chat/completions [1]. Currently available Gemini Flash model variants (Gemini API model IDs): - gemini-3.5-flash (stable/GA) [2] - gemini-3-flash-preview (listed as the preview version in the Gemini 3.5 Flash docs) [2] Currently available Gemini Flash-Lite model variants (Gemini API model IDs): - gemini-3.1-flash-lite (stable/GA) [3] Notes on “Flash-Lite” preview/discontinued variants: - The Gemini API release notes state that gemini-3.1-flash-lite-preview was shut down and that the GA replacement is gemini-3.1-flash-lite [4]. - The Gemini 2.0 Flash-Lite family is shown as shut down/discontinued by June 1, 2026 in the Gemini API changelog, and recommends using gemini-3.1-flash-lite instead [4].
Citations:
- 1: https://ai.google.dev/gemini-api/docs/openai
- 2: https://ai.google.dev/gemini-api/docs/models/gemini-3.5-flash
- 3: https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-lite
- 4: https://ai.google.dev/gemini-api/docs/changelog
Update Gemini model names to match current Flash / Flash-Lite variants
Gemini API does provide an OpenAI-compatible endpoint (the docs endpoint link you cite is correct). However, the model IDs shown (gemini-2.5-flash-lite, gemini-2.5-flash) don’t match the currently available Flash/Flash-Lite variants in June 2026, which are gemini-3.1-flash-lite and gemini-3.5-flash (with some older Flash-Lite variants noted as shut down/discontinued). Update the examples accordingly; keep the Gemma 4 guidance as written (use openai_compatible_llm when the provider exposes an OpenAI-compatible interface).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/user-guide/backend/llm.md` around lines 143 - 157, Update the example
Gemini model IDs to the current Flash / Flash‑Lite variants: replace occurrences
of "gemini-2.5-flash-lite" with "gemini-3.1-flash-lite" and "gemini-2.5-flash"
with "gemini-3.5-flash" in the gemini_llm section, leaving the Gemma 4 guidance
and references to openai_compatible_llm, ollama_llm, lmstudio_llm, and
llama_cpp_llm unchanged.
Summary
gemini-2.5-flashopenai_compatible_llmconf.yamlValidation
npm run buildNotes
Summary by CodeRabbit