Notes

Going local with one line: reading base URL settings

As of 2026-10-09 — counted from the results published that day

“It also runs locally” is something one line of code says more precisely than a README. When the code that calls a cloud API reads that API's address from a setting, and the setting can point at a local server, the call stays on your machine. This note shows what that line looks like and how to find it on a result page.

The OpenAI-compatible convention

Most local runners — Ollama, LM Studio, the llama.cpp server, vLLM — serve the same endpoints as the OpenAI API (/v1/chat/completions and so on). So code written against the OpenAI SDK works with a local model once the base URL it sends requests to is changed. What this site calls a “local-server setting” is the setting that decides that base URL.

Of the 149 published results, 79 repositories have an external API call, and 9 of them have such a setting for at least one call. 14 repositories are “Calls external APIs · local option”; the other 5 have a local way of another shape, such as a menu that picks a local runner or a local server in the same file, rather than an address setting. The per-provider numbers are in the “Local-server setting” column of Repositories by API.

Two shapes seen in code

1. Read an environment variable, fall back to a local default

In TauricResearch/TradingAgents, line 361 of cli/prompts.py reads the OLLAMA_BASE_URL environment variable and uses http://localhost:11434/v1 when it is empty. The provider list right below it has cloud addresses such as OpenAI and Anthropic next to this Ollama address. Line 24 of the same repository's docker-compose.yml sets the variable to http://ollama:11434/v1.

Code like this means “you can pick a cloud provider or a local one”. On the result page the repository is “Calls external APIs · local option”, and the alternative column of the feature table names the local runner.

2. Take the address from a setting when the client is built

In Tencent/WeKnora, line 122 of dataset/qa_dataset.py builds an OpenAI client with the key from OPENAI_API_KEY and the address from OPENAI_BASE_URL. There is no default in the code, so with nothing set it goes to the SDK's default address (OpenAI). With a local server's address in that variable, the same code calls a local model.

The difference from the first shape is where the default points: left empty, the first goes local and the second goes to the cloud. Result pages tell the two apart with the “Cloud by default” and “Can switch to local” tags.

Finding it on a result page

  • A repository state of “Calls external APIs · local option” means at least one call has a local way in the code.
  • In the feature table, the default column shows where a call goes when nothing is set, and the alternative column what can replace it.
  • Expanding the call sites leads to the file and line, pinned to the commit — the links in the two examples above are such sites.

What the setting does not tell you

Being able to change the address is not the same as working equally well with a local model. If a tool relies on a particular model's features (long context, a tool-call format), results can differ locally. And within one repository some calls may be switchable while others are fixed cloud addresses. That is why this site does not sum a repository up in one sentence and lists each call on its own.

More notes · Repositories by API · Methodology