Skip to content

[Bug]: Update Gemini model choices #1683

@cleong14

Description

@cleong14
Contributor

Did you check the docs and existing issues?

  • I have read all the docs
    I have updated the plugin to the latest version before submitting this issue
    I have searched for existing issues/discussions
    I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.12.0-dev-2740+g602e9e6211

Operating system/version

MacOS 15.5

Adapter and model

Gemini and gemini-2.5-flash

Describe the bug

Unable to select Gemini model gemini-2.5-flash which has been released but is unavailable under model choices.

Steps To Reproduce

  1. Review the available model choices at
    choices = {
    ["gemini-2.5-pro-preview-06-05"] = { opts = { can_reason = true, has_vision = true } },
    ["gemini-2.5-pro-preview-05-06"] = { opts = { can_reason = true, has_vision = true } },
    ["gemini-2.5-flash-preview-05-20"] = { opts = { can_reason = true, has_vision = true } },
    ["gemini-2.0-flash"] = { opts = { has_vision = true } },
    ["gemini-2.0-flash-lite"] = { opts = { has_vision = true } },
    ["gemini-1.5-pro"] = { opts = { has_vision = true } },
    ["gemini-1.5-flash"] = { opts = { has_vision = true } },
    },
  2. Observe gemini-2.5-flash is missing as an available choice

Expected Behavior

gemini-2.5-flash should be available as a choice.

init.lua file

--[[
NOTE: Set the config path to enable the copilot adapter to work.
It will search the following paths for a token:
  - "$CODECOMPANION_TOKEN_PATH/github-copilot/hosts.json"
  - "$CODECOMPANION_TOKEN_PATH/github-copilot/apps.json"
--]]
vim.env["CODECOMPANION_TOKEN_PATH"] = vim.fn.expand("~/.config")

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

-- Your CodeCompanion setup
local plugins = {
  {
    "olimorris/codecompanion.nvim",
    dependencies = {
      { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
      { "nvim-lua/plenary.nvim" },
      -- Test with blink.cmp (delete if not required)
      {
        "saghen/blink.cmp",
        lazy = false,
        version = "*",
        opts = {
          keymap = {
            preset = "enter",
            ["<S-Tab>"] = { "select_prev", "fallback" },
            ["<Tab>"] = { "select_next", "fallback" },
          },
          cmdline = { sources = { "cmdline" } },
          sources = {
            default = { "lsp", "path", "buffer", "codecompanion" },
          },
        },
      },
      -- Test with nvim-cmp
      -- { "hrsh7th/nvim-cmp" },
    },
    opts = {
      --Refer to: https://github.com/olimorris/codecompanion.nvim/blob/main/lua/codecompanion/config.lua
      strategies = {
        --NOTE: Change the adapter as required
        chat = { adapter = "gemini" },
        inline = { adapter = "gemini" },
      },
      opts = {
        log_level = "DEBUG",
      },
    },
  },
}

-- Leaving this comment in to see if the issue author notices ;-)
-- This is so I can tell if they've really tested with their own repro.lua file

require("lazy.minit").repro({ spec = plugins })

-- Setup Tree-sitter
local ts_status, treesitter = pcall(require, "nvim-treesitter.configs")
if ts_status then
  treesitter.setup({
    ensure_installed = { "lua", "markdown", "markdown_inline", "yaml", "diff" },
    highlight = { enable = true },
  })
end

-- Setup nvim-cmp
-- local cmp_status, cmp = pcall(require, "cmp")
-- if cmp_status then
--   cmp.setup({
--     mapping = cmp.mapping.preset.insert({
--       ["<C-b>"] = cmp.mapping.scroll_docs(-4),
--       ["<C-f>"] = cmp.mapping.scroll_docs(4),
--       ["<C-Space>"] = cmp.mapping.complete(),
--       ["<C-e>"] = cmp.mapping.abort(),
--       ["<CR>"] = cmp.mapping.confirm({ select = true }),
--       -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
--     }),
--   })
-- end

Log output

No log file found at .repro/state/nvim/codecompanion.log

Have you provided and tested with a repro.lua file?

  • Yes, I have tested and provided a repro.lua file

Activity

github-actions

github-actions commented on Jun 21, 2025

@github-actions
Contributor

Important

If your issue does NOT contain a valid minimal.lua then this issue may be closed without a response.
Thanks for respecting my time and efforts.

Thanks @cleong14. I'll get to this as soon as I can.

In the meantime, please ensure:

  • This is a plugin related issue and not an issue with your configuration
  • You've searched for similar issues (try the discussions too)
  • You've checked out the documentation
  • The tables in your configuration are nested correctly (again, check out the documentation)
  • The issue title is accurate
  • There is a valid minimal.lua file included so I can try and recreate the issue
olimorris

olimorris commented on Jun 21, 2025

@olimorris
Owner

Closing as this is an enhancement not an issue.

We tend to only add new models when we're sure they work with all facets of CodeCompanion like tool use, inline editing etc.

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

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @olimorris@cleong14

      Issue actions

        [Bug]: Update Gemini model choices · Issue #1683 · olimorris/codecompanion.nvim