Skip to content

[Bug]: Oolama api #142

Closed
Closed

Description

@vebaev

Summary

Oolama models gives unexpected error 403 forbiden.

Reproduction

Added api for oolama cloud.

Logs and screenshots

Area

CLI

Version

No response

OS

No response

Config shape

Checks

  • I searched existing issues and docs first.
  • I removed secrets, tokens, and personal data from logs and screenshots.

Activity

  1. vebaev commented on Jul 17, 2026

    @vebaev
    Author

    Here is the log with some errors if this helps:

    Image
  2. Wibias commented on Jul 17, 2026

    @Wibias
    Contributor

    The Details would help! @vebaev

  3. vebaev commented on Jul 17, 2026

    @vebaev
    Author

    Here are some details of the various errors, for the oolama not sure why I got this, I thought with free limits I can test every model provided with their api.... hmm?

    PS. opencodex is great app!

    Image Image Image Image Image Image
  4. Wibias commented on Jul 17, 2026

    @Wibias
    Contributor

    For nvidia that is expected, when there is too much demand right now. Dont know about ollama though!

  5. Wibias commented on Jul 18, 2026

    @Wibias
    Contributor

    @vebaev Not sure on how it works with the Ollama cloud models since it kinda confuses me access to cloud models and run cloud models, but can u normally run the models? Since its saying invalid api key, im kinda confused. Also I think we should give out better labels for why we failing the calls.

  6. Wibias commented on Jul 18, 2026

    @Wibias
    Contributor

    Ahh, wait. I overlooked ur messages at the screenshots.

    On Ollama Cloud: Free does not mean every cloud model. Free is light usage + a subset of models; a lot of the bigger ones (including many Kimi / large Qwen / DeepSeek-class models) return 403 and need Pro. So if the key works but that model is gated, Ollama rejects it even though the API key itself is fine.

    That also explains the confusing Details UI: we currently map many upstream 403s to invalid_api_key, which looks like a bad key when it’s really “authenticated, but this model/plan isn’t allowed.”

    Quick check if you want: try something that’s usually free-tier friendly on the same key (e.g. gemma4:31b). If that works, your setup is fine and the earlier 403 was plan/model access.

    I’ll improve those error labels so permission / subscription failures don’t look like invalid API keys.

  7. lidge-jun commented on Jul 18, 2026

    @lidge-jun
    Owner

    Two-part resolution:

    1. The misleading label is fixed. Your screenshot showed a bare upstream 403 surfacing as invalid_api_key, which pointed you at the wrong cause. This is now fixed on dev (commits 5292b98 + 4d28558, absorbing PR #145 with repairs): a bare Provider error 403 now classifies as permission_denied, and subscription-style messages classify as subscription_required — verified end-to-end with an Ollama-shaped error body through the real server → adapter → classifier path.

    2. The 403 itself comes from Ollama, not opencodex. Evidence from review:

    • Direct ollama.com API access requires a bearer API key (auth docs);
    • kimi-k2.7-code:cloud is a large cloud model — Ollama's Free tier covers light usage/smaller models, while Pro unlocks the larger cloud models (pricing);
    • the same Kimi-family 403 ("this model requires a subscription, upgrade for access") is reported upstream in ollama/ollama#15741 while other models work on the same account.

    So the request was authenticated but your Ollama plan doesn't include that model. A free-tier-covered model with the same key should work; kimi-k2.7-code needs an Ollama Pro subscription. Closing as an upstream plan restriction — the opencodex-side mislabeling that made this confusing is fixed and ships with the next release.

  8. vebaev commented on Jul 18, 2026

    @vebaev
    Author

    Thanks, that explains it :) Oolama should explain it more clearly.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions