Skip to content

Session summary generation ignores configured model and hardcodes gemini-3.1-flash-lite, causing failures on custom endpoints #29065

Description

@oahcy

What happened?

Environment

  • @google/gemini-cli version: 0.56.0
  • Node.js: v22.17.0
  • OS: Windows 11 (win32)
  • Configured model: gemini-3.1-pro-preview
  • API endpoint: custom proxy (OpenAI/new-api compatible relay with model-routing "groups", group name cocos)

Description

I configured gemini-3.1-pro-preview as my model. Normal chat requests use this model correctly. However, when gemini-cli tries to generate a background session summary, it silently switches to gemini-3.1-flash-lite instead of the configured model. My proxy's cocos group has no channel/distributor for gemini-3.1-flash-lite, so every summary attempt fails with a model_not_found 503 error, retries 4+ times with backoff, and spams the terminal with stack traces.

Steps to reproduce

  1. Set model to gemini-3.1-pro-preview via /model (or config), pointed at a custom API base URL that only exposes specific models per routing group.
  2. Use the CLI normally until a session summary is triggered (e.g., on /model switch, compaction, or session end — whichever triggers generateAndSaveSummary).
  3. Observe the summary generation request goes to gemini-3.1-flash-lite, not the configured model.

What did you expect to happen?

Session summary generation should use the currently configured/active model (or at minimum, a model the user has explicitly made available), not a hardcoded lite model that may not exist on the user's endpoint.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about
│ About Gemini CLI                                                                                                                                                                                                                                                                     │
│                                                                                                                                                                                                                                                                                      │
│ CLI Version                                                                                      0.56.0                                                                                                                                                                              │
│ Git Commit                                                                                       b6e23a7dc                                                                                                                                                                           │
│ Model                                                                                            gemini-3.1-pro-preview                                                                                                                                                              │
│ Sandbox                                                                                          no sandbox                                                                                                                                                                          │
│ OS                                                                                               win32                                                                                                                                                                               │
│ Auth Method                                                                                      gemini-api-key

Login information

Attempt 5 failed: {"error":{"code":"model_not_found","message":"分组 cocos 下模型 gemini-3.1-flash-lite 无可用渠道(distributor) (request id: 202608250246317784272508xxxxxxx)","type":"new_api_error"}}. Max attempts reached

Anything else we need to know?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitykind/bugpriority/p2Important but can be addressed in a future release.status/bot-triaged

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions