Skip to content

bug: "Reason: TypeError: resolved.startsWith is not a function" #23934

@Kamilcuk

Description

@Kamilcuk

What happened?

When starting gemini with any --model it throws a type error.

│ ℹ  Detected terminal background color: #000000                                                                                          │
│                                                                                                                                         │
│ ℹ  Detected terminal name: tmux 3.6a                                                                                                    │
│                                                                                                                                         │
│ ℹ  Authenticated via "gemini-api-key".                                                                                                  │
│ ✖  =========================================                                                                                            │
│    This is an unexpected error. Please file a bug report using the /bug tool.                                                           │
│    CRITICAL: Unhandled Promise Rejection!                                                                                               │
│    =========================================                                                                                            │
│    Reason: TypeError: resolved.startsWith is not a function                                                                             │
│    Stack trace:                                                                                                                         │
│    TypeError: resolved.startsWith is not a function                                                                                     │
│        at isCustomModel                                                                                                                 │
│    (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/config/models.js │
│    :216:22)                                                                                                                             │
│        at supportsModernFeatures                                                                                                        │
│    (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/config/models.js │
│    :228:12)                                                                                                                             │
│        at CodebaseInvestigatorAgent                                                                                                     │
│    (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/agents/codebase- │
│    investigator.js:33:19)                                                                                                               │
│        at AgentRegistry.loadBuiltInAgents                                                                                               │
│    (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/agents/registry. │
│    js:180:31)                                                                                                                           │
│        at AgentRegistry.loadAgents                                                                                                      │
│    (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/agents/registry. │
│    js:91:14)                                                                                                                            │
│        at AgentRegistry.initialize                                                                                                      │
│    (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/agents/registry. │
│    js:46:20)                                                                                                                            │
│        at Config._initialize                                                                                                            │
│    (file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/config/config.js │
│    :670:34)                                                                                                                             │
│        at async file:///home/kamil/.node_modules/lib/node_modules/@google/gemini-cli/dist/src/ui/AppContainer.js:254:17   

What did you expect to happen?

I expected no exception.

Client information

Client Information

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

/about
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ About Gemini CLI │
│ │
│ CLI Version 0.35.1 │
│ Git Commit 8804fb7
│ Model gemini-2.0-flash-lite │
│ Sandbox no sandbox │
│ OS linux │
│ Auth Method gemini-api-key │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions