fix: add provider hook for OpenCode >=1.14.49 model listing API (#12) (#16)
* fix: add provider hook for OpenCode >=1.14.49 model listing API OpenCode 1.14.49 introduced the v2 model/provider listing API (ProviderHook) as the canonical way to supply models. PR #14's fix only set models in the config hook, which is ignored on 1.14.49+. - Add ProviderHook types to custom type declaration - Implement provider.models() callback that fetches /v1/models via ctx.auth - Keep config hook eager-fetch for <=1.14.48 backward compat - Add 3 regression tests for provider hook * chore: remove unnecessary type assertion in provider hook fallback * fix: align provider model type shim * fix(provider): always return own defaults when unauthenticated * style(types): add blank line between ProviderHook and Hooks interfaces * test(provider): verify stale models are ignored when unauthenticated * chore(release): bump version to 1.1.4 --------- Co-authored-by: Sebastian Rumpf <alp4d0g007@googlemail.com>
K
kkMihai committed
fd698588f968c3ed1e7165ddbc5e7f1de7b1ac11
Parent: 8eef859
Committed by GitHub <noreply@github.com>
on 5/15/2026, 10:13:58 AM