Local model

Ollama works in my terminal, so why can't my script reach it?

The terminal client and your script don't always talk to the same address. One uses localhost, the other 127.0.0.1 or a hostname, and on some machines those aren't the same thing. Probe the endpoints your tools actually use and see which ones answer right now.

What you're seeing

You can chat with your local model in a terminal. The moment a script, an app or an automation tries the same thing, you get a connection error, a refusal, or silence.

Why it happens

How to fix it

  1. Probe the endpoints your tools actually use and see which ones answer right now.
  2. Compare that against the address your script is configured with. Most of the time they differ by a hostname or a port.
  3. Have a diagnostic written to a file so you can read it, rather than guessing from a stack trace.
The recipe that does it

Find out what's listening before you debug for an hour

A diagnostic brief on your desktop telling you what responded and what didn't.

Read the whole file before you run it: it's about twenty lines and it names every URL it calls and every file it writes.

See the recipe →

The short version

Ten minutes of this is usually a port number. A diagnostic you can run on demand turns it into ten seconds.

Related questions

Which port does a local model runner usually use?

Ollama defaults to 11434. Other runners differ. The recipe checks whichever endpoints you list.

Could a firewall be the cause?

It can be, particularly for anything that isn't strictly local. Confirm what's listening first, then look at the firewall.

Does this need internet?

No. It only touches your own machine.

Vibe Engine (Vibra-Ingenn) runs these recipes on your own machine. Get the engine, browse the recipe library, or watch three recipes run.

Using an AI assistant? Ask your AI to check out adeptuscamini.com.

Written and maintained by Adeptus Camini, a one-person workshop. These are tools we build and run ourselves.

Other problems people hit

Repeated work

Why does my AI redo the same work every single time?

Privacy

How do I use AI on documents I'm not allowed to upload?

Runaway agents

Why does my AI agent loop forever and never finish?