Docs say default model for kilocode is kilocode/kilo/auto but the kilocode docs don't say anything about this endpoint, but instead of ones like kilo-auto/frontier, etc. So is "kilo/auto" just an openclaw alias for a real kilocode model? And if I wanted to use the kilocode model kilo-auto/free how would I use that in openclaw because just setting model to "kilocode/kilo-auto/free" didn't work.
#kilocode
1 messages · Page 1 of 1 (latest)
kilocode/kilo/auto is not an OpenClaw alias to one specific public Kilo model. It’s OpenClaw’s stable default ref for Kilo Gateway’s provider-owned smart router; Kilo owns whatever upstream routing happens behind it. (docs.openclaw.ai)
For Kilo’s free auto route, the current Kilo Gateway model id is kilo-auto/free, so the OpenClaw ref should be:
kilocode/kilo-auto/free
If that didn’t work, check these in order:
openclaw --version
openclaw models list --provider kilocode
If kilo-auto/free doesn’t appear there, update/restart OpenClaw; Kilo models are discovered at Gateway startup. If it does appear but is rejected, you probably have agents.defaults.models acting as an allowlist, so add:
openclaw config set agents.defaults.models '{"kilocode/kilo-auto/free":{}}' --strict-json --merge
openclaw models set kilocode/kilo-auto/free
Also make sure KILOCODE_API_KEY is visible to the Gateway daemon. Docs: https://docs.openclaw.ai/providers/kilocode
is there a command line to send a single message using kilocode/kilo-auto/free without fallbacks?
Yep — use infer model run:
openclaw infer model run \
--local \
--model kilocode/kilo-auto/free \
--prompt "Reply with exactly: pong" \
--json
That’s the narrow one-shot smoke test: no chat session, no tools, no agent context. Explicit CLI model overrides are strict, so it shouldn’t walk your configured fallback chain.
If you want a full OpenClaw agent turn instead:
openclaw agent --agent <agent-id> \
--model kilocode/kilo-auto/free \
--message "Reply with exactly: pong" \
--json
If either fails, first check:
openclaw --version
openclaw models list --provider kilocode
Docs: https://docs.openclaw.ai/cli/infer and https://docs.openclaw.ai/concepts/model-failover
ok when I do 'openclaw models list --all --provider kilocode" in the logs I see Discovery failed: TimeoutError, ...
Running openclaw models I get this
openclaw models
Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : ollama/deepseek-v4-flash:cloud
Fallbacks (7) : ollama/deepseek-v4-flash:cloud, ollama/glm-5.1:cloud, ollama/minimax-m2.7:cloud, kilocode/kilo/auto, kilocode/stepfun/step-3.5-flash:free, openrouter/nvidia/nemotron-3-super-120b-a12b:free, openrouter/openrouter/free
Image model : -
Image fallbacks (0): -
Aliases (0) : -
Configured models (6): manifest/auto, ollama/minimax-m2.7:cloud, openrouter/openrouter/free, ollama/kimi-k2.6:cloud, kilocode/kilo-auto/free, ollama/deepseek-v4-flash:cloud
Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -
- kilocode effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=*** api_key=*** | kilocode:default=eyJhbGci...XWJrFZ7I | env=eyJhbGci...LIRTQWOM | source=env: KILOCODE_API_KEY
...
That Discovery failed: TimeoutError is the key clue.
OpenClaw discovers Kilo models by calling unauthenticated:
GET https://api.kilo.ai/api/gateway/models
If that times out, OpenClaw falls back to its tiny static Kilo catalog — basically kilocode/kilo/auto only. Kilo’s docs do list kilo-auto/free as a real auto tier, so the OpenClaw ref is still kilocode/kilo-auto/free. (docs.openclaw.ai)
Your Configured models already includes kilocode/kilo-auto/free, so this probably isn’t an allowlist problem anymore.
Try these two probes:
curl -4 -fsS --max-time 15 https://api.kilo.ai/api/gateway/models \
| jq '.data[] | select(.id=="kilo-auto/free") | {id,name}'
Then:
openclaw infer model run \
--local \
--model kilocode/kilo-auto/free \
--prompt "Reply with exactly: pong" \
--json
If the curl times out too, it’s network/DNS/IPv6/firewall/proxy from that machine. If curl works but OpenClaw times out, please share:
openclaw --version
openclaw infer model run --local --model kilocode/kilo-auto/free --prompt "Reply with exactly: pong" --json
and the exact error. That would smell like OpenClaw’s 5s Kilo discovery timeout being too aggressive.
I run this '$ curl -4 -fsS --max-time 15 https://api.kilo.ai/api/gateway/models | jq '.data[] | select(.id=="kilo-auto/free") | {id,name}'
{
"id": "kilo-auto/free",
"name": "Auto Free"
}
and I get reponse < second, so it is not actual curl command that is timing out then.
Good catch — because your test used curl -4, this points at Node/OpenClaw’s fetch path, not the Kilo endpoint itself.
Please try the Node-equivalent probe:
node - <<'NODE'
const t = Date.now()
fetch("https://api.kilo.ai/api/gateway/models", {
headers: { Accept: "application/json" },
signal: AbortSignal.timeout(5000),
})
.then(r => r.json())
.then(j => console.log(Date.now() - t, j.data.find(m => m.id === "kilo-auto/free")))
.catch(e => { console.error(Date.now() - t, e.name, e.message, e.cause); process.exit(1) })
NODE
Then try forcing IPv4 for OpenClaw:
NODE_OPTIONS=--dns-result-order=ipv4first \
openclaw models list --all --provider kilocode
If that fixes it, add this to the Gateway environment, e.g. ~/.openclaw/.env:
NODE_OPTIONS=--dns-result-order=ipv4first
Then restart:
openclaw gateway restart
Also please include:
openclaw --version
If plain Node fetch works fast but OpenClaw still logs Discovery failed: TimeoutError, that’s likely an OpenClaw-side discovery timeout/bug and worth filing with the version + those probe results. Docs: https://docs.openclaw.ai/help/environment
yes the node method worked fast also.
Nice — that rules out DNS/IPv6/network from the shell.
At this point I’d separate catalog discovery from actual inference. Since your allowlist already has kilocode/kilo-auto/free, try the actual call:
openclaw infer model run \
--local \
--model kilocode/kilo-auto/free \
--prompt "Reply with exactly: pong" \
--json
If that works, the models list --all --provider kilocode timeout is mostly a discovery/display bug and you can use the model.
If it still fails, please paste:
openclaw --version
NODE_OPTIONS=--dns-result-order=ipv4first openclaw models list --all --provider kilocode
openclaw infer model run --local --model kilocode/kilo-auto/free --prompt "Reply with exactly: pong" --json
Since both curl -4 and plain Node fetch() are fast, an OpenClaw-side timeout here smells like an installed-version bug or a different daemon/CLI environment. If the repro holds, file it here with those outputs: https://github.com/openclaw/openclaw/issues
ok it worked but was very slow.
$ time openclaw infer model run --local --model kilocode/kilo-auto/free --prompt "Reply with exactly: pong" --json
12:53:13 [diagnostic] lane enqueue: lane=session:agent:librarian:main queueSize=1
...
12:53:14 [diagnostic] lane dequeue: lane=main waitMs=0 queueSize=0
13:06:01 [agents/harness] agent harness selected
13:06:01 [agent/embedded] embedded run start: runId=... sessionId=... provider=kilocode model=kilo-auto/free thinking=off messageChannel=unknown
...
13:06:01 [diagnostic] run registered: sessionId=... totalActive=1
13:06:01 [agent/embedded] embedded run prompt start: runId=... sessionId=... provider=kilocode api=openai-completions endpoint=custom route=proxy-like policy=none
13:06:01 [agent/embedded] [context-diag] pre-prompt: sessionKey=agent:librarian:main messages=7 roleCounts=assistant:3,custom:1,toolResult:1,user:2 historyTextChars=1041 maxMessageTextChars=572 historyImageBlocks=0 systemPromptChars=33514 promptChars=24 promptImages=0 provider=kilocode/kilo-auto/free sessionFile=/home/node/.openclaw/agents/librarian/sessions/....jsonl
13:06:01 [agent/embedded] embedded run agent start: runId=...
13:06:13 [agent/embedded] embedded run agent end: runId=... isError=false
13:06:13 [diagnostic] session state: sessionId=... sessionKey=agent:librarian:main prev=processing new=idle reason="run_completed" queueDepth=0
13:06:13 [diagnostic] run cleared: sessionId=... totalActive=0
13:06:13 [agent/embedded] embedded run prompt end: runId=... sessionId=... durationMs=11546
13:06:13 [diagnostic] run clear skipped: sessionId=... reason=handle_mismatch
13:06:13 [agent/embedded] embedded run done: runId=... sessionId=... durationMs=778561 aborted=false
13:06:14 [diagnostic] lane task done: lane=main durationMs=779823 active=0 queued=0
13:06:14 [diagnostic] lane task done: lane=session:agent:librarian:main durationMs=779825 active=0 queued=0
real 19m8.880s
Yep — that log is very revealing: Kilo itself was not the 19-minute part.
The actual model call was here:
embedded run prompt start 13:06:01
embedded run prompt end 13:06:13
durationMs=11546
So Kilo took ~12s. The weird part is the ~13 minute gap before that, and your command is going through a full embedded agent session:
lane=session:agent:librarian:main
agent harness selected
systemPromptChars=33514
sessionFile=...
messages=7
That’s not what current openclaw infer model run --local is supposed to do. It should be a lean raw provider call, not load an agent session/system prompt/history.
Please check/update:
openclaw --version
openclaw update status
openclaw update
Then retry:
time openclaw infer model run \
--local \
--model kilocode/kilo-auto/free \
--prompt "Reply with exactly: pong" \
--json
If it still shows agent/embedded, systemPromptChars, or sessionFile, that’s a bug in the infer path. File it with this log + version: https://github.com/openclaw/openclaw/issues
Docs for expected behavior: https://docs.openclaw.ai/cli/infer
$ openclaw --version
OpenClaw 2026.4.26
And this is latest docker image.
Ah, got it. 2026.4.26 being latest Docker explains the mismatch: the Docker/latest release you’re on is still taking infer model run --local through the embedded agent path. The log proves it:
agent:librarian:main
systemPromptChars=33514
sessionFile=...
So: Kilo is working; the Kilo call itself was only ~11.5s. The extra ~13 minutes is OpenClaw setup/embedded-agent overhead before the request.
For a truly raw Kilo smoke test right now, bypass OpenClaw’s agent path:
curl -fsS https://api.kilo.ai/api/gateway/chat/completions \
-H "Authorization: Bearer $KILOCODE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kilo-auto/free",
"messages": [{"role":"user","content":"Reply with exactly: pong"}],
"stream": false
}' | jq
You can also try this, in case gateway mode is leaner on 2026.4.26:
openclaw infer model run --gateway \
--model kilocode/kilo-auto/free \
--prompt "Reply with exactly: pong" \
--json