Goal
Discover OpenCode's installed/provider-visible models for a canonical runtime profile while retaining safe explicit provider/model entry.
Requirements
- Discovery runs in the profile's effective OS-user, provider, and credential context.
- Parse a documented machine-readable interface where available; do not scrape interactive UI.
- Cache per runtime profile/provider/auth context.
- Preserve OpenCode's nested model identifiers, including OpenRouter-style paths.
- A discovery failure must leave structurally valid explicit entry available.
- Workshop and Telegram consume the same inventory and status.
Acceptance criteria
- Results are principal-scoped and secret-free.
- Provider changes invalidate the applicable cache.
- A selected but temporarily undiscovered model remains visible and is not silently replaced.
- Tests cover nested identifiers, empty/malformed results, timeouts, and stale-cache fallback.
Goal
Discover OpenCode's installed/provider-visible models for a canonical runtime profile while retaining safe explicit
provider/modelentry.Requirements
Acceptance criteria