| Name | Type | Description |
|---|---|---|
model_spec | str | None | Default: NoneModel specification in |
extra_kwargs | dict[str, Any] | None | Default: NoneAdditional kwargs to pass to the model constructor. These take highest priority, overriding values from the config file. |
profile_overrides | dict[str, Any] | None | Default: None |
Create a chat model.
Uses init_chat_model for standard providers, or imports a custom
BaseChatModel subclass when the provider has a class_path in config.
Supports provider:model format (e.g., 'openai:gpt-5.5')
for explicit provider selection, or bare model names for auto-detection.
Extra profile fields from --profile-override.
Merged on top of config file profile overrides (dcode wins).