Problem — Disconnecting a model provider whose credentials come from the user config file (e.g. opencode zen or amazon-bedrock) shows the "disconnected" success toast, but the provider stays in the connected list. The disconnect flow only removes auth-store credentials and disposes instances; config-sourced credentials are re-read on the next provider-state rebuild, so the provider comes straight back as connected. The working disable path (adding the provider to the config's disabled-providers list, which the server honors on rebuild and which already triggers a full provider-list refetch) is currently reserved for custom openai-compatible providers only. A prior fix covered the connect path (auth mutation → dispose → refresh, plus store re-keying); disconnect semantics for config-sourced credentials were never covered. The same latent gap exists upstream — a subset of this fix is upstreamable later.
Acceptance Criteria
Problem — Disconnecting a model provider whose credentials come from the user config file (e.g. opencode zen or amazon-bedrock) shows the "disconnected" success toast, but the provider stays in the connected list. The disconnect flow only removes auth-store credentials and disposes instances; config-sourced credentials are re-read on the next provider-state rebuild, so the provider comes straight back as connected. The working disable path (adding the provider to the config's disabled-providers list, which the server honors on rebuild and which already triggers a full provider-list refetch) is currently reserved for custom openai-compatible providers only. A prior fix covered the connect path (auth mutation → dispose → refresh, plus store re-keying); disconnect semantics for config-sourced credentials were never covered. The same latent gap exists upstream — a subset of this fix is upstreamable later.
Acceptance Criteria