Skip to content

GEMINI_API_KEY not recognized; auth.json initialized with "test" key — intentional? #6

@ellisjr

Description

@ellisjr

Question / Possible Bug

Two things I noticed during setup that may be worth flagging:

1. Google API key env var naming

The docs reference GOOGLE_GENERATIVE_AI_API_KEY, but Google's own Gemini API tooling (e.g. AI Studio) commonly uses GEMINI_API_KEY. Sidecar doesn't appear to check for GEMINI_API_KEY as a fallback, so users who already have GEMINI_API_KEY set in their shell won't get Gemini access out of the box.

Is this intentional (i.e. following the OpenCode SDK's convention), or would it make sense to also check GEMINI_API_KEY?

2. auth.json initialized with "test" as the OpenRouter API key

After installation, ~/.local/share/opencode/auth.json contains:

{
  "openrouter": {
    "type": "api",
    "key": "test"
  }
}

Was this scaffolded intentionally as a placeholder, or is it a leftover from development? It's a bit confusing because sidecar doesn't warn that the key is invalid — it just fails at request time.

Environment

  • claude-sidecar v0.4.9
  • macOS (Darwin 23.5.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions