Expand description
Model catalog merging, provider-scoped selection and private execution binding.
Hosts supply all configuration and environment access through RuntimeConfig and ValueSource. Credential precedence, exact model matching, saved defaults and provider/API routing are shared by embedded apps and the CLI adapter.
Structs§
- Resolved
Model - The resolved run configuration: the provider handle, the chosen model, and
the effective thinking level (after
--thinking/:level/ model-clamp). - Runtime
Factories
Enums§
- Resolve
Error - A resolution error. The TS resolver returns
{ error, warning }; v1 folds both into a single enum since the CLI treats them the same (print + non-zero exit) exceptNoApiKey, which prints guidance then exits.
Constants§
- ANTHROPIC_
API_ KEY_ ENV - The env var consulted for the API key. Mirrors TS
ANTHROPIC_API_KEY. - ANTHROPIC_
AUTH_ TOKEN_ ENV - The env var consulted for a bearer token (routed as
Authorization: Bearer). Mirrors TSANTHROPIC_AUTH_TOKEN— used by third-party Anthropic-compatible gateways (one-api/new-api/claude-code-router and private reverse proxies) that authenticate viaAuthorizationrather thanx-api-key. - ANTHROPIC_
BASE_ URL_ ENV - The env var that overrides the Anthropic endpoint base URL. Mirrors TS
ANTHROPIC_BASE_URL— point this at a gateway/proxy that speaks the/v1/messagesprotocol. - DEFAULT_
MODEL_ ID - The default Anthropic model when
--modelis absent. Kept in sync with the current upstreamdefaultModelPerProvider.anthropicentry. - DEFAULT_
THINKING_ LEVEL - The default thinking level when neither
--thinkingnor a:levelsuffix is present. Mirrors the TSDEFAULT_THINKING_LEVEL("medium", clamped to model capabilities by the harness’s provider build_params). - NO_
API_ KEY_ HINT - Hint text surfaced when no credential source is available. Lists every accepted source so the user can pick the one that fits their setup.
- OPENAI_
API_ KEY_ ENV - Standard OpenAI API-key environment variable used by the
openai-completionsprovider.
Functions§
- authenticated_
catalog - Credential-free descriptors for every configured runtime, including packages. Bound credentials and request headers stay inside each execution binding.
- available_
catalog - Credential-free descriptors for the selected provider. Authentication was already checked before the common factory created its execution binding.
- catalog_
with_ diagnostics - Credential-free catalog and compatibility diagnostics without selecting a model.