Skip to content

Support for Ollama Cloud API with API key authentication #2175

Description

@orrinwitt

Problem Description

Currently, Nanobot's ollama provider is designed for local Ollama instances (no auth). Users can already access Ollama Cloud models by routing through a local Ollama instance, but this potentially adds unnecessary latency and requires running local infrastructure. There's no documented way to connect directly to Ollama's cloud API.

Ollama Cloud API Details

From Ollama's documentation:

  • Endpoint: https://ollama.com/api
  • Authentication: Bearer token in Authorization header
  • Environment variable: OLLAMA_API_KEY

Proposed Solution

Add native support for Ollama Cloud API:

  1. Support API key authentication in the ollama provider
  2. Document configuration for both local and cloud Ollama
  3. Handle Authorization header properly when apiKey is provided

Use Case

Users who want to:

  • Test out an LLM completely for free through Ollama's limited cloud access before paying for it on something like OpenRouter
  • Use Ollama's cloud-hosted models (e.g., gpt-oss:120b-cloud) without running local hardware
  • Reduce latency by connecting directly to Ollama Cloud instead of routing through a local Ollama instance

Related Issues

Documentation References


Question: Has anyone successfully configured the ollama provider for Ollama Cloud? Would the maintainers prefer enhancing the existing ollama provider or creating a separate ollama-cloud provider?

Metadata

Metadata

Assignees

No one assigned

    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