Warning — Don't Use /v1 URL With Remote Ollama

Using the OpenAI-compatible /v1 endpoint with Ollama breaks tool calling, causing models to output raw JSON as plain text instead of executing tools. The native Ollama API URL is required.

Warning — Don't Use /v1 URL With Remote Ollama

OpenClaw is warning users not to point remote Ollama connections at the OpenAI-style /v1 URL if they want tool calling to work. According to the project’s documentation, that endpoint can cause models to emit raw JSON as plain text instead of actually invoking tools through OpenClaw.

The issue matters because tool calling is the part of an agent workflow that lets a model hand off structured requests to external functions, APIs, or scripts. In practical terms, that is how an assistant can look up data, trigger automation, query a database, or perform other actions without treating the request as ordinary chat text.

⚡ New to this?

This is about a configuration mismatch between an AI agent and the model server it talks to. Tool calling is the mechanism that lets a model ask software to do something, like run a function or fetch data, instead of just writing text about it.

Ollama is a tool for running AI models locally or on your own servers, and OpenClaw is software that can connect those models to automation workflows. If the endpoint is wrong, the model may produce JSON, which is a structured data format, but the agent will not treat it as an action request.

🦞 OpenClaw angle

If your Ollama agent is dumping raw JSON instead of calling tools, check your URL config. Remove /v1 and use the native endpoint.

Ollama is popular for running large language models locally or on private infrastructure, and OpenClaw is built to connect those models to agent-style workflows. The problem here is not with Ollama itself, but with how the API is addressed. OpenClaw says the native Ollama API URL is required for correct behavior when tools are involved.

The OpenAI-compatible /v1 path is a common convenience layer in AI tooling because it lets one client talk to multiple model providers with a similar request format. That compatibility can be useful for simple text generation, but OpenClaw’s documentation says it does not preserve the tool-calling behavior needed for agents when used with remote Ollama.

When tool calling breaks, the model may still appear to answer, but the output comes back as literal JSON in the text stream rather than as a structured tool request. For developers, that can look like a model that is “trying” to call a tool but never actually hands the request to the runtime that should execute it.

That distinction matters in automation systems. A text response can be read by a person, but a tool call is meant for software, where the agent framework parses the model’s intent and decides what action to take next. If the response format is wrong, the chain stops at generation and the workflow never advances.

OpenClaw’s note is aimed at users configuring Ollama in remote mode, where the model is not running in the same process as the agent framework. In those setups, endpoint choice becomes part of the integration layer, and small mismatches can change how the model behaves even when the underlying model is the same.

The documentation update also reflects a broader reality in AI infrastructure: compatibility layers are not always full substitutes for native APIs. Two endpoints can look similar on paper, but still differ in how they handle structured outputs, function schemas, or other features that agent systems depend on.

For teams building internal assistants or self-hosted workflows, this kind of warning can save time because the symptom is easy to misread. A broken tool call often looks like a model issue, when the real problem is the request path used to reach the model server.

OpenClaw’s guidance is specific, but it highlights a common integration failure mode in agent software. The model may be fine, the tools may be fine, and the framework may be fine, but the wrong API URL can still turn an intended tool call into plain JSON text.

Source: OpenClaw GitHub ↗

More from OpenClaw News