Skip to content

Commit f97431c

Browse files
committed
refactor: remove ModelProviderRegistry.default and require ModelConfig.provider (#590)
Final cleanup after the #589 deprecation cycle. Providers are now a named list referenced by name end-to-end — no hidden registry default, no YAML default leaking into DataDesigner construction (#588), and no ambiguity about which provider wins. ModelConfig.provider becomes a required str. ModelProviderRegistry.default and the associated validators, get_default_provider_name() helper, CLI "Change default provider" workflow, and the "Default" column in `data-designer config list` are removed. resolve_model_provider_registry() drops its default_provider_name kwarg, and DataDesigner.__init__ no longer threads a YAML default through registry construction. Pydantic v2's extra="ignore" default lets existing on-disk YAMLs with default: keys load cleanly, so users on the deprecation cycle migrate without breakage.
1 parent e181b4b commit f97431c

37 files changed

Lines changed: 153 additions & 923 deletions

docs/concepts/models/configure-model-settings-with-the-cli.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@ data-designer config providers
6565

6666
**Delete all providers**: Remove all providers and their associated models.
6767

68-
**Change default provider**: Set which provider is used by default. This option is only available when multiple providers are configured.
69-
70-
!!! warning "Deprecated: 'Change default provider' workflow"
71-
The "Change default provider" workflow is **deprecated** and will be removed in a future
72-
release alongside the registry-level default. Specify `provider=` explicitly on each
73-
`ModelConfig` instead — the workflow now emits a `DeprecationWarning` when entered.
74-
See [issue #589](https://github.com/NVIDIA-NeMo/DataDesigner/issues/589).
75-
7668
## Managing Model Configurations
7769

7870
Run the interactive model configuration command:
@@ -117,7 +109,6 @@ data-designer config list
117109
This command displays:
118110

119111
- **Model Providers**: All configured providers with their endpoints (API keys are masked)
120-
- **Default Provider**: The currently selected default provider _(deprecated; see issue #589)_
121112
- **Model Configurations**: All configured models with their settings
122113

123114
## Resetting Configurations

docs/concepts/models/custom-model-settings.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,6 @@ preview_result.display_sample_record()
9090
!!! note "Default Providers Always Available"
9191
When you only specify `model_configs`, the default model providers (NVIDIA, OpenAI, and OpenRouter) are still available. You only need to create custom providers if you want to connect to different endpoints or modify provider settings.
9292

93-
!!! warning "Always specify `provider=` on `ModelConfig`"
94-
Leaving `provider` unset (or passing `provider=None`) on `ModelConfig` is **deprecated**.
95-
The legacy "implicit default provider" routing — used when `provider` is omitted — emits
96-
a `DeprecationWarning` and will be removed in a future release. Always reference the
97-
intended provider by name, as the examples below do. See
98-
[issue #589](https://github.com/NVIDIA-NeMo/DataDesigner/issues/589).
99-
10093
!!! tip "Mixing Custom and Default Models"
10194
When you provide custom `model_configs` to `DataDesignerConfigBuilder`, they **replace** the defaults entirely. To use custom model configs in addition to the default configs, use the add_model_config method:
10295

docs/concepts/models/default-model-settings.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ Both methods operate on the same files, ensuring consistency across your entire
110110
!!! warning "Hosted Provider Data Handling"
111111
The default model providers call hosted endpoints operated by NVIDIA, OpenAI, OpenRouter, or their upstream providers. Provider terms and privacy practices apply independently of Data Designer, and free or trial endpoints may log request data for security, operations, or product improvement. Do not submit confidential information or personal data, including faces, voices, screenshots, regulated data, or other sensitive content, unless the selected provider and endpoint are approved for your use case.
112112

113-
!!! warning "Deprecated: implicit default provider routing"
114-
The `default:` key in `~/.data-designer/model_providers.yaml` and the registry-level
115-
"default provider" concept are **deprecated** and will be removed in a future release.
116-
Specify `provider=` explicitly on every `ModelConfig` instead — the built-in defaults
117-
above already do this, and a `DeprecationWarning` is now emitted whenever the legacy
118-
routing is exercised. See [issue #589](https://github.com/NVIDIA-NeMo/DataDesigner/issues/589).
119-
120113
!!! tip "Environment Variables"
121114
Store your API keys in environment variables rather than hardcoding them in your scripts:
122115

docs/concepts/models/model-configs.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ The `ModelConfig` class has the following fields:
1515
| `alias` | `str` | Yes | Unique identifier for this model configuration (e.g., `"my-text-model"`, `"reasoning-model"`) |
1616
| `model` | `str` | Yes | Model identifier as recognized by the provider (e.g., `"nvidia/nemotron-3-nano-30b-a3b"`, `"gpt-4"`) |
1717
| `inference_parameters` | `InferenceParamsT` | No | Controls model behavior during generation. Use `ChatCompletionInferenceParams` for text/code/structured generation or `EmbeddingInferenceParams` for embeddings. Defaults to `ChatCompletionInferenceParams()` if not provided. The generation type is automatically determined by the inference parameters type. See [Inference Parameters](inference-parameters.md) for details. |
18-
| `provider` | `str` | No | Reference to the name of the Provider to use (e.g., `"nvidia"`, `"openai"`, `"openrouter"`). If not specified, one set as the default provider, which may resolve to the first provider if there are more than one |
18+
| `provider` | `str` | Yes | Reference to the name of the Provider to use (e.g., `"nvidia"`, `"openai"`, `"openrouter"`). |
1919
| `skip_health_check` | `bool` | No | Whether to skip the health check for this model. Defaults to `False`. Set to `True` to skip health checks when you know the model is accessible or want to defer validation. |
2020

21+
!!! warning "Upgrade note"
22+
Every `ModelConfig` must now specify `provider`. Existing `model_configs.yaml` entries from older releases that omit `provider` or set it to `null` must be updated with an explicit provider name before loading. Agent tooling that parses `data-designer agent context` should read the `provider` field for each model alias; `default_provider`, `configured_provider`, and `effective_provider` are no longer emitted.
23+
2124

2225
## Examples
2326

docs/concepts/models/model-providers.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ Model providers are external services that host and serve models. Data Designer
66

77
A `ModelProvider` defines how Data Designer connects to a provider's API endpoint. When you create a `ModelConfig`, you reference a provider by name, and Data Designer uses that provider's settings to make API calls to the appropriate endpoint.
88

9-
!!! warning "Deprecated: implicit default provider routing"
10-
Earlier versions of Data Designer let you omit `provider=` on `ModelConfig` and
11-
fall back to a registry-level default — including the `default:` key in
12-
`~/.data-designer/model_providers.yaml`. That implicit routing is **deprecated**
13-
and will be removed in a future release. Always reference a provider by name on
14-
every `ModelConfig`. A `DeprecationWarning` is now emitted when the legacy path
15-
is exercised. See [issue #589](https://github.com/NVIDIA-NeMo/DataDesigner/issues/589).
16-
179
## ModelProvider Configuration
1810

1911
The `ModelProvider` class has the following fields:

fern/versions/latest/pages/concepts/models/configure-model-settings-with-the-cli.mdx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ data-designer config providers
7474

7575
**Delete all providers**: Remove all providers and their associated models.
7676

77-
**Change default provider**: Set which provider is used by default. This option is only available when multiple providers are configured.
78-
79-
<Warning title="Deprecated: 'Change default provider' workflow">
80-
The "Change default provider" workflow is **deprecated** and will be removed in a future release alongside the registry-level default. Specify `provider=` explicitly on each `ModelConfig` instead — the workflow now emits a `DeprecationWarning` when entered. See [issue #589](https://github.com/NVIDIA-NeMo/DataDesigner/issues/589).
81-
</Warning>
82-
8377
## Managing Model Configurations
8478

8579
Run the interactive model configuration command:
@@ -128,7 +122,6 @@ data-designer config list
128122
This command displays:
129123

130124
- **Model Providers**: All configured providers with their endpoints (API keys are masked)
131-
- **Default Provider**: The currently selected default provider _(deprecated; see [issue #589](https://github.com/NVIDIA-NeMo/DataDesigner/issues/589))_
132125
- **Model Configurations**: All configured models with their settings
133126

134127
## Resetting Configurations

fern/versions/latest/pages/concepts/models/custom-model-settings.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ preview_result.display_sample_record()
9494
When you only specify `model_configs`, the default model providers (NVIDIA, OpenAI, and OpenRouter) are still available. You only need to create custom providers if you want to connect to different endpoints or modify provider settings.
9595
</Note>
9696

97-
<Warning title="Always specify `provider=` on `ModelConfig`">
98-
Leaving `provider` unset (or passing `provider=None`) on `ModelConfig` is **deprecated**. The legacy "implicit default provider" routing — used when `provider` is omitted — emits a `DeprecationWarning` and will be removed in a future release. Always reference the intended provider by name, as the examples below do. See [issue #589](https://github.com/NVIDIA-NeMo/DataDesigner/issues/589).
99-
</Warning>
97+
<Note title="Provider is required">
98+
Every custom `ModelConfig` must reference the intended provider by name. The examples below use the built-in `nvidia` provider.
99+
</Note>
100100

101101
<Tip title="Mixing Custom and Default Models">
102102
When you provide custom `model_configs` to `DataDesignerConfigBuilder`, they **replace** the defaults entirely. To use custom model configs in addition to the default configs, use the add_model_config method:

fern/versions/latest/pages/concepts/models/default-model-settings.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,6 @@ Both methods operate on the same files, ensuring consistency across your entire
116116
The default model providers call hosted endpoints operated by NVIDIA, OpenAI, OpenRouter, or their upstream providers. Provider terms and privacy practices apply independently of Data Designer, and free or trial endpoints may log request data for security, operations, or product improvement. Do not submit confidential information or personal data, including faces, voices, screenshots, regulated data, or other sensitive content, unless the selected provider and endpoint are approved for your use case.
117117
</Warning>
118118

119-
<Warning title="Deprecated: implicit default provider routing">
120-
The `default:` key in `~/.data-designer/model_providers.yaml` and the registry-level "default provider" concept are **deprecated** and will be removed in a future release. Specify `provider=` explicitly on every `ModelConfig` instead — the built-in defaults above already do this, and a `DeprecationWarning` is now emitted whenever the legacy routing is exercised. See [issue #589](https://github.com/NVIDIA-NeMo/DataDesigner/issues/589).
121-
</Warning>
122-
123119
<Tip title="Environment Variables">
124120
Store your API keys in environment variables rather than hardcoding them in your scripts:
125121

fern/versions/latest/pages/concepts/models/model-configs.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ The `ModelConfig` class has the following fields:
1818
| `alias` | `str` | Yes | Unique identifier for this model configuration (e.g., `"my-text-model"`, `"reasoning-model"`) |
1919
| `model` | `str` | Yes | Model identifier as recognized by the provider (e.g., `"nvidia/nemotron-3-nano-30b-a3b"`, `"gpt-4"`) |
2020
| `inference_parameters` | `InferenceParamsT` | No | Controls model behavior during generation. Use `ChatCompletionInferenceParams` for text/code/structured generation or `EmbeddingInferenceParams` for embeddings. Defaults to `ChatCompletionInferenceParams()` if not provided. The generation type is automatically determined by the inference parameters type. See [Inference Parameters](/concepts/models/inference-parameters) for details. |
21-
| `provider` | `str` | No | Reference to the name of the Provider to use (e.g., `"nvidia"`, `"openai"`, `"openrouter"`). If not specified, one set as the default provider, which may resolve to the first provider if there are more than one |
21+
| `provider` | `str` | Yes | Reference to the name of the Provider to use (e.g., `"nvidia"`, `"openai"`, `"openrouter"`). |
2222
| `skip_health_check` | `bool` | No | Whether to skip the health check for this model. Defaults to `False`. Set to `True` to skip health checks when you know the model is accessible or want to defer validation. |
2323

24+
<Warning title="Upgrade note">
25+
Every `ModelConfig` must now specify `provider`. Existing `model_configs.yaml` entries from older releases that omit `provider` or set it to `null` must be updated with an explicit provider name before loading. Agent tooling that parses `data-designer agent context` should read the `provider` field for each model alias; `default_provider`, `configured_provider`, and `effective_provider` are no longer emitted.
26+
</Warning>
27+
2428

2529
## Examples
2630

fern/versions/latest/pages/concepts/models/model-providers.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ Model providers are external services that host and serve models. Data Designer
99

1010
A `ModelProvider` defines how Data Designer connects to a provider's API endpoint. When you create a `ModelConfig`, you reference a provider by name, and Data Designer uses that provider's settings to make API calls to the appropriate endpoint.
1111

12-
<Warning title="Deprecated: implicit default provider routing">
13-
Earlier versions of Data Designer let you omit `provider=` on `ModelConfig` and fall back to a registry-level default — including the `default:` key in `~/.data-designer/model_providers.yaml`. That implicit routing is **deprecated** and will be removed in a future release. Always reference a provider by name on every `ModelConfig`. A `DeprecationWarning` is now emitted when the legacy path is exercised. See [issue #589](https://github.com/NVIDIA-NeMo/DataDesigner/issues/589).
14-
</Warning>
15-
1612
## ModelProvider Configuration
1713

1814
The `ModelProvider` class has the following fields:

0 commit comments

Comments
 (0)