Declarative configuration for constructing a chat model.
deepagents.profiles exposes beta APIs that may receive minor changes in
future releases. Refer to the versioning documentation
for more details.
A ProviderProfile describes provider- or model-specific kwargs,
pre-initialization side effects, and runtime-derived kwargs that should be
applied when resolve_model turns a string spec (e.g. "openai:gpt-5.4")
into a BaseChatModel. Profiles are registered via
register_provider_profile under a provider key ("openai") or a full
provider:model key ("openai:gpt-5.4").
Profiles handle model-construction concerns only — things that shape how
init_chat_model assembles the client instance. Typical examples:
constructor kwargs like use_responses_api, temperature, max_tokens,
or base_url; provider-specific headers such as OpenRouter app
attribution; pre-construction checks like minimum-version enforcement;
and env-var-aware defaults.
Runtime and harness behavior — system-prompt assembly, tool description
overrides, excluded tools, extra middleware, general-purpose subagent
configuration — belongs in HarnessProfile, the separate harness
profile system consumed by create_deep_agent, not here.
Example:
Set a default temperature for a hypothetical provider:
from deepagents import ProviderProfile, register_provider_profile
register_provider_profile(
"my_provider",
ProviderProfile(init_kwargs={"temperature": 0.7}),
)