Skip to content

bug? Ollama does not work as a provider unless configured with an API key #227

Closed

Description

@johnsaigle

I configured my opencode.json file to add Ollama as a provider. However, it only worked if I:

  • ran opencode auth login
  • chose "Other"
  • Added an API key like "abc" (providing an empty string was forbidden)

This should probably be fixed -- I imagine a lot of people will set up Ollama to work on localhost or LAN without requiring an API key.

Activity

  1. thdxr commented on Jun 20, 2025

    @thdxr
    Member

    hm i didn't need to do that let me double check

  2. johnsaigle commented on Jun 20, 2025

    @johnsaigle
    Author

    Thanks, it's possible actually that the JSON was mangled (trailing comma at the end of the models entry).
    That might have been failing silently. I thought it was adding the API key that fixed this but I might have forgotten the exact order of how I got things set up.

  3. thdxr commented on Jun 20, 2025

    @thdxr
    Member

    i'll add proper config validation

  4. self-assigned this
    on Jun 20, 2025
  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!

  6. added 2 commits that reference this issue on Jan 1, 2026
    a6f5d33
    4811302
  7. added a commit that references this issue on Apr 7, 2026
    1f74889
  8. added a commit that references this issue on May 12, 2026
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