anomalyco / anomalyco/opencode

[Bug] Desktop 1.18.29 can offer OAuth models missing from active provider state

Open
#47,490 5 comments 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Sep 5, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Correction

The original provider-prefix diagnosis was incorrect. OpenCode intentionally formats ProviderModelNotFoundError as <providerID>/<modelID>, so openai/gpt-6-astra does not prove that the provider prefix was passed inside modelID.

The verified failure is that OpenCode Desktop 1.18.29 offered a current OpenAI OAuth model in the picker, but that model was missing from the running provider state. The unfiltered catalog still contained it, which is why the error suggested the same model ID.

Description

With the built-in OpenAI provider connected through ChatGPT/Codex OAuth, Desktop accepted a prompt but showed no assistant response. The backend failed before streaming:

ProviderModelNotFoundError: Model not found: openai/gpt-5.6-terra.
Did you mean: gpt-5.6-terra, ...?

The same occurred with gpt-6-astra. Both are documented OpenAI models:

The persisted Desktop selection was correct:

{
  "providerID": "openai",
  "modelID": "gpt-6-astra"
}

No OPENAI_* environment overrides or external plugins were configured.

Local recovery

Refreshing the OpenCode model catalog and restarting Desktop repaired the local provider state:

opencode models openai --refresh

After the refresh, a clean CLI request using the same OpenAI OAuth login and model succeeded:

opencode run --pure --model openai/gpt-5.6-terra \
  --format json 'Reply with exactly: OPENCODE_GPT_OK'

It returned OPENCODE_GPT_OK. This confirms that authentication, account access, model availability, and the OpenAI transport are healthy.

Expected behavior

Desktop should refresh/rebuild its active provider model state when the catalog changes, or at least surface an actionable error with a refresh/restart recovery path.

Actual behavior

A model present in the picker/catalog can be absent from the running OAuth provider state. Prompt processing fails before streaming, while the Desktop UI appears to do nothing.

Version and platform
  • OpenCode Desktop 1.18.29
  • Ubuntu 26.04.1 LTS, Linux x86_64
  • Electron 42.3.3
Related issues
  • #47162 covers model-not-found errors becoming opaque.
  • #32366 covers Desktop not surfacing/recovering from backend errors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.