Summary
The reasoning and reasoning_effort request parameters are accepted and correctly forwarded to upstream providers, but they are not emitted as OpenTelemetry span attributes in getChatRequestAttributes. This makes reasoning configuration invisible in observability dashboards.
Steps to Reproduce
- Send a chat completion request with reasoning configuration:
curl -X POST https://gateway.example.com/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-3-flash-preview",
"stream": true,
"messages": [{"role": "user", "content": "Hello"}],
"reasoning": {"effort": "minimal"}
}'
- Open the observability dashboard (or inspect the OTel span attributes directly)
- Look for reasoning-related attributes in the span
Expected Behavior
The span attributes should include reasoning configuration, e.g.:
gen_ai.request.reasoning_effort: "minimal"
gen_ai.request.reasoning.enabled: true
gen_ai.request.reasoning.max_tokens: (if provided)
These should appear in the Raw JSON / trace detail view of any OTel-consuming dashboard.
Actual Behavior
No reasoning-related attributes are emitted on the span. The reasoning configuration is invisible in observability tools despite being correctly processed and forwarded to the upstream provider.
Root Cause
In endpoints/chat-completions/otel.js, the getChatRequestAttributes function emits various request attributes (stream, service_tier, temperature, top_p, etc.) but does not include body.reasoning or body.reasoning_effort.
Environment
@hebo-ai/gateway: 0.8.0
- Model tested:
google/gemini-3-flash-preview (via alias)
- The request processing pipeline (schema validation →
parseReasoningOptions → middleware → Vertex thinkingConfig) works correctly — this is purely a telemetry gap.
Summary
The
reasoningandreasoning_effortrequest parameters are accepted and correctly forwarded to upstream providers, but they are not emitted as OpenTelemetry span attributes ingetChatRequestAttributes. This makes reasoning configuration invisible in observability dashboards.Steps to Reproduce
Expected Behavior
The span attributes should include reasoning configuration, e.g.:
gen_ai.request.reasoning_effort:"minimal"gen_ai.request.reasoning.enabled:truegen_ai.request.reasoning.max_tokens: (if provided)These should appear in the Raw JSON / trace detail view of any OTel-consuming dashboard.
Actual Behavior
No reasoning-related attributes are emitted on the span. The reasoning configuration is invisible in observability tools despite being correctly processed and forwarded to the upstream provider.
Root Cause
In
endpoints/chat-completions/otel.js, thegetChatRequestAttributesfunction emits various request attributes (stream,service_tier,temperature,top_p, etc.) but does not includebody.reasoningorbody.reasoning_effort.Environment
@hebo-ai/gateway:0.8.0google/gemini-3-flash-preview(via alias)parseReasoningOptions→ middleware → VertexthinkingConfig) works correctly — this is purely a telemetry gap.