Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Start with one of our default model providers:
- [NVIDIA Build API](https://build.nvidia.com)
- [OpenAI](https://platform.openai.com/api-keys)
- [OpenRouter](https://openrouter.ai)
- [OrcaRouter](https://www.orcarouter.ai)

Grab your API key(s) using the above links and set one or more of the following environment variables:
```bash
Expand All @@ -61,6 +62,8 @@ export NVIDIA_API_KEY="your-api-key-here"
export OPENAI_API_KEY="your-openai-api-key-here"

export OPENROUTER_API_KEY="your-openrouter-api-key-here"

export ORCAROUTER_API_KEY="your-orcarouter-api-key-here"
```

### 3. Start generating data!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ preview_result.display_sample_record()
```

<Note title="Default Providers Always Available">
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.
When you only specify `model_configs`, the default model providers (NVIDIA, OpenAI, OpenRouter, and OrcaRouter) are still available. You only need to create custom providers if you want to connect to different endpoints or modify provider settings.
</Note>

<Note title="Provider is required">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ The OpenAI provider gives you access to GPT models and other OpenAI offerings.

The OpenRouter provider gives you access to a unified interface for many different language models from various providers.

### OrcaRouter Provider (`orcarouter`)

- **Endpoint**: `https://api.orcarouter.ai/v1`
- **API Key**: Set via `ORCAROUTER_API_KEY` environment variable
- **Models**: Access to a wide variety of models through OrcaRouter's unified gateway
- **Getting Started**: Get your API key from [orcarouter.ai](https://www.orcarouter.ai)

The OrcaRouter provider gives you access to a unified OpenAI-compatible gateway for many different language models from various providers, with adaptive routing and automatic failover across upstreams.

## Model Configurations

Data Designer provides pre-configured model aliases for common use cases. When you create a `DataDesignerConfigBuilder` without specifying `model_configs`, these default configurations are automatically available.
Expand Down Expand Up @@ -74,6 +83,17 @@ The following model configurations are automatically available when `OPENROUTER_
| `openrouter-vision` | `nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free` | Omni multimodal understanding for image, audio, and video inputs, subject to OpenRouter model support | `temperature=0.60, top_p=0.95` |
| `openrouter-embedding` | `openai/text-embedding-3-large` | Text embeddings | `encoding_format="float"` |

### OrcaRouter Models

The following model configurations are automatically available when `ORCAROUTER_API_KEY` is set:

| Alias | Model | Use Case | Inference Parameters |
|-------|-------|----------|---------------------|
| `orcarouter-text` | `openai/gpt-4.1` | General text generation | `temperature=0.85, top_p=0.95` |
| `orcarouter-reasoning` | `deepseek/deepseek-v4-pro-0813` | Reasoning and analysis tasks | `temperature=0.35, top_p=0.95` |
| `orcarouter-vision` | `openai/gpt-4o` | Vision and image understanding | `temperature=0.85, top_p=0.95` |
| `orcarouter-embedding` | `openai/text-embedding-3-large` | Text embeddings | `encoding_format="float"` |

<Note title="Modality support depends on the model">
The `multi_modal_context` field can include image, audio, and video contexts, but each model/provider combination has its own accepted input formats, media-size limits, and modality mix. Use an image-capable model for image-only workflows, and use an omni or otherwise multimodal model before sending audio or video context. Local audio/video paths require explicit URL mode (`data_type=url`) and require the model endpoint to have filesystem access to the same paths, typically a colocated vLLM server configured for local media access.
</Note>
Expand Down Expand Up @@ -113,7 +133,7 @@ Both methods operate on the same files, ensuring consistency across your entire
## Important Notes

<Warning title="API Key Requirements">
While default model configurations are always available, you need to set the appropriate API key environment variable (`NVIDIA_API_KEY`, `OPENAI_API_KEY`, or `OPENROUTER_API_KEY`) to actually use the corresponding models for data generation. Without a valid API key, any attempt to generate data using that provider's models will fail.
While default model configurations are always available, you need to set the appropriate API key environment variable (`NVIDIA_API_KEY`, `OPENAI_API_KEY`, `OPENROUTER_API_KEY`, or `ORCAROUTER_API_KEY`) to actually use the corresponding models for data generation. Without a valid API key, any attempt to generate data using that provider's models will fail.
</Warning>

<Warning title="Hosted Provider Data Handling">
Expand All @@ -128,6 +148,7 @@ Both methods operate on the same files, ensuring consistency across your entire
export NVIDIA_API_KEY="your-api-key-here"
export OPENAI_API_KEY="your-openai-api-key-here"
export OPENROUTER_API_KEY="your-openrouter-api-key-here"
export ORCAROUTER_API_KEY="your-orcarouter-api-key-here"
```
</Tip>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Data Designer supports two provider types:

| Type | Description |
|------|-------------|
| `"openai"` | OpenAI-compatible chat completion API. This is the default and works with most providers, including NVIDIA NIM, vLLM, TGI, OpenRouter, Together AI, and OpenAI itself. |
| `"openai"` | OpenAI-compatible chat completion API. This is the default and works with most providers, including NVIDIA NIM, vLLM, TGI, OpenRouter, OrcaRouter, Together AI, and OpenAI itself. |
| `"anthropic"` | Anthropic's native Messages API for Claude models. Use this when connecting directly to Anthropic's API. |

Most self-hosted and third-party endpoints expose an OpenAI-compatible API, so `provider_type="openai"` is the right choice in the majority of cases. Only use `"anthropic"` when connecting directly to Anthropic's API at `https://api.anthropic.com`.
Expand Down
3 changes: 3 additions & 0 deletions fern/versions/latest/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export OPENAI_API_KEY="your-openai-api-key-here"

# OpenRouter (openrouter.ai)
export OPENROUTER_API_KEY="your-openrouter-api-key-here"

# OrcaRouter (orcarouter.ai)
export ORCAROUTER_API_KEY="your-orcarouter-api-key-here"
```

Verify your configuration is ready:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ class NordColor(Enum):

OPENROUTER_API_KEY_ENV_VAR_NAME = "OPENROUTER_API_KEY"

ORCAROUTER_PROVIDER_NAME = "orcarouter"

ORCAROUTER_API_KEY_ENV_VAR_NAME = "ORCAROUTER_API_KEY"

ATTRIBUTION_TITLE = "NeMo Data Designer"
ATTRIBUTION_REFERER = "https://github.com/NVIDIA-NeMo/DataDesigner"

Expand Down Expand Up @@ -329,6 +333,12 @@ class NordColor(Enum):
"provider_type": "openai",
"api_key": OPENROUTER_API_KEY_ENV_VAR_NAME,
},
{
"name": ORCAROUTER_PROVIDER_NAME,
"endpoint": "https://api.orcarouter.ai/v1",
"provider_type": "openai",
Comment on lines 333 to +339

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Built-ins bypass existing settings

When an existing installation already has model_configs.yaml and model_providers.yaml, initialization neither rewrites nor merges those files, so the new OrcaRouter provider and aliases are never registered; selecting orcarouter-text then fails with a missing-model or unknown-provider error.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/data-designer-config/src/data_designer/config/utils/constants.py
Line: 333-339

Comment:
**Built-ins bypass existing settings**

When an existing installation already has `model_configs.yaml` and `model_providers.yaml`, initialization neither rewrites nor merges those files, so the new OrcaRouter provider and aliases are never registered; selecting `orcarouter-text` then fails with a missing-model or unknown-provider error.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

"api_key": ORCAROUTER_API_KEY_ENV_VAR_NAME,
},
]


Expand Down Expand Up @@ -385,6 +395,18 @@ class NordColor(Enum):
"inference_parameters": DEFAULT_EMBEDDING_INFERENCE_PARAMS,
},
},
ORCAROUTER_PROVIDER_NAME: {
"text": {"model": "openai/gpt-4.1", "inference_parameters": DEFAULT_TEXT_INFERENCE_PARAMS},
"reasoning": {
"model": "deepseek/deepseek-v4-pro-0813",
"inference_parameters": DEFAULT_REASONING_INFERENCE_PARAMS,
},
"vision": {"model": "openai/gpt-4o", "inference_parameters": DEFAULT_VISION_INFERENCE_PARAMS},
"embedding": {
"model": "openai/text-embedding-3-large",
"inference_parameters": DEFAULT_EMBEDDING_INFERENCE_PARAMS,
},
},
}

# Persona locale metadata - used by the CLI and the person sampler.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_get_default_inference_parameters():

def test_get_builtin_model_configs():
builtin_model_configs = get_builtin_model_configs()
assert len(builtin_model_configs) == 12
assert len(builtin_model_configs) == 16
assert builtin_model_configs[0].alias == "nvidia-text"
assert builtin_model_configs[0].model == "nvidia/nemotron-3-nano-30b-a3b"
assert builtin_model_configs[0].provider == "nvidia"
Expand Down Expand Up @@ -95,11 +95,31 @@ def test_get_builtin_model_configs():
assert builtin_model_configs[11].alias == "openrouter-embedding"
assert builtin_model_configs[11].model == "openai/text-embedding-3-large"
assert builtin_model_configs[11].provider == "openrouter"
assert builtin_model_configs[12].alias == "orcarouter-text"
assert builtin_model_configs[12].model == "openai/gpt-4.1"
assert builtin_model_configs[12].provider == "orcarouter"
assert builtin_model_configs[12].inference_parameters == ChatCompletionInferenceParams(
temperature=0.85,
top_p=0.95,
)
assert builtin_model_configs[13].alias == "orcarouter-reasoning"
assert builtin_model_configs[13].model == "deepseek/deepseek-v4-pro-0813"
assert builtin_model_configs[13].provider == "orcarouter"
assert builtin_model_configs[13].inference_parameters == ChatCompletionInferenceParams(
temperature=0.35,
top_p=0.95,
)
assert builtin_model_configs[14].alias == "orcarouter-vision"
assert builtin_model_configs[14].model == "openai/gpt-4o"
assert builtin_model_configs[14].provider == "orcarouter"
assert builtin_model_configs[15].alias == "orcarouter-embedding"
assert builtin_model_configs[15].model == "openai/text-embedding-3-large"
assert builtin_model_configs[15].provider == "orcarouter"


def test_get_builtin_model_providers():
builtin_model_providers = get_builtin_model_providers()
assert len(builtin_model_providers) == 3
assert len(builtin_model_providers) == 4
assert builtin_model_providers[0].name == "nvidia"
assert builtin_model_providers[0].endpoint == "https://integrate.api.nvidia.com/v1"
assert builtin_model_providers[0].provider_type == "openai"
Expand All @@ -115,6 +135,11 @@ def test_get_builtin_model_providers():
assert builtin_model_providers[2].provider_type == "openai"
assert builtin_model_providers[2].api_key == "OPENROUTER_API_KEY"
assert builtin_model_providers[2].extra_headers is None
assert builtin_model_providers[3].name == "orcarouter"
assert builtin_model_providers[3].endpoint == "https://api.orcarouter.ai/v1"
assert builtin_model_providers[3].provider_type == "openai"
assert builtin_model_providers[3].api_key == "ORCAROUTER_API_KEY"
assert builtin_model_providers[3].extra_headers is None


def test_get_default_model_configs_path_exists(tmp_path: Path):
Expand Down
Loading