Skip to content

exiting plan mode does not switch model #23230

Description

@TheTk58

What happened?

With the appropriate setting enabled, gemini is supposed to switch to gemini-3-flash-preview after the plan is confirmed, but it doesnt, unless the immediate post plan actions are interrupted and a new message is sent.

What did you expect to happen?

A switch to gemini-3-flash-preview directly after the exit plan mode tool is run.

Client information

  • CLI Version: 0.34.0
  • Operating System: win32 v25.2.1
  • Sandbox Environment: no sandbox

Login information

API key

Anything else we need to know?

No response

Activity

  1. added
    status/need-triageIssues that need to be triaged by the triage automation.
    area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality
    on Mar 20, 2026
  2. gemini-cli commented on Mar 20, 2026

    @gemini-cli
    Contributor

    Found possible duplicate issues:

    If you believe this is not a duplicate, please remove the status/possible-duplicate label.

  3. removed
    status/need-triageIssues that need to be triaged by the triage automation.
    on Mar 20, 2026
  4. added theissue type on Mar 20, 2026
  5. added
    workstream-rollupLabel used to tag epics and features that are associated with one of the three primary workstreams
    🔒 maintainer only⛔ Do not contribute. Internal roadmap item.
    on Mar 20, 2026
  6. self-assigned this
    on Mar 20, 2026
  7. Adib234 commented on Mar 23, 2026

    @Adib234
    Contributor

    Hi can you run /stats model after creating and executing a plan. Also, set the model to Auto (Gemini 3). With automatic model switching enabled, we should expect to see Gemini 3.1 Pro and Flash being used.

  8. TheTk58 commented on Mar 23, 2026

    @TheTk58
    Author

    I did and I can confirm it doesnt switch until I resend a message.

    https://github.com/user-attachments/files/26195847/test.txt

  9. Adib234 commented on Mar 24, 2026

    @Adib234
    Contributor

    Hmm, did you switch to auto mid-session in plan mode? I tried reproducing the issue and couldn't when I start Gemini CLI with model Auto (Gemini 3)

    However I can reproduce your issue when I have a model set at the beginning of my session and switch to auto in a random turn.

    Image Image
  10. jerop commented on Mar 24, 2026

    @jerop
    Contributor

    fyi you can enabled Show Model Info In Chat in /settings to see which model is used in each turn:

    Image
  11. TheTk58 commented on Mar 24, 2026

    @TheTk58
    Author

    Nope, I didnt change anything In between.
    In the example you gave the agent explicitely didnt continue on due to the nature of the plan request, however if there is code involved it directly keeps going through with the implementation with gemini-3.1-pro. If I stop it and send continue, it then switches to gemini-3-flash, but this is more of a workaround.

  12. Adib234 commented on Mar 24, 2026

    @Adib234
    Contributor

    Does using Show Model Info In Chat show that in the turns after you exited plan mode, pro model was being used?

  13. TheTk58 commented on Mar 24, 2026

    @TheTk58
    Author

    It starts by showing Responding with gemini-3.1-pro-preview right when the initial message is sent. It then shows Responding with gemini-3-flash-preview only when the next message is sent, after it has exited plan mode and immediately implemented. It alligns with the above behavior.

  14. Adib234 commented on Mar 24, 2026

    @Adib234
    Contributor

    I see, so in plan mode it was in gemini 3.1 pro and execution mode it was in flash? If so, this is expected behavior

  15. TheTk58 commented on Mar 24, 2026

    @TheTk58
    Author

    But the issue is that is exits plan mode, starts implementing normally and only switches model after it is interrupted or stops and a new message is sent. In the example I had given above, it wrote the full html with gemini-3.1-pro. I would assume the expected behavior is a switch right after the plan is confirmed, not after it has written code. What I have to do now to not get it to consume 3.1 Pro tokens, is accept the plan, immediately ctrl + c and then send continue as a new message.

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

Metadata

Metadata

Assignees

Labels

area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitystatus/possible-duplicateworkstream-rollupLabel used to tag epics and features that are associated with one of the three primary workstreams🔒 maintainer only⛔ Do not contribute. Internal roadmap item.

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions