Skip to content

Provider-key checks ignore the active harness — claude-harness instance locked out of its own web UI #290

Description

@berdyh

I run qm with HARNESS=claude on a Claude subscription (CLAUDE_CODE_OAUTH_TOKEN, no ANTHROPIC_API_KEY). The assistant works — I send it a message and get a real reply.

But the browser can't reach the chat UI. / redirects to /admin/onboarding, which demands a model provider key, and there's no way past it. Storing any key gets me in — I used OpenRouter, for a provider this instance never calls. Non-admins get a 503 "not set up yet" page instead.

Once in, the onboarding page still says "Needs a key — claude-opus-5 cannot run until its Anthropic key is configured" about the model that just answered me.

Three places ask whether a provider key exists without asking whether the harness needs one:

  • src/api/routes/surface.ts:1041modelProviderConfigured from raw store availability; the portal redirects on it (plugins/portal/src/index.ts:1056).
  • plugins/admin/public/index.html:7050-7065 — status derived from the base model's provider.
  • plugins/admin/public/index.html:7047 — onboarding's model dropdown, unfiltered by harness; picking an OpenRouter model saves the key, then fails the base-model PUT with "Key saved, but the base model could not be changed." and no reason shown.

modelProviderAvailabilityFor already answers this correctly (src/model/pi-models.ts:231), and runtimeConfigBody forty lines below surface.ts:1041 uses it. Codex may be the same shape via CODEX_ACCESS_TOKEN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions