> ## 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.

# Metadata and traces

> Select tenancy, preserve conversation identity, and attach searchable context.

Put proxy controls and trace attributes in the standard Chat Completions `metadata` object.

## Reserved metadata

| Key                      | Type                          | Purpose                                                                            |
| ------------------------ | ----------------------------- | ---------------------------------------------------------------------------------- |
| `wandb.entity`           | non-empty string              | Select the team or personal entity that owns the task/provider                     |
| `wandb.thread_id`        | non-empty string              | Preferred conversation and sticky-routing identifier                               |
| `gen_ai.conversation.id` | non-empty string              | Semantic-convention conversation identifier used when no W\&B thread ID is present |
| `wandb.turn_index`       | non-negative integer          | Preserve a trusted source turn index during replay                                 |
| `wandb.project`          | `project` or `entity/project` | Opt a direct provider call into tracing at this destination                        |
| `wandb.trace_surface`    | `spans`, `calls`, or `both`   | Override trace surface for an opted-in direct call only                            |
| `user.id`                | non-empty string              | Attach an end-user identity to the trace                                           |

`wandb.*` keys control routing and logging and are removed before provider dispatch. Other metadata is forwarded to the provider and projected into the trace when representable.

## Conversation precedence

The proxy chooses the first available identifier:

1. `wandb.thread_id`;
2. `gen_ai.conversation.id`;
3. Vapi `call.id`.

Use the same value for every provider call in one application conversation. This improves trace browsing, prevents dataset split leakage, and makes weighted routing stable.

## What a task trace records

* task UUID, alias, and version;
* routing revision and selected provider/model;
* exact provider-dispatched request and reconstructed response;
* token usage, finish reason, timing, and error status;
* conversation, user, scenario, and safe custom metadata;
* a proxy request ID for support and write-surface comparison.

The canonical Agent Span carries a raw request/response dump for fidelity. Dataset reconstruction does not rely only on the normalized display columns.

<Warning>
  Do not put credentials, secrets, or unnecessary personal data in messages or metadata. Trace data is intentionally durable training and debugging input.
</Warning>

<Accordion title="API: Send a request with conversation identity (POST /chat/completions)">
  Keep the same `wandb.thread_id` for every turn in one conversation:

  ```bash theme={"system"}
  curl --request POST \
    --url "https://proxy.training.wandb.ai/v1/chat/completions" \
    --header "Authorization: Bearer $WANDB_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
      "model": "ticket-classifier",
      "messages": [{"role": "user", "content": "Classify this request"}],
      "metadata": {
        "wandb.entity": "your-team",
        "wandb.thread_id": "conversation-4827"
      }
    }'
  ```

  The proxy removes reserved `wandb.*` values before provider dispatch. See [Create a routed chat completion](/model-distillation/reference/proxy).
</Accordion>
