register_provider_profile(
key: str,
profile: ProviderProfile,
) -> None| Name | Type | Description |
|---|---|---|
key* | str | Either a provider name (no colon) for provider-wide defaults,
or a full
|
profile* | ProviderProfile | The provider profile to register. |
Register a ProviderProfile for a provider or specific model.
deepagents.profiles exposes beta APIs that may receive minor changes in
future releases. Refer to the versioning documentation
for more details.
Registrations are additive: if a profile is already registered under
key (including a built-in profile loaded during lazy bootstrap), the new
profile is merged on top rather than replacing it. The incoming profile's
fields win on conflicts; unspecified fields inherit from the existing
profile.
pre_init callables chain (existing runs first), and init_kwargs_factory
callables chain — both factories are invoked at every resolution (base
first, then override) and their outputs merge with the override's values
winning on shared keys.
To layer additional kwargs onto a built-in profile, register under the same provider key. To override a built-in default (e.g. disable the OpenAI Responses API), set the conflicting key explicitly:
from deepagents import ProviderProfile, register_provider_profile
# Adds temperature alongside the built-in `use_responses_api=True`.
register_provider_profile("openai", ProviderProfile(init_kwargs={"temperature": 0}))
# Explicitly disables Responses API for OpenAI. (This will break usage,
# this example is purely illustrative.)
register_provider_profile(
"openai",
ProviderProfile(init_kwargs={"use_responses_api": False}),
)