OpenClaw

Use Sansa as the AI model inside OpenClaw

Overview

OpenClaw is an AI assistant that runs locally and connects to AI providers over the OpenAI completions API. You can point it at Sansa to use sansa-auto as its model.

Setup takes about two minutes:

  1. Add Sansa as a custom provider in openclaw.json
  2. Set sansa-auto as the default model in the agents section
  3. Restart the OpenClaw gateway

Find openclaw.json

OpenClaw stores its config in a hidden folder in your home directory:

PlatformPath
macOS~/.openclaw/openclaw.json
Linux~/.openclaw/openclaw.json
Windows%USERPROFILE%\.openclaw\openclaw.json

Open the file in any text editor. You can also open it from the command line:

# macOS / Linux
open ~/.openclaw/openclaw.json

# Windows
notepad %USERPROFILE%\.openclaw\openclaw.json

Add Sansa as a Provider

Locate the "models" key in your config (or add it if missing) and add a sansa-ai provider entry. See the code panel for the full snippet.

Two fields are required:

  • baseUrl — must be https://api.sansaml.com/v1
  • apiKey — your Sansa API key (sk-sansa-...), available in your dashboard
  • api — must be "openai-completions"

Context window requirements

OpenClaw requires a minimum context window of 16,000 tokens. The recommended values for sansa-auto are:

FieldRecommended valueMinimum
contextWindow13107216000
maxTokens3276816000

Setting these below the minimum will prevent OpenClaw from loading the model.

Set as Default Model

In the "agents" section, set sansa-ai/sansa-auto as the primary model and give it a display alias. See the code panel for the full snippet.

The "primary" field under agents.defaults.model controls which model OpenClaw uses by default for all agents.

Restart the Gateway

After saving the file, restart the OpenClaw gateway to apply the changes:

openclaw gateway restart

Or stop and start it manually if needed.

Verify

Once restarted, OpenClaw should show Sansa as the active model. Send a message to confirm the connection is working.

If you see an authentication error, double-check your apiKey value in openclaw.json.