Problem
When /setup-manifest-plugin runs, it writes the Manifest provider config (baseUrl, apiKey, models) into openclaw.json but never updates models.json (~/.openclaw/agents/main/agent/models.json). Since the OpenClaw gateway merges both files at runtime ("mode": "merge"), this causes silent config drift.
How to reproduce
- Run
openclaw onboard — the wizard writes the Manifest provider into models.json with key A
- Later, run
/setup-manifest-plugin (or re-run it with a new key) — the script writes key B into openclaw.json
models.json still has key A — nobody updated it
- Run
/manifest-status → reports WARNING: API key mismatch
Observed result
openclaw.json has mnfst_Ahjk... for the manifest provider
models.json has mnfst_3VSU... for the same provider
- Additionally,
models.json retains a stale auto provider on port 32037 (old Manifest endpoint) that the wizard created, which the setup script never cleans up
Expected result
After running /setup-manifest-plugin, both openclaw.json and models.json should have the same provider config. Stale duplicate providers (like auto with a mnfst_* key on a non-standard port) should be removed.
Root cause
setup_manifest.sh only writes to openclaw.json (via jq and openclaw config set). The wizard (openclaw onboard) writes to a separate file models.json. Neither process is aware of the other file.
Suggested fix
Add a sync step to setup_manifest.sh after writing the provider to openclaw.json:
MODELS_FILE="${OPENCLAW_DIR}/agents/main/agent/models.json"
if [[ -f "$MODELS_FILE" ]]; then
MANIFEST_PROVIDER=$(jq '.models.providers.manifest' "$CONFIG_FILE")
jq --argjson mp "$MANIFEST_PROVIDER" '
.providers.manifest = $mp |
if (.providers.auto?.apiKey // "" | startswith("mnfst_")) then del(.providers.auto) else . end
' "$MODELS_FILE" > "$TEMP" && cp "$TEMP" "$MODELS_FILE"
fi
This copies the manifest provider block from openclaw.json into models.json and removes any stale auto provider that has a mnfst_* key (leftover from a previous wizard run on a different port).
Problem
When
/setup-manifest-pluginruns, it writes the Manifest provider config (baseUrl, apiKey, models) intoopenclaw.jsonbut never updatesmodels.json(~/.openclaw/agents/main/agent/models.json). Since the OpenClaw gateway merges both files at runtime ("mode": "merge"), this causes silent config drift.How to reproduce
openclaw onboard— the wizard writes the Manifest provider intomodels.jsonwith key A/setup-manifest-plugin(or re-run it with a new key) — the script writes key B intoopenclaw.jsonmodels.jsonstill has key A — nobody updated it/manifest-status→ reportsWARNING: API key mismatchObserved result
openclaw.jsonhasmnfst_Ahjk...for the manifest providermodels.jsonhasmnfst_3VSU...for the same providermodels.jsonretains a staleautoprovider on port 32037 (old Manifest endpoint) that the wizard created, which the setup script never cleans upExpected result
After running
/setup-manifest-plugin, bothopenclaw.jsonandmodels.jsonshould have the same provider config. Stale duplicate providers (likeautowith amnfst_*key on a non-standard port) should be removed.Root cause
setup_manifest.shonly writes toopenclaw.json(viajqandopenclaw config set). The wizard (openclaw onboard) writes to a separate filemodels.json. Neither process is aware of the other file.Suggested fix
Add a sync step to
setup_manifest.shafter writing the provider toopenclaw.json:This copies the manifest provider block from
openclaw.jsonintomodels.jsonand removes any staleautoprovider that has amnfst_*key (leftover from a previous wizard run on a different port).