File tree Expand file tree Collapse file tree
src/data_designer/config/utils
data-designer-engine/tests/engine/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,6 +307,8 @@ class NordColor(Enum):
307307 "X-OpenRouter-Categories" : "programming-app" ,
308308}
309309
310+ # OpenRouter attribution is injected in the engine so telemetry opt-out can
311+ # suppress it cleanly for both default and existing provider configs.
310312PREDEFINED_PROVIDERS = [
311313 {
312314 "name" : NVIDIA_PROVIDER_NAME ,
@@ -325,7 +327,6 @@ class NordColor(Enum):
325327 "endpoint" : "https://openrouter.ai/api/v1" ,
326328 "provider_type" : "openai" ,
327329 "api_key" : OPENROUTER_API_KEY_ENV_VAR_NAME ,
328- "extra_headers" : OPENROUTER_ATTRIBUTION_HEADERS ,
329330 },
330331]
331332
Original file line number Diff line number Diff line change @@ -110,11 +110,7 @@ def test_get_builtin_model_providers():
110110 assert builtin_model_providers [2 ].endpoint == "https://openrouter.ai/api/v1"
111111 assert builtin_model_providers [2 ].provider_type == "openai"
112112 assert builtin_model_providers [2 ].api_key == "OPENROUTER_API_KEY"
113- assert builtin_model_providers [2 ].extra_headers == {
114- "HTTP-Referer" : "https://github.com/NVIDIA-NeMo/DataDesigner" ,
115- "X-OpenRouter-Title" : "NeMo Data Designer" ,
116- "X-OpenRouter-Categories" : "programming-app" ,
117- }
113+ assert builtin_model_providers [2 ].extra_headers is None
118114
119115
120116def test_get_default_model_configs_path_exists (tmp_path : Path ):
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ def test_consolidate_kwargs_openrouter_attribution(
276276) -> None :
277277 """OpenRouter-specific attribution headers are injected when provider is openrouter."""
278278 stub_model_facade .model_provider .name = "openrouter"
279- stub_model_facade .model_provider .extra_headers = None # simulates existing user config
279+ stub_model_facade .model_provider .extra_headers = None
280280 result = stub_model_facade .consolidate_kwargs ()
281281 assert result ["extra_headers" ] == {
282282 "X-Title" : "NeMo Data Designer" ,
You can’t perform that action at this time.
0 commit comments