Ollama context overflows even though the model runs on a large GPU

Adapted community discussion: Paraphrased and condensed from an anonymized public OpenClaw Discord support conversation from August 2026. Technical guidance was reviewed for OpenClaw 2026.9.3.

OpenClaw says my Ollama prompt is too large for the model. The client runs on a small laptop, but Ollama is on a separate server with a high-memory GPU. Which OpenClaw setting should I change?

The laptop RAM is not the prompt limit. Ollama’s effective num_ctx on the model server is. Configure the provider model with a context size the model and server can really support, then set OpenClaw’s contextTokens below that value so there is room for system prompts, tools, and output. Use Ollama’s native base URL without /v1. Start a new session after changing the model context.

What context size should I start with?

Use the model’s reported native context and the server’s available memory as the ceiling. A practical starting pattern is to give Ollama the larger budget and keep OpenClaw several thousand tokens below it. For example, a server that comfortably supports 32,768 tokens might use an OpenClaw budget around 24,000, with a smaller recent-history target. Reduce it if the model spills out of GPU memory or becomes unstable; increase it only after measuring the server.