Description
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/v1can be configured as an OpenAI-compatible provider for OCR. - Whether Ollama Cloud reliably supports the
tools/tool_callsflow required byocr 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-cloudprovider.
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/v1if 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-branchA 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:120bIt would also be helpful to document a small verification path:
ocr llm testfor connectivity- a minimal
ocr reviewrun 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:
- Ollama Cloud: https://docs.ollama.com/cloud
- Ollama OpenAI compatibility: https://docs.ollama.com/api/openai-compatibility.md
Related but not identical issues:
- 使用gitlab配置ci报这个错误 #222: local Ollama model failed because the model did not support tools/function calling
- code review如何通过本地模型review #234: local Ollama models produced
No tool calls parsed - Support for Gemini API #49: general discussion of OpenAI-compatible providers
I would be happy to work on a PR after confirming the desired direction for a built-in Ollama Cloud provider preset.
Activity
feat(llm): add built-in Ollama Cloud provider preset
lizhengfeng101 commentedon Jul 15, 2026
Thanks for the well-researched issue and the clear proposed solution. We'd love to see this become a built-in provider.
There's currently an open PR (#310) from another contributor addressing this, but we still need runtime verification — particularly around whether Ollama Cloud's OpenAI-compatible endpoint reliably supports the
tools/tool_callsflow thatocr reviewrequires.If you're still interested in contributing, we'd welcome a strong PR from you as the original issue author — especially one that includes:
ocr llm testand a minimalocr reviewrun against the Ollama Cloud endpointYour familiarity with the Ollama Cloud docs and the nuances between local vs. cloud Ollama puts you in a great position to deliver a high-quality contribution here.
ayden94 commentedon Jul 15, 2026
@lizhengfeng101 Thanks for the thoughtful response and for prioritizing the original issue author.
I'm happy to take this on. I'll prepare a PR that includes:
ollama-cloudprovider presetocr llm testand a minimalocr reviewrun against the Ollama Cloud endpointRegarding #310: I'll review it as well in case there are pieces worth building on, but I'll submit an independent PR tied to this issue.
I'll aim to open the PR within the next few days.
feat(llm): add built-in Ollama Cloud provider preset (alibaba#375)
feat(llm): add built-in Ollama Cloud provider preset (alibaba#375)