Skip to content

v2: remote config failures discard settings and change the selected model #53666

Closed

Description

@Ayushlm10

Description

A failed authenticated remote-config fetch removes previously loaded provider settings and restrictions. If the selected model disappears, the TUI chooses another available model and saves that replacement when Enter is pressed.

Expected: retain valid settings or block model use, and preserve the selected model until the user changes it.

Plugins

Built-in only.

OpenCode version

v2, reproduced at 80c4a6b7 (2.0.24).

Steps to reproduce

  1. Use a local well-known endpoint whose remote config supplies a provider and an enabled_providers allowlist.
  2. Log in and open a session using that provider's model.
  3. Make the remote config endpoint return 503 and trigger a config refresh.
  4. Inspect the provider list and submit a synthetic prompt after the selected model becomes unavailable.

The remote settings disappear, and submission can commit a different model.

Screenshot and/or share link

Before / After. Synthetic terminal fixture captures.

Operating System

macOS

Terminal

Native TUI test fixture.

Activity

  1. github-actions commented on Oct 7, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #10930: Requests falling back to cached well-known config when the endpoint is temporarily unavailable.
    • #23116: Requests graceful handling of failed well-known remote-config fetches.
  2. opencode-agent commented on Oct 7, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report. I reproduced the config part on v2.0.24:

    1. A local well-known server whose authenticated remote_config defines a provider and enabled_providers: ["example-primary"].
    2. opencode2 auth login http://127.0.0.1:8787. After that, opencode2 models lists only example-primary/example-chat.
    3. I made the remote config endpoint return 503 and triggered a config reload by editing the global opencode.json. The log shows failed to load wellknown config.
    4. opencode2 models now lists the default free opencode/* models instead. The remote provider and the allowlist are both gone, and they only come back once the endpoint returns 200 and the config reloads.

    I haven't checked the second half, where the TUI picks a different model and saves it on Enter, but it follows from the provider disappearing.

  3. added 2 commits that reference this issue on Oct 8, 2026
    c292586
    f108fa4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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