Skip to content

docs: explain cold-cache one-shot runs on OpenCode 2 - #51

Merged
yuseferi merged 1 commit into
mainfrom
docs/cold-cache-one-shot-runs
Oct 26, 2026
Merged

yuseferi merged 1 commit into
mainfrom
docs/cold-cache-one-shot-runs

Conversation

@yuseferi

Copy link
Copy Markdown
Owner

Summary

Adds a FAQ entry for #46. On OpenCode 2, a one-shot opencode run fails with Model unavailable: litellm/… when the provider is declared under providers.* and the plugin's model cache is cold. The entry explains why: OpenCode registers config providers only after plugin setup returns, and one-shot commands don't wait for discovery (anomalyco/opencode#57421). It also documents the two workarounds:

  • warm the cache once with an interactive session or opencode serve
  • pass the connection as plugin options, which are discovered during setup; one provider per plugin entry

Closes #46

Type of change

  • 📝 Documentation only

How was this tested?

  • Docs only; git diff --check is clean.
  • The splitting-section anchor and the plugin-options shape were checked against the README headings and makeProviderSource in src/plugin/v2.ts.

Scope

No code changes. The ordering limitation itself is upstream; this PR only documents it.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yuseferi
yuseferi merged commit a107a8f into main Oct 26, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenCode 2: first opencode run fails with "Model unavailable" when the provider is under providers and the model cache is cold

1 participant