What does the gen_ai.response.model attribute mean in Rius?
In Rius, gen_ai.response.model holds the model name the provider reports in its reply, as a string, and Rius stores it on the span as sent. It sits beside gen_ai.request.model, which is the model you asked for and the one Rius uses to compute cost. For OpenInference spans, Rius fills it from older llm.* names when your spans do not set it.
How it works
The key is a string in the model-analytics group of the span attribute reference, described as the model reported by the provider. It is a different value from gen_ai.request.model, the requested model. The two can differ, for example when a provider answers with a more specific model name than the one you asked for.
- Which spans carry it: the spans for model calls, next to gen_ai.request.model, the token counts, gen_ai.provider.name and gen_ai.response.id (the provider’s completion id).
- What it does not do: Rius computes cost from gen_ai.request.model plus the gen_ai.usage.* token counts, so the response model does not price the call. A span with no request model gets no cost.
- How it is stored: as sent. Search and filter on gen_ai.response.model in trace inspection.
- Native keys win: if your span already sets gen_ai.response.model, Rius keeps your value. Normalization fills gaps and never overwrites.
Older names it is read from. OpenInference spans do not use this key. Rius reads the response model from llm.response.model_name, and if that is missing, from llm.model_name. Rius applies the llm.model_name fallback only when the span’s status is OK. An ERROR or UNSET span gets no response model from llm.model_name, because on those spans it may still hold the requested model rather than the one the provider served. The Rius SDKs apply the same OpenInference mapping in your process before export, except that they skip the llm.model_name fallback, which only the platform applies. After normalization, the value sits under gen_ai.response.model, so filter on that key.
gen_ai.response.model is an OpenTelemetry GenAI convention key, listed in the registry.
Set it up
- On each model-call span you emit yourself, set gen_ai.response.model to the model name from the provider’s reply. Set gen_ai.request.model to the model you asked for, and set the gen_ai.usage.input_tokens and gen_ai.usage.output_tokens counts, so the span also gets a cost. Send these as plain span attributes. Never send a cost attribute.
- If your spans come from OpenInference, set nothing extra. Make sure the span carries llm.response.model_name, or llm.model_name on a span that ends with an OK status.
- Check that the attribute reaches Rius. OpenTelemetry SDKs keep at most 128 attributes per span and drop the rest silently, and a span that passes the limit can lose its model, tools, usage or messages. Raise the limit when you export without the Rius SDKs:
export OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT=4096- Open the span in trace inspection and look for gen_ai.response.model. To find spans by it, filter on gen_ai.response.model, not on an llm.* name. Rius removes the llm.* keys it maps, so a filter on those matches nothing.
For the endpoint, headers and sender-specific setup, see Trace LLM calls with OpenTelemetry.
What you get
- A record, on each model-call span, of the model that actually answered, kept apart from the model you requested.
- A value you can search and filter on under one key, whether the span came from the GenAI conventions or from OpenInference.
- Cost that stays tied to gen_ai.request.model and the token counts. Costs are list-price estimates in US dollars from LiteLLM’s public model-price catalog, not billed amounts.
- No clash between sources. A value you send natively is never overwritten by a mapped one.
When something else fits
- If you only need cost per call, gen_ai.request.model and the token counts are what Rius uses, and a missing response model does not change the cost.
- On a failed OpenInference call, expect no response model from llm.model_name. Use gen_ai.request.model to see which model was requested.
- For the full list of keys and their types, use the span attribute reference.