Skip to content

Can't connect to Gemini API using opencode.json #1190

@vladbesson

Description

@vladbesson

I want to use Gemini 2.5 pro with opencode so I created ~/.config/opencode/opencode.json file with that:

{
  "$schema": "https://opencode.ai/config.json",
  "providers": {
    "gemini": {
      "api_key": MY_GEMINI_API_KEY
    }
  }
}

However when I run opencode, I get this error:

Error: Config file at /Users/vlad/.config/opencode/opencode.json is invalid
↳ Unrecognized key(s) in object: 'providers'

What I am doing wrong?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions