fix(walkthrough): block unauthenticated providers with a friendly refusal
When the walkthrough small model resolves to a provider with no usable login, readiness was still ready and generate returned a raw 500 message. Refuse up front with no-provider-login and surface a blocker instead. Closes openchamber/openchamber#2607 Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
This commit is contained in:
co-authored by
Serhii Dziupin
parent
f47110c66f
commit
abb396e080
@@ -118,6 +118,13 @@ model picker, only shows providers with a usable login. The in-panel picker on a
|
||||
blocked walkthrough writes this setting too, so recovering from a refusal never
|
||||
silently changes the model behind commit messages.
|
||||
|
||||
A settings or `opencode.json` `small_model` override can still name a provider
|
||||
with no usable login (neither `auth.json` nor `provider.<id>.options.apiKey`).
|
||||
`describeSmallModel` reports that as `hasLogin: false`, readiness refuses with
|
||||
`code: 'no-provider-login'`, and generation maps the same code to HTTP 401 —
|
||||
so the panel shows a blocker with a model picker instead of looking ready and
|
||||
then dumping the raw `No OpenCode login found for provider "…"` string.
|
||||
|
||||
## Output language
|
||||
|
||||
A walkthrough its reader cannot read is worth nothing, so the prose language is
|
||||
|
||||
Reference in New Issue
Block a user