Skip to content

Add built-in Ollama Cloud provider preset #305

Description

@ayden94

Problem Statement

I would like to use OpenCodeReview with Ollama Cloud as a first-class LLM provider, not a local or self-hosted Ollama server.

Ollama Cloud provides hosted models through ollama.com with API key authentication. OpenCodeReview already supports custom OpenAI-compatible providers, but the documentation and provider list do not clearly indicate whether Ollama Cloud can be used directly as an OCR LLM provider.

This is different from local Ollama compatibility issues. Existing Ollama-related issues such as #222 and #234 mainly discuss local/self-hosted Ollama models, tool-calling support, and timeout/performance behavior. The request here is specifically about direct Ollama Cloud API support through a built-in provider preset.

Today it is unclear to users:

  • Whether https://ollama.com/v1 can be configured as an OpenAI-compatible provider for OCR.
  • Whether Ollama Cloud reliably supports the tools / tool_calls flow required by ocr review.
  • Which model names and authentication settings should be used.
  • Whether users should manually configure a custom provider or whether OCR intends to provide a built-in ollama-cloud provider.

Proposed Solution

Add a built-in provider preset for Ollama Cloud, for example ollama-cloud.

Possible behavior:

  • Use the OpenAI-compatible protocol if it is compatible with OCR's review flow.
  • Use Authorization: Bearer <OLLAMA_API_KEY> authentication.
  • Default the provider URL to https://ollama.com/v1 if that is the correct OpenAI-compatible endpoint.
  • Document supported setup and verification steps.

Example user flow:

export OLLAMA_API_KEY=your_api_key

ocr config provider
# select ollama-cloud

ocr config model
# select or enter an Ollama Cloud model, for example gpt-oss:120b

ocr llm test
ocr review --from main --to feature-branch

A non-interactive setup could look like:

ocr config set provider ollama-cloud
ocr config set providers.ollama-cloud.api_key "$OLLAMA_API_KEY"
ocr config set providers.ollama-cloud.model gpt-oss:120b

It would also be helpful to document a small verification path:

  • ocr llm test for connectivity
  • a minimal ocr review run that exercises tool calling

If Ollama Cloud's OpenAI-compatible endpoint is not compatible with OCR's required tool-calling flow, please document that limitation and whether supporting Ollama's native /api/chat protocol would be the preferred direction.

Alternatives Considered

  • Manually configure Ollama Cloud as a custom OpenAI-compatible provider. This may already work, but it is not documented or verified for OCR's tool-calling review flow.
  • Use local Ollama with a signed-in account and cloud model tags. This still requires a local Ollama daemon and is not the same as direct Ollama Cloud API access.
  • Use another OpenAI-compatible provider, but that does not help users who specifically want to use Ollama Cloud billing/models.

Affected Area

Review Agent / LLM interaction, Configuration, Documentation

Additional Context

Relevant Ollama docs:

Related but not identical issues:

I would be happy to work on a PR after confirming the desired direction for a built-in Ollama Cloud provider preset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions