Repository navigation
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
OpenAPI changes ⚪ No API surface changesNote This PR does not modify the API contract.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The unified-llm-call trace and generation passed the Pydantic query input straight to Langfuse, which rendered its repr string. Add extract_query_input to send type, content, format and language_code for text, and metadata only (format, mime type, length) for audio, image and PDF, mirroring extract_response_output.
…ry keys - Trace metadata carries job.id, llm.call_id, llm.config.id/version, tenant ids, gen_ai.provider.name and gen_ai.request.model, the same keys as the Sentry spans (_CallContext.identity_attributes is the single source). - Generation metadata adds llm.input/output type, format and language code, and gen_ai.response.id. - billable_output_tokens is the one reasoning-token rule for Sentry and Langfuse. - LLM_* keys and GEN_AI_RESPONSE_ID move to telemetry constants.
cf721e7 to
61a49e3
Compare
Issue
Summary
extract_query_input()to support structured JSON for LLM call traces.Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Langfuse only; nothing changes in Sentry.
Original PR description
Issue
Related to #1048
Summary
LLM call traces in Langfuse showed the input as a Python repr string (
type='text' content=TextContent(format='text', value='...', language_code=None)), unlike evaluation traces which show structured JSON.extract_query_input()next toextract_response_output()incore/langfuse/langfuse.py, used for theunified-llm-calltrace, its attributes and the generation.type,content,formatandlanguage_code.format,mime_typeandlength, never the base64 or URL payload, the same way audio output is already handled.Checklist
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Langfuse only; nothing changes in Sentry.