Repository navigation
Backlog
Backlog
Copy link
Labels
Description
These came out of the research on the minor bumps in the 2026-11-30 weekly dependency update (#1205). None of them breaks anything or blocks that PR. Each is a gap in coverage for an upstream feature that's new or changed. Each fix needs to keep the older matrix pins working, so prefer feature detection. The two pins held back in #1205 are tracked separately in #1211.
openai 3.60
- Trace Agents API spend controls. Upstream adds
agent.session.budget_reached(openai/types/beta/agent_session_budget_reached_event.py, in theagent_session_event.pyunion),AgentSession.spend_control(limit,consumed, USD cents) and status"budget_reached", aspend_controlrequest param onagents/session_create_params.py(andsessions.update), and turn error codesession_budget_exceeded._AgentSessionTrace.observe()inpy/src/braintrust/integrations/openai/tracing.pyignores the event,_observe_sessiononly runs on created/in_progress/idle, and_agent_session_params()dropsspend_control. Fix: logsession_status/spend_controlmetadata on the event, readgetattr(session, "spend_control", None), and copy the request param. No gate needed. Needs a new latest-only cassette with a low limit. - Parse
decisions.with_raw_response.createbefore logging._decisions_create_wrapper/_log_decisions_responseinpy/src/braintrust/integrations/openai/tracing.pydon't check_raw_response_requested(kwargs), so aLegacyAPIResponseis logged viavars()and the span losesanswersandusage(upstreamopenai/resources/decisions.py,DecisionsWithRawResponse). Fix:.parse()when raw mode is requested, as the chat and responses wrappers do. Instructor 1.18's decisions mode calls this path. Needs a new cassette.
instructor 1.18
- Trace
Mode.DECISIONS.instructor.from_openai(..., mode=Mode.DECISIONS)(instructor/v2/providers/openai/client.py) andfrom_provider(..., mode=Mode.DECISIONS)(instructor/v2/auto_client.py) returninstructor/decisions/client.py:DecisionsClient/AsyncDecisionsClient, notInstructor, so there is no instructor span (thefrom_providerpath has no span at all). Fix: patchDecisionsClient.create/create_with_completionand the async versions (keyword-onlyresponse_model,context,input,strict), gated oninstructor.decisionsexisting. Depends on the openai raw-response fix above. Needs a new latest-only cassette. - Not from this bump:
_extract_response_model/_build_inputinpy/src/braintrust/integrations/instructor/tracing.pyassume positional(response_model, messages), butcreate_iterableandcreate_with_completiontake(messages, response_model), so positional calls to those log swapped fields.
litellm 1.111
- Aggregate streamed audio deltas.
Delta.audiois widened toChatCompletionAudioDelta(litellm/types/utils.py) and Gemini now streams audio deltas (litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py)._postprocess_completion_streaming_resultsinpy/src/braintrust/integrations/litellm/tracing.pyonly rebuilds role/content/tool_calls, so streamed audio is dropped. Fix: concatenatedelta.audio.data/transcriptand route through_extract_audio_output, using_get_field. Needs a new streamed Gemini audio cassette. - Log speech usage.
HttpxBinaryResponseContentgainsusage(litellm/types/llms/openai.py; set by the new Replicate TTS provider, and already by Vertex/Dashscope)._speech_wrapper/_aspeech_wrapper_asyncinpy/src/braintrust/integrations/litellm/tracing.pynever read it. Fix:metrics.update(_parse_metrics_from_usage(_get_field(resp, "usage"))). Needs a cassette from a provider that returns usage. - Optional:
litellm.generate_contentis newly exported at top level; it andagenerate_contentare untraced (an existing gap).
pydantic-ai 2.77
- Log the new
compact=run argument. Added toAbstractAgent.runand friends (pydantic_ai/agent/abstract.py; used bycompact_history())._AGENT_INPUT_ALLOWLISTinpy/src/braintrust/integrations/pydantic_ai/tracing.pydoesn't list it. Fix: add"compact"(bool or{reason, focus}). No gate needed; an existing cassette can carry the assertion. - Trace native compaction model calls. The new
capabilities/native_compaction.py(NativeCompaction, Anthropic and OpenAI Responses) callsModel.compact_messages(pydantic_ai/models/__init__.py)._wrap_concrete_model_classonly wrapsrequest,request_streamandprepare_request. Fix: wrapcompact_messageswith an LLM span, guarded byhasattr. Needs a new cassette. - Capture run compaction records.
AgentRunResult.compactions/CompactionRecord(pydantic_ai/run.py,result.py) and thecompaction_start/compaction_endevents are ignored by_log_agent_result. Fix: log count and reasons as metadata viagetattr. Comes with the cassette above. - Optional (pydantic-ai-harness 0.77):
compact_if_smallergainedskip_onand emits asummary_failedskipped span (pydantic_ai_harness/compaction/_shared.py); skipped compactions are still not mirrored by the harness tracing (existing gap).
strands-agents 1.68
- Record the provider for
SageMakerDecisionModel. It stores config as_request_config(strands/decisions/sagemaker_decision_model.py), but_decision_model_metadatainpy/src/braintrust/integrations/strands/tracing.pyonly reads_provider_config. Fix: in_log_decision_result, also logresult.metadata.provider_name(already set to"sagemaker", field exists since 1.65) viagetattr. A cassette needs a SageMaker endpoint, which may be impractical. - Optional:
InvocationContext.usage_by_model(strands/agent/invocation_context.py) could be logged as a per-model usage breakdown.
livekit-agents 1.9 (lands with the held pin, see #1211)
- Use the upstream
speech_end_timefor STT-driven end of speech. 1.9 passesspeech_end_timetoAgentActivity.on_end_of_speech(computed inlivekit/agents/voice/audio_recognition.py).user_speech_endinpy/src/braintrust/integrations/livekit_agents/tracing.pyends the span attime.time()whenev is None, which now drifts from LiveKit's own value. Fix: prefer the boundspeech_end_timewhen it's a valid timestamp; keep the current calculation for 1.8.9–1.8.12. Needs a cassette with STT turn detection (can be recorded with the held-pin re-record).
cursor-sdk 1.5
- Log
RunResult.request_id. New incursor_sdk/types.py;CursorRunTracker.finishinpy/src/braintrust/integrations/cursor_sdk/tracing.pylogs no run identifiers. Fix: addrequest_id(and possibly run/agent ids) to root span metadata via_value(result, "request_id");Noneon older pins. - Watch when re-recording:
cursor_sdk/_helpers.pynow prefersGROK_BUILD_API_KEYoverCURSOR_API_KEY; if it's set locally it wins over the fixture key.
Nothing needed
anthropic 2.14, mistralai 3.9 (prompt_tokens_details is now a typed model; already mapped to prompt_cached_tokens), autoevals 0.6, openai-agents 0.26 and temporalio 1.37: patch targets, signatures and serialized shapes checked, no gaps found.
Activity
chore(deps): weekly dependency update (#1205)