Resolve authentication diagnostics by provider

This commit is contained in:
2026-11-22 18:16:13 +00:00
parent adc700f96e
commit ca8cf1b827
10 changed files with 123 additions and 38 deletions

View File

@@ -253,7 +253,7 @@ backends:
endpoint: https://openrouter.ai/api/v1/key
```
An omitted or null `smoke_tests` block disables these metadata defaults.
An omitted or null `smoke_tests` block removes its declared metadata.
`default_profile` is preserved as an exact, nonblank profile ID; its existence
is checked only if an inference diagnostic selects that default. Omitted/null
`default_profile` means there is no inference default. Omitted/null
@@ -262,14 +262,17 @@ reachability endpoint is trimmed and must be an absolute HTTP(S) URL with a
host; unlike the backend base endpoint, its path and query are allowed. Null
means fallback, while an explicit blank value is invalid.
Omitted/null `authentication` means no authentication adapter is declared. A
non-null object's optional `kind` is trimmed and case-normalized; accepted
Omitted/null `authentication` leaves the provider's diagnostic default in
effect; `openrouter` defaults to `openrouter_key` and the generic provider has
no default. A non-null object's optional `kind` is trimmed and case-normalized; accepted
values are `none`, `openrouter_key`, and `vllm_models`. Its omitted/null endpoint
uses the adapter's backend-relative destination (`openrouter_key` appends
`/key` to the effective backend base); an explicit endpoint follows the same
full-URL rules as reachability. `none` declares authentication inapplicable.
Without a selected adapter, or for `vllm_models`, authentication diagnostics
currently report an unsupported selection.
currently report an unsupported selection. An endpoint-only authentication
block overrides the destination of a provider default; `kind: none` suppresses
that default.
These values are configuration only: engine construction does not contact a
backend.

View File

@@ -58,7 +58,7 @@ report facts, and injected-client behavior.
HTTP-only diagnostics use the configured built-in HTTP client. Reachability is
one unauthenticated `GET` to the selected diagnostic URL; an observed response
counts as reachable even when its status is non-2xx. Authentication behavior
is selected from backend metadata, not inferred from the host. The
is selected from backend metadata and provider defaults, not inferred from the host. The
`openrouter_key` adapter makes one `GET` to `/key` relative to the effective
backend base, unless configuration supplies a full diagnostic endpoint (see
the [backend format reference](../formats.md#backend-definitions)). It may send

View File

@@ -176,6 +176,8 @@ Validation: configuration capture, backend inspection, bundle, and preparation t
## Stage 5 — Generic Authentication Dispatch And OpenRouter Defaults
**Completed.**
Current provider branches occur in `internal/usecase/smoke_authentication.go` and
`smoke_selection.go`, including `ProbeOpenRouterKey` and endpoint derivation.