#24057 [Bug]: OTEL invalid attribute types for `gen_ai.prompt`
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
### Describe the bug When using OpenTelemetry tracing with LiteLLM, every chat completion request triggers an OpenTelemetry SDK warning/error regarding invalid attribute types for `gen_ai.prompt`.
The OpenTelemetry Python SDK strictly requires span attributes to be primitive types (`str`, `int`, `float`, `bool`) or a sequence of primitives. However, LiteLLM attempts to set `gen_ai.prompt` using the raw `messages` payload (which is a list of dictionaries: `[{"role": "...", "content": "..."}]`). The OTEL SDK rejects the dictionaries, resulting in dropped trace attributes and log spam.
### To Reproduce 1. Run LiteLLM proxy (version 1.82.3-stable or latest). 2. Enable OpenTelemetry tracing in your `config.yaml` or via environment variables (e.g., `OTEL_EXPORTER_OTLP_ENDPOINT`). 3. Send a standard `/v1/chat/completions` request with a standard messages array. 4. Check the proxy logs.
**Error Log Output:** ```text 192.168.5.234:40866 - "POST /v1/chat/completions HTTP/1.1" 200 Invalid type dict in attribute 'gen_ai.prompt' value sequence. Expected…