Skip to content

feat: add Ollama Cloud as a declarative provider#8189

Open
vincenzopalazzo wants to merge 1 commit intoaaif-goose:mainfrom
vincenzopalazzo:codex/explore-ollama-cloud
Open

feat: add Ollama Cloud as a declarative provider#8189
vincenzopalazzo wants to merge 1 commit intoaaif-goose:mainfrom
vincenzopalazzo:codex/explore-ollama-cloud

Conversation

@vincenzopalazzo
Copy link
Copy Markdown
Contributor

@vincenzopalazzo vincenzopalazzo commented Mar 29, 2026

Summary

  • Add Ollama Cloud as a declarative provider via a minimal JSON config (ollama_cloud.json)
  • Uses the OpenAI-compatible engine with dynamic model discovery via /v1/models
  • Document the provider in the getting-started guide and expose the API key label in the desktop UI

Use Case

Run Goose against Ollama Cloud by setting OLLAMA_CLOUD_API_KEY and selecting any cloud-hosted model — no local Ollama daemon required.

Simplified approach co-developed with @michaelneale (see #8335).

Verification

  • source bin/activate-hermit && cargo clippy --all-targets -- -D warnings
  • Confirmed https://ollama.com/v1/models returns a valid OpenAI-compatible model list

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 66bfb71079

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0cc95fd9d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@vincenzopalazzo vincenzopalazzo force-pushed the codex/explore-ollama-cloud branch from 0cc95fd to 1936bd3 Compare March 29, 2026 15:42
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1936bd3d1b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@DOsinga DOsinga added the needs_human label to set when a robot looks at a PR and can't handle it label Mar 30, 2026
@DOsinga DOsinga requested a review from jh-block March 30, 2026 13:44
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f09f43c0b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@DOsinga
Copy link
Copy Markdown
Collaborator

DOsinga commented Apr 2, 2026

On second thought, I think this should be a declarative provider that directly connects to ollama.com - possibly as an openai compatible provider rather than ollama. adding api keys to ollama itself seems confusing

Copy link
Copy Markdown
Collaborator

@DOsinga DOsinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a declaratitve provider instead?

Copy link
Copy Markdown
Contributor Author

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call -- fixed in 2e6236d. Ollama Cloud supports the OpenAI-compatible /v1/chat/completions endpoint, so a declarative provider is the right approach. Reverted the auth/URL complexity from ollama.rs and toolshim.rs and added a simple ollama_cloud.json declarative provider with engine: "openai". Much simpler.

@vincenzopalazzo vincenzopalazzo force-pushed the codex/explore-ollama-cloud branch 2 times, most recently from 1e830d3 to df25df7 Compare April 2, 2026 15:09
@vincenzopalazzo vincenzopalazzo requested a review from DOsinga April 2, 2026 15:12
@vincenzopalazzo vincenzopalazzo force-pushed the codex/explore-ollama-cloud branch from 4094c17 to 1f1f583 Compare April 2, 2026 15:42
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f1f583403

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me - @vincenzopalazzo do you mind updating to main, and shouldn't need changes to goose hints or String utils etc - to keep it clean, but I like this.

@michaelneale
Copy link
Copy Markdown
Collaborator

could it be as simple as this? #8335 or am I missing something? thanks!, ollama cloud is pretty neat

@vincenzopalazzo vincenzopalazzo force-pushed the codex/explore-ollama-cloud branch 2 times, most recently from ae8d69f to be36210 Compare April 7, 2026 13:50
@vincenzopalazzo
Copy link
Copy Markdown
Contributor Author

Ok, this is built on top of the review that @michaelneale did (thanks BTW), and this should be the final message be36210

Please let me know if there is anything else to do!

Add ollama_cloud.json using the OpenAI-compatible engine with dynamic
model discovery via /v1/models.

Co-developed-by: Michael Neale <michael@michaelneale.com>
@vincenzopalazzo vincenzopalazzo force-pushed the codex/explore-ollama-cloud branch from be36210 to 5420bda Compare April 7, 2026 14:03
@vincenzopalazzo vincenzopalazzo changed the title fix: support direct Ollama Cloud access feat: add Ollama Cloud as a declarative provider Apr 7, 2026
@michaelneale
Copy link
Copy Markdown
Collaborator

ok so to be clear - this means if someone wants to use ollama cloud, they don't need ollama desktop installed? (it is so weird to me ollama do that but I get it!)

@vincenzopalazzo
Copy link
Copy Markdown
Contributor Author

vincenzopalazzo commented Apr 8, 2026

ok so to be clear - this means if someone wants to use ollama cloud, they don't need ollama desktop installed? (it is so weird to me ollama do that but I get it!)

Yes, correct, I found this pretty cool for beginners who are moving from Claude to something else, or just for people who are starting out and don't want (or can't afford) to use a paid model. Free open-source models hosted via Ollama Cloud are a great on-ramp.

This feature actually came out of a conversation with some friends who were using the free tier of Claude and hitting their quota way too fast. For their use case, Goose + an open-source model was more than enough, but they didn't have the disk space to download local models either. That's when it clicked: Goose should just ship this out of the box.

P.S. Honestly, this use case deserves a blog post too 😄

@jh-block
Copy link
Copy Markdown
Collaborator

jh-block commented Apr 8, 2026

@DOsinga @michaelneale your 'requesting changes' reviews block merging this, can you take a look and switch them to 'approve' if you're happy with @vincenzopalazzo's new declarative approach?

@jh-block jh-block enabled auto-merge April 8, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs_human label to set when a robot looks at a PR and can't handle it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants