Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Crash with Google Provider #662

Description

@mcowger

Description

The mods application crashes with a "nil pointer dereference" panic when
the google provider is configured and used. The application fails to start
the interactive Bubble Tea TUI, resulting in a terminal restore error and a
crash.

To reproduce

  1. Set up the mods configuration file with a
    google provider section.
  2. Ensure the environment variable for the API key (e.g., GEMINI_API_KEY )
    is set.
  3. Run the mods command with a prompt.
    export GEMINI_API_KEY="your_key_here"
    mods "Explain the theory of relativity"

Expected behavior

The mods application should start its interactive TUI and provide a
response from the Gemini model, without crashing.

Actual behavior

The application crashes immediately before the TUI is displayed, producing
the following error:

❯ mods
Caught goroutine panic:

                       runtime error: invalid memory address or nil

pointer dereference

Restoring terminal...

   ERROR  Couldn't start Bubble Tea program.

  program was killed: program experienced a panic

Environment

• OS: macOS 26.2
• CLI/Terminal: iTerm2
• Mods: v1.8.1

mods Configuration

Here is the relevant section of my configuration file:

# ... other providers like 'openai' may be present ...

google:
  api-key-env: GEMINI_API_KEY
  models:
    gemini-3-flash:
      aliases: ["flash", "gemini"]
      max-input-chars: 392000
    gemini-3-pro:
      aliases: ["pro"]
      max-input-chars: 392000

# ... other settings ...

Additional context

• The crash seems to be directly tied to the google provider configuration.
The issue does not occur if the google section is commented out and a
different provider is used.
• The environment variable GEMINI_API_KEY is confirmed to be set correctly.
• This is a reproducible crash; it happens every time the command is run
with the google provider active.

Version

v1.8.1

Environment

MacOS 26.2 + iTerm2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions