Skip to main content

Module provider

Module provider 

Source
Expand description

File, trust and native-extension adapters for the shared model runtime.

Structs§

ResolvedModel
The resolved run configuration: the provider handle, the chosen model, and the effective thinking level (after --thinking / :level / model-clamp).

Enums§

ResolveError
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) except NoApiKey, 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 TS ANTHROPIC_AUTH_TOKEN — used by third-party Anthropic-compatible gateways (one-api/new-api/claude-code-router and private reverse proxies) that authenticate via Authorization rather than x-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/messages protocol.
DEFAULT_MODEL_ID
The default Anthropic model when --model is absent. Kept in sync with the current upstream defaultModelPerProvider.anthropic entry.
DEFAULT_THINKING_LEVEL
The default thinking level when neither --thinking nor a :level suffix is present. Mirrors the TS DEFAULT_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-completions provider.

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_all
catalog_with_manifests
manifests_from_session
resolve
resolve_for_cwd
Resolve using upstream’s global -> trusted-project settings precedence.
resolve_with_extensions