Skip to content

Ollama cloud models: say where they run and what they cost; docs with setup and prices - #144

Merged
nasser1941 merged 1 commit into
mainfrom
feat/ollama-cloud
Oct 20, 2026
Merged

nasser1941 merged 1 commit into
mainfrom
feat/ollama-cloud

Conversation

@nasser1941

Copy link
Copy Markdown
Owner

Why

The user wants to use Ollama's cloud models (tags ending in cloud, e.g. minimax-m3.1-flash:cloud) with lcode, mainly as a cheap stronger model to ask when stuck. They asked for the setup in the docs, plus a list of cheap models that are strong at coding.

Trying it showed four problems. lcode used a cloud model like any installed model, but:

  • The stronger-model panel was wrong. It said Where: … on this machine and Cost: free: it runs on this machine, while the brief actually goes to ollama.com and is billed per token.
  • An Ollama that isn't signed in gave no hint. It returned a bare Ollama error 401: {"error":"Unauthorized"}.
  • lcode doctor gave no warning. It showed a green ✓ with no sign that the model runs in the cloud or needs a sign-in.
  • lcode treated it as local. It tried to load the model into memory at startup and before requests, and checked it against the GPU.

What changes

  • lcode/cloud.py: is_cloud(name) (the tag is cloud or ends with -cloud), the sign-in command (docker exec -it <container> ollama signin when update.find_container finds the Docker container serving that Ollama, else ollama signin), and the user-facing texts.
  • Ollama client: a 401 for a cloud model becomes "… runs in Ollama's cloud (ollama.com), and this Ollama isn't signed in to an ollama.com account. Sign it in with …". This applies to both streaming and plain requests.
  • Escalation: an ollama/<model>:cloud advisor now counts as paid, so the cost comes from escalate_price. Its label is "… (Ollama cloud)", and where it goes reads "ollama.com, through this machine's Ollama" (or through the escalate_url host).
  • lcode doctor, session start and /model now say that what lcode sends goes to ollama.com and is billed per token. Doctor also gives the sign-in command.
  • Local-only steps are skipped for cloud models: the preload, the "Loading … into memory" watch, and the GPU-fit warning.
  • Docs (docs/models.md, new "Cloud models through Ollama" section):
    • what changes, and setup tabs for a normal and a Docker Ollama;
    • using a cloud model as the main model (give --context) or as the stronger one (escalate_model + escalate_price), and troubleshooting;
    • a table of the 15 cloud models that call tools: prices from each model's ollama.com page on 2026-10-20, Terminal-Bench 2.1 where the page publishes it (attributed by table column, vendor-reported), and the most one question to the stronger model costs (15K-token brief + lcode's 4K-token answer cap);
    • links from usage.md (stronger model) and configuration.md (escalate_model).

Checks

  • Unit tests: tests/test_cloud.py (5 tests):
    • tag recognition;
    • the 401 hint over a real HTTP server, for streaming and plain requests, with local models keeping the old error;
    • the panel's where and cost lines;
    • preload, load watch and GPU warning skipped;
    • /model notice.
  • Real runs against a throwaway Ollama 0.35.1 container (separate port, no GPU, removed afterwards) with minimax-m3.1-flash:cloud pulled but not signed in:
    • /api/show reports completion, tools, thinking, vision and a 1,000,000-token context;
    • lcode -p gives the sign-in hint, naming that container;
    • lcode doctor prints the note;
    • a real terminal session shows the notice at startup and lists the model in /models by number.
  • Not tested: a signed-in request to ollama.com, which needs the user's account.
  • Full suite and strict docs build pass.

🤖 Generated with Claude Code

… setup and prices

Tags ending in 'cloud' (minimax-m3.1-flash:cloud) run on ollama.com through the local
Ollama. lcode used them like any installed model, but the stronger-model panel said
'free: it runs on this machine' for them, Ollama's bare 'Unauthorized' gave no hint, and
lcode tried to load them into memory and checked them against the GPU.

Now the panel says ollama.com and shows the cost; a refused request says to run
ollama signin (with the Docker container's name when Ollama runs in one); lcode doctor,
the start of a session and /model say that what lcode sends goes to ollama.com; and the
local loading and GPU checks are skipped for them.

docs/models.md gets a 'Cloud models through Ollama' section: what changes, the setup
for a normal and a Docker install, using one as the main or the stronger model, and the
cloud models that call tools with their prices (ollama.com, 2026-10-20), published
Terminal-Bench 2.1 scores and the cost of one question to the stronger model.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nasser1941
nasser1941 merged commit 5de5a62 into main Oct 20, 2026
12 checks passed
@nasser1941
nasser1941 deleted the feat/ollama-cloud branch October 20, 2026 19:54
@nasser1941 nasser1941 mentioned this pull request Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant