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:
- Add Sansa as a custom provider in
openclaw.json - Set
sansa-autoas the default model in theagentssection - Restart the OpenClaw gateway
Find openclaw.json
OpenClaw stores its config in a hidden folder in your home directory:
| Platform | Path |
|---|---|
| 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.jsonAdd 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 behttps://api.sansaml.com/v1apiKey— your Sansa API key (sk-sansa-...), available in your dashboardapi— must be"openai-completions"
Context window requirements
OpenClaw requires a minimum context window of 16,000 tokens. The recommended values for sansa-auto are:
| Field | Recommended value | Minimum |
|---|---|---|
contextWindow | 131072 | 16000 |
maxTokens | 32768 | 16000 |
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 restartOr 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.