Load backend smoke-test metadata
This commit is contained in:
@@ -168,16 +168,46 @@ are not reserved against configuration changes.
|
||||
| `rakestrawhome` | `https://inference.ai.rakestrawhome.com/v1` | `RAKESTRAWHOME_INFERENCE_API_KEY` | 4 |
|
||||
|
||||
A backend definition may have `endpoint`, `api_key_env`,
|
||||
`concurrency_limit`, `queue_capacity`, and `extra_params`. The final endpoint
|
||||
is required and must be an absolute HTTP(S) URL with a host, no user
|
||||
information, query, or fragment. An omitted or null API-key environment name
|
||||
means no lookup. Omitted/null concurrency is zero (unlimited); a supplied
|
||||
`concurrency_limit`, `queue_capacity`, `extra_params`, and `smoke_tests`. The
|
||||
final endpoint is required and must be an absolute HTTP(S) URL with a host, no
|
||||
user information, query, or fragment. An omitted or null API-key environment
|
||||
name means no lookup. Omitted/null concurrency is zero (unlimited); a supplied
|
||||
negative value is invalid. For positive concurrency, omitted/null queue
|
||||
capacity defaults to 1024. An explicit queue capacity, including zero,
|
||||
requires positive concurrency and must be nonnegative. Unlimited concurrency
|
||||
has no queue. Provider maps contain JSON-compatible values; null entries are
|
||||
ordinary JSON null. Unknown fields, including a raw `api_key`, fail.
|
||||
|
||||
`smoke_tests` is optional backend metadata for explicit diagnostic operations.
|
||||
It may contain `default_profile`, `reachability`, and `authentication`:
|
||||
|
||||
```yaml
|
||||
backends:
|
||||
openrouter:
|
||||
smoke_tests:
|
||||
default_profile: promptkit-openrouter-standard
|
||||
reachability:
|
||||
endpoint: https://status.example/ready?check=1
|
||||
authentication:
|
||||
kind: openrouter_key
|
||||
endpoint: https://openrouter.ai/api/v1/key
|
||||
```
|
||||
|
||||
An omitted or null `smoke_tests` block disables these metadata defaults.
|
||||
`default_profile` is preserved as an exact, nonblank profile ID; its existence
|
||||
is checked only if a diagnostic selects that default. Omitted/null
|
||||
`reachability` or its endpoint uses the effective backend endpoint. An explicit
|
||||
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 requires `kind`, which is trimmed and case-normalized; the
|
||||
recognized values are `none` and `openrouter_key`. Its omitted/null endpoint
|
||||
uses the adapter's backend-relative destination; an explicit endpoint follows
|
||||
the same full-URL rules as reachability. These values are configuration only:
|
||||
engine construction does not contact a backend.
|
||||
|
||||
## Profile Definitions
|
||||
|
||||
Profiles are keyed by literal ID and may inherit a named parent with
|
||||
|
||||
@@ -264,6 +264,10 @@ Validate: `go test ./internal/configuration ./internal/backend` and focused root
|
||||
backend-source tests. Update backend-field GoDoc and `docs/formats.md` as these
|
||||
configuration fields land; runtime smoke-test guidance waits for Stage 18.
|
||||
|
||||
**Completed: 2026-10-13.** Validation passed:
|
||||
`go test ./internal/configuration ./internal/backend`, `go test .`, and
|
||||
`git diff --check`.
|
||||
|
||||
## Stage 3: Resolve Diagnostic Targets Without Preparing Applications
|
||||
|
||||
Scope: selection helpers in `internal/usecase`; no transport.
|
||||
|
||||
Reference in New Issue
Block a user