Why LLM Gateway requests appear twice as separate traces

Last updated: October 1, 2026

Symptom

Every request sent through the LangSmith LLM Gateway shows up as two separate runs/traces, in two different projects in the same workspace:

  • gateway, a shared project with traffic from all API keys

  • gateway/short-api-key/<short>/api-key-id/<key id>, a project scoped to a single API key

Both runs for a given request have identical start/end timestamps, latency, and token counts, but different run IDs and different trace/span IDs. This looks like the request is being ingested twice, with the risk of being billed twice or counted twice against trace retention.

Cause

This is expected Gateway behavior, not a retry or a double-send. The Gateway writes each request's trace to both projects on purpose, and assigns a new set of run/span/trace IDs to the second copy:

  • The shared gateway project is the aggregate view of all Gateway traffic across every API key.

  • The per-API-key project exists so you can isolate and attribute traffic to a specific caller in the UI.

There is currently no setting to turn off the per-key export. The only customer-facing configuration for Gateway tracing is the data policy's Trace content toggle, which controls whether full trace content is captured and billed, not whether the dual-project export happens.

Resolution

Use the shared gateway project as your source of truth for aggregate cost and usage reporting. Do not add its numbers to the per-key project's numbers: the per-key project is a mirrored, attribution-scoped view of the same traffic, not additional volume. Use the per-key project only when you need to drill into what a specific API key sent.

Gateway traces are metadata-only by default (token usage, latency, status, model) and are not billed as trace usage. Billing only kicks in if Trace content capture is explicitly enabled on the Gateway data policy. Leave Trace content disabled to avoid being billed for these traces while still keeping the metadata you need for reporting.

Disabling Trace content does not remove the duplicate metadata-only runs from the two projects; both copies stay visible. It only determines whether those runs count toward trace billing.

References