Skip to content

"AI_APICallError: No auth credentials found" despite providing credentials #1631

Closed

Description

@t3dotgg

I have provided the key using opencode auth login, here's the state of my auth.json file

Image

And here's what happens when I try any openrouter model

Image

Activity

  1. self-assigned this
    on Aug 6, 2025
  2. thdxr commented on Aug 6, 2025

    @thdxr
    Member

    if you do opencode auth list what does it print

  3. kvnpmz commented on Aug 15, 2025

    @kvnpmz

    Seems like this is happening with me too. Doesn't matter which OpenRouter model I pick.

    kevin@ubuntu:~/
    $ opencode auth list

    ┌ Credentials ~/.local/share/opencode/auth.json
    │
    ● Google api
    │
    ● OpenRouter api
    │
    ● OpenAI api
    │
    └ 3 credentials

  4. blankbash commented on Sep 26, 2025

    @blankbash

    Namespace conflict: change your variable name from OPENROUTER_API_KEY to OPENROUTER_KEY and you are good to go.

  5. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions