metadata object. This page explains how to preserve conversation identity, sample complete conversations, and understand the resulting project traces.
Reserved metadata
wandb.* keys control routing and logging. The proxy removes them before sending a request to the provider. The proxy forwards other metadata to the provider. When representable, the proxy also adds that metadata to the trace.
Conversation precedence
The proxy chooses the first available identifier:wandb.thread_idgen_ai.conversation.id- Vapi
call.id
Sample complete conversations
Conversation-level trace sampling reduces the volume of project traffic saved to W&B Weave without leaving partial conversations. Per-request sampling can keep isolated turns and discard the surrounding context, which makes the saved data less useful for debugging and dataset creation. To configure sampling for a project:- In Model Distillation Studio, open the project’s Routing page.
- Under Models and traffic, set Weave trace sampling to the percentage of conversations to save.
- Select Save routing.
API: Set conversation trace sampling (PUT /tasks/[PROXY-MODEL-NAME]/routing)
API: Set conversation trace sampling (PUT /tasks/[PROXY-MODEL-NAME]/routing)
To configure conversation-level trace sampling without Model Distillation Studio, use the routing API.Replace For another project version, use
[PROXY-MODEL-NAME] with the proxy model name, [WANDB-ENTITY] with the W&B entity, and [MODEL-REF] with an existing target model reference.Set trace_sampling_rate to a fraction from 0 to 1. Because a routing update replaces the complete configuration, include all existing targets in the request:PUT /v1/tasks/[PROXY-MODEL-NAME]/versions/[PROJECT-VERSION]/routing. Replace [PROXY-MODEL-NAME] with the proxy model name and [PROJECT-VERSION] with the project version. Before you treat the setting as active, wait until the deployment status is Applied at the new routing revision.Project trace contents
Project traces capture the following routing, request, response, and metadata details:- Project ID (UUID), proxy model name, and version
- Routing revision and selected provider and model
- The exact request that the proxy sends to the provider and the response that the proxy reconstructs.
- Token usage, finish reason, timing, and error status
- Whether the response was replayed from the exact-response cache (
cache_hit) - Conversation, user, scenario, and safe custom metadata
- A proxy request ID for support and comparison of trace outputs
API: Send a request with conversation identity (POST /chat/completions)
API: Send a request with conversation identity (POST /chat/completions)
Replace The proxy removes reserved
[PROXY-MODEL-NAME] with the proxy model name, [WANDB-ENTITY] with the W&B entity, and [CONVERSATION-ID] with an identifier for the conversation.Keep the same wandb.thread_id for every turn in one conversation:wandb.* values before sending a request to the provider. See Create a routed chat completion.