Originally created by: lodar
Closes DIVE-3130.
sudo 5dive agent create <n> --type=openclaw --provider=zai --api-key=- reports success,
the seat boots, agent list prints AUTH ok — and every message dies on
"auth or provider access failed for openai. Run /auth openai to refresh credentials".
OPENCLAW_PROVIDER_MODEL has no [zai] row, so ${override_model:-${OPENCLAW_PROVIDER_MODEL[$canonical]:-}}
resolves to the empty string, the if [[ -n $model ]] pin is skipped, and
agents.defaults.model.primary is never written. openclaw falls back to its built-in
default (openai/gpt-5.5) — and in openclaw the first path segment picks the provider
AND the credential, so the seat authenticates as openai with no openai key.
This is exactly the state DIVE-3113's preconditions exist to prevent ("a profile that
HOLDS A KEY AND NO MODEL PIN ... does not read as broken"). That guard is not wrong, it
is scoped to providers that have a model row: it is itself guarded by [[ -n "$model" ]],
so it fails closed on a wrong model id and cannot fire at all on an absent one.
key written + no model pin is now a refusal for every provider, placed inside the
DIVE-3113 precondition block above the auth-profiles.json write, so a refusal costs a
re-run rather than a half-provisioned profile. The message names the remedy (--model=<id>)
and the oracle to grade the id with (openclaw models list --provider <native> --plain).
Same hole, now also closed: minimax, qwen, huggingface — all three have an
OPENCLAW_PROVIDER_ID row and no model row, so they produced the identical 401 seat.
Measured on this host, openclaw 2026.7.1-2: models list --provider zai --plain →
"No models found", and the GLM ids the catalog carries sit under byteplus/, novita/,
nvidia/, together/, volcengine/. The ticket asked whether zai stays under a new
native id or is dropped for openclaw.
Kept. An unenumerated openclaw namespace is one of the three documented NO-ORACLE
states (community/wiki/a-byo-model-pin-can-only-be-graded-off-ci.md), not proof that the
provider is unroutable, and the DIVE-1826 coding-endpoint pin in OPENCLAW_PROVIDER_URL
still applies. Dropping the id is the irreversible read of ambiguous evidence; requiring an
explicit --model is the reversible one. No [zai] model row was added — per the
OPENCLAW_PROVIDER_MODEL header, an id must be graded against the installed version's own
per-provider list first, and here that list is empty. The reasoning is written next to
OPENCLAW_PROVIDER_ID[zai] so the next reader does not re-derive it.
New harness tests/openclaw_empty_model_refusal_unit.sh (core tier, 0.16s measured on
the 5dive control plane, 2026-08-10 — no root, no network, every writer stubbed, no
credential written by the run). 10 assertions: the ticket's exact create refuses; the
refusal lands before the credential write; the message names remedy + oracle; the same
for minimax/qwen/huggingface.
Control arms with a non-zero expected value (so the guard cannot pass by breaking the
whole BYO path): --provider=openai (has a catalog row) is untouched, and --provider=zai
--model=zai/glm-4.6 still proceeds.
Mutation-graded, one per part of the fix:
a credential was written despite the empty model
pin (WROTE_AUTH=1) — i.e. the harness reproduces the defect, not just its absence;if [[ -n "$model" ]] (the DIVE-3113 blind spot) → 7 of 10 red.Neighbouring harnesses pass: byo_model_create_unit, hermes_openclaw_byo_model_unit,
openclaw_zai_baseurl_unit, openclaw_init_provider_unit, openclaw_runtime_unit.
Full core tier locally: 263/269 pass. The 6 failures (install_checksum_unit, ledger_unit,
policy_refusals_unit, task_board_write_fence_unit, verify_close_merge_gate_stamp_unit,
verify_prose_result_open_row_unit) fail identically on a clean origin/main worktree on
this box — pre-existing here (no built ./5dive bundle), not introduced by this change.
The budget line reads UNDETERMINED (exit 6) for the same reason, which is a local
artifact; CI grades it.
_apply_byo_hermes resolves its model fromHERMES_PROVIDER_MODEL, which also has no [zai] row; whether hermes then falls back to
Ticket changed by: 5dive-bot