> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Model routing

> Select a project with OpenAI-Project, pin a project version, or override the model for one request.

The `OpenAI-Project` header selects the project. The `model` field then chooses between the project's weighted routing and a model override, and `metadata["forge.project_version"]` chooses the project version.

## Project selection

The value has the form `[ENTITY]/[PROJECT]`. `[PROJECT]` is the project's Weights & Biases project name (its `project` field), not its project alias. The two are the same unless the project was created with a different project name. Studio shows the value, ready to copy, in the project header and on the project's settings page.

```text theme={"system"}
OpenAI-Project: your-team/ticket-classifier
```

The OpenAI SDKs send the header from the `project` option, such as `OpenAI(project=...)` in Python or `new OpenAI({ project })` in JavaScript, or from the `OPENAI_PROJECT_ID` environment variable.

## Weighted routing

A `model` of `router`, a blank `model`, or an omitted `model` uses the weighted routing of the selected version. The proxy chooses among targets with positive weights, replaces `model`, applies the target's parameters, and calls the target's provider.

```json theme={"system"}
{"model": "router"}
```

With the `OpenAI-Project` header, a project alias or `alias@vN` in `model` returns `400`. Select the version with `forge.project_version` instead.

## Version pins

```json theme={"system"}
{
  "model": "router",
  "metadata": {
    "forge.project_version": "3"
  }
}
```

This pin selects version 3. Send the version as a string, such as `"3"`. The proxy also accepts an integer. Omitting `forge.project_version` selects version 1, a fixed default that never changes to the latest version. Publishing a new version never changes version 1, which makes a new version safe to test before application rollout.

An unknown version returns `404` with `Project 'your-team/ticket-classifier' has no version 3`. `forge.project_version` requires the `OpenAI-Project` header. Without it, the request returns `400`.

## Model overrides

With the `OpenAI-Project` header, a `provider/model-id` value overrides the model for one request. The prefix before the first slash selects a provider registered in the project's entity, including built-in providers such as `wandb-inference`. The remainder is the configured provider model ID. Additional slashes are allowed.

```json theme={"system"}
{"model": "openai/gpt-5.6-sol?reasoning_effort=medium"}
```

An override is project traffic. The proxy traces, samples, and caches it in the selected version like routed traffic. It uses the caller's request parameters and the provider's inference defaults, not a fine-tuned model's inference settings, such as its default temperature, or the targets' `params_override` values. Overrides are useful for ad hoc tests, calling a trained model before it's a routing target, and validating a newly registered provider before routing traffic to it.

Traces record the routing mode in `routing_mode`: `override` for model overrides and `weighted` for routed traffic. Because overrides are project traffic, they're eligible for datasets, including the teacher datasets that **Automation** builds in Studio when the override uses the teacher's model. To exclude overrides from a dataset, filter on `metadata: {"routing_mode": "weighted"}`. This filter also excludes traces written before `routing_mode` existed. See [Metadata and traces](https://docs.coreweave.com/model-distillation/proxy/metadata-and-traces.md).

## Entity resolution

The entity in `OpenAI-Project` must be the caller's personal entity or one of their Weights & Biases teams. The proxy checks access before any project lookup, so a key that can't access the entity receives `403` whether or not the project exists.

Because the header names the entity, the proxy looks up a team project in the team even when you use a personal key.

## Sticky weighted selection

Provide a conversation ID to keep all calls in one conversation on the same target for a routing revision:

```json theme={"system"}
{
  "metadata": {
    "gen_ai.conversation.id": "conversation-4827"
  }
}
```

Changing the routing revision can intentionally move that key to a different target.

> [accordion] API: Call a pinned project version (POST /chat/completions)
>
> Send `OpenAI-Project`, use `router` in `model`, and set `forge.project_version`. A model override uses `provider/model-id` in `model` instead.
>
> ```bash theme={"system"}
> curl --request POST \
>   --url "https://proxy.training.coreweave.com/v1/chat/completions" \
>   --header "Authorization: Bearer $WANDB_API_KEY" \
>   --header "Content-Type: application/json" \
>   --header "OpenAI-Project: your-team/ticket-classifier" \
>   --data '{
>     "model": "router",
>     "messages": [{"role": "user", "content": "Classify this request"}],
>     "metadata": {
>       "forge.project_version": "2",
>       "gen_ai.conversation.id": "conversation-4827"
>     }
>   }'
> ```
>
> See [Create a routed chat completion](https://docs.coreweave.com/model-distillation/reference/proxy/chat-completions/create-a-routed-chat-completion.md) for the complete schema.
