feat(llm): add built-in Ollama Cloud provider preset#310
Open
chethanuk wants to merge 1 commit into
Open
Conversation
Add an ollama-cloud entry to the provider registry: OpenAI protocol, base URL https://ollama.com/v1, env OLLAMA_API_KEY, models gpt-oss:120b and gpt-oss:20b. Values match Ollama Cloud's OpenAI-compatible endpoint. Tests cover provider order/count and per-field lookup details. Closes alibaba#305
Comment on lines
+232
to
+237
| BaseURL: "https://ollama.com/v1", | ||
| EnvVar: "OLLAMA_API_KEY", | ||
| Models: []string{ | ||
| "gpt-oss:120b", | ||
| "gpt-oss:20b", | ||
| }, |
Contributor
There was a problem hiding this comment.
Potential issue: The BaseURL https://ollama.com/v1 does not appear to be a documented or verified Ollama Cloud API endpoint. Ollama is primarily known as a local LLM runtime (default http://localhost:11434), and there is no well-known public cloud API at this URL. Similarly, the model names gpt-oss:120b and gpt-oss:20b do not correspond to any known publicly available models.
Please verify:
- Is this BaseURL correct and currently active?
- Are these model names accurate for this provider?
If this is a placeholder or speculative entry, consider adding a comment or marking it accordingly to avoid confusion.
This was referenced Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a built-in
ollama-cloudprovider preset to the registry ininternal/llm/providers.go, so Ollama Cloud can be selected directly instead of hand-configured as a custom provider.The preset uses the OpenAI-compatible protocol against
https://ollama.com/v1, reading the API key fromOLLAMA_API_KEY(sent asAuthorization: Bearer <key>, the shared default for OpenAI-protocol entries — no per-providerAuthHeader). It ships two models,gpt-oss:120bandgpt-oss:20b. The base URL, env var, and model naming match Ollama Cloud's documented OpenAI-compatible endpoint.Opened against my own fork first as a staging/review step.
Type of Change
How Has This Been Tested?
gofmt -lreports no diffs,go vet ./internal/llm/is clean, andgo test ./internal/llm/passes (176 tests). Coverage includes the existingTestListProviders_Order(updated for the new sorted position) and a newTestLookupProvider_OllamaCloudDetailsthat pins Protocol, BaseURL, EnvVar, empty AuthHeader, and each model name individually.Whether Ollama Cloud's OpenAI endpoint reliably supports the tool-calls flow that
ocr reviewneeds is a runtime/e2e concern, out of scope for this preset addition.make testpasses locallyChecklist
go fmt,go vet)Related Issues
Closes #305