get_provider_profile(
spec: str,
) -> ProviderProfile | None| Name | Type | Description |
|---|---|---|
spec* | str | Model spec in |
Look up the ProviderProfile for a model spec.
deepagents.profiles exposes beta APIs that may receive minor changes in
future releases. Refer to the versioning documentation
for more details.
Resolution order:
spec.:), when spec
contains a colon and both halves are non-empty.None when neither matches.When both an exact-model profile and a provider-level profile exist, they
are merged via _merge_provider_profiles with the exact-model entry
overriding the provider-level entry on conflicts.
When only the provider-level profile matches, a debug breadcrumb is emitted so registrations layered on an exact key can be traced when they don't apply (e.g. typo'd specs falling through to the provider default).
Malformed specs (empty string, more than one :, or a : with an empty
provider/model half) return None without consulting the registry. This
prevents a spec like "openai:" from silently matching the provider-wide
"openai" registration.
apply_provider_profile for model constructionThis function is intended for inspection (tooling, conditional logic
on pre_init presence). To actually build a model, reach for
apply_provider_profile — it composes lookup, pre_init invocation,
and kwargs merging into a single call.