Uh oh!
There was an error while loading. Please reload this page.
Add LP/v1 logprobs trace payload deserialization (FIR-21499) - #452
Conversation
…21499). Decode logprobs payloads into completion_logprobs and Message.logprobs on EvaluationRow. Pop base_url from completion_params before OpenAI SDK calls so dev inference API can be encoded in gateway tracing URLs. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:ac3db7b2b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Uh oh!
There was an error while loading. Please reload this page.
…cing. Co-authored-by: Cursor <cursoragent@cursor.com>
Uh oh!
There was an error while loading. Please reload this page.
Use get() in build_init_request so base_url remains available for gateway URL encoding, and filter it out in remote_server when calling the SDK. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e901c69. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.

Summary
lp_deserializer(LP/v1) and wire intofireworks_tracingforpayloads.logprobs.execution_metadata.extra.completion_logprobsand last-assistantMessage.logprobs["content"](cookbook path).base_urlfrom completion params intracing_utilsso it is encoded into gateway URLs only (fixes dev API routing).Test plan
pytest tests/adapters/test_lp_deserializer.py tests/adapters/test_fireworks_tracing_logprobs.py -qDepends on gateway publishing
logprobspayloads (fw-ai/fireworks).Made with Cursor
Note
Medium Risk
Changes trace-to-row shape and remote completion kwargs; logprobs only appear once the gateway publishes payloads, but bad LP data is isolated via warnings.
Overview
Adds LP/v1 support so Fireworks traces that include
payloads.logprobscan be turned into eval rows with per-token completion logprobs, mirroring the existing R3 router-replay path.A new
lp_deserializerdecodes base64 + zstd LP01 blobs into logprob scalars and optional token IDs (token IDs are dropped when any wire id is missing).convert_trace_dict_to_evaluation_rowuses that data to fillexecution_metadata.extra(completion_logprobs, optionalcompletion_token_ids,logprobs_metadata) and attachesMessage.logprobs["content"]on the last assistant message. Failures are logged and do not fail the whole conversion.The test remote server no longer forwards
base_urlinsidecompletion_paramsto the OpenAI client—routing stays onmodel_base_url/ gateway URL encoding—aligning with howbuild_init_requesttreatsbase_urlfor tracing URLs (comment-only tweak intracing_utils).Reviewed by Cursor Bugbot for commit e901c69. Bugbot is set up for automated code reviews on this repo. Configure here.