| Name | Type | Description |
|---|---|---|
provider_name* | str | The provider to get base URL for. |
Get the configured base URL for a provider.
Resolution order (first match wins):
base_url in the provider's config.toml section.resolve_env_var, in provider
precedence order, so DEEPAGENTS_CODE_{VAR} beats the plain {VAR}
for each name — mirroring how API keys resolve. This also surfaces
the value apply_stored_credentials bridged in from a /auth
credential, and the gateway-provisioned URL in the default
(no-override) case./auth credential. This is the source
for providers that have no base-URL env var (e.g. an OpenAI-
compatible provider like Litellm): step 2 has no name to read, so
the stored endpoint is taken directly. It then reaches the model as
the base_url constructor kwarg via
_get_provider_kwargs, the same path a config.toml literal uses.
For providers that do have an env var, the stored endpoint already
arrives via step 2 (it was bridged onto the env var), so this step
is a redundant — and consistent — fallback.This function only resolves the endpoint; whether it takes effect is a
separate contract owned by the provider's LangChain class. The value is
delivered as the base_url kwarg (see _get_provider_kwargs), which the
OpenAI/Anthropic-compatible classes accept via a Pydantic base_url
alias. A class that names the field differently may silently
ignore base_url — Pydantic models default to extra="ignore" — so for
those the endpoint must be set via params.
A corrupt credential store is treated as "no stored endpoint" rather than propagating, so endpoint resolution never newly raises.