Problem
The BYOK setup wizard in src/setup.ts writes a configPatch that uses the old URL-redirect approach:
{
"models": {
"providers": {
"<upstreamProvider>": {
"baseUrl": "http://127.0.0.1:8787/v1"
}
}
}
}
This is incorrect. The correct design (as manually patched in openclaw.json) is to add a new bitrouter provider entry:
{
"models": {
"providers": {
"bitrouter": {
"baseUrl": "http://127.0.0.1:8787/v1",
"api": "openai-completions",
"models": []
}
}
}
}
Impact
Running the BYOK wizard on a fresh install — or re-running it — will overwrite openclaw.json with the wrong config, breaking routing. The before_model_resolve hook overrides the provider to "bitrouter", which must exist in openclaw.json's models.providers. Without api: "openai-completions", OpenClaw falls back to openai-responses and hits /v1/responses — a path BitRouter does not serve.
Fix Required
Update src/setup.ts writePatch() / buildConfigPatch() to write:
models.providers.bitrouter.baseUrl = http://127.0.0.1:<port>/v1
models.providers.bitrouter.api = "openai-completions"
models.providers.bitrouter.models = []
And add an auth profile entry for bitrouter:default with the plugin JWT.
Labels
bug, openclaw, setup
Problem
The BYOK setup wizard in
src/setup.tswrites aconfigPatchthat uses the old URL-redirect approach:{ "models": { "providers": { "<upstreamProvider>": { "baseUrl": "http://127.0.0.1:8787/v1" } } } }This is incorrect. The correct design (as manually patched in
openclaw.json) is to add a newbitrouterprovider entry:{ "models": { "providers": { "bitrouter": { "baseUrl": "http://127.0.0.1:8787/v1", "api": "openai-completions", "models": [] } } } }Impact
Running the BYOK wizard on a fresh install — or re-running it — will overwrite
openclaw.jsonwith the wrong config, breaking routing. Thebefore_model_resolvehook overrides the provider to"bitrouter", which must exist inopenclaw.json'smodels.providers. Withoutapi: "openai-completions", OpenClaw falls back toopenai-responsesand hits/v1/responses— a path BitRouter does not serve.Fix Required
Update
src/setup.tswritePatch()/buildConfigPatch()to write:models.providers.bitrouter.baseUrl=http://127.0.0.1:<port>/v1models.providers.bitrouter.api="openai-completions"models.providers.bitrouter.models=[]And add an auth profile entry for
bitrouter:defaultwith the plugin JWT.Labels
bug,openclaw,setup