AI observability
Ask the shop assistant a question. The model call, the tool it runs and your rating arrive in reopt as one trace.
AI telemetry: server credentials configuredmodel: scripted mock
What is sent
withAiTrace wraps the turn and returns the trace id the thumbs use. Inside it, a hand-captured $ai_span for the catalogue read, then generateText produces one $ai_generation per step and one $ai_span per tool execution, all through the integration registered in lib/reopt/ai-telemetry.ts. The rating is a plain browser track("$ai_feedback") carrying the trace id.
Without AI_GATEWAY_API_KEY a scripted model from ai/test answers; the telemetry path is the same.