Skip to content

SDK follow-ups from 2026-10-05 dependency update #858

Description

Follow-up SDK work found while reviewing the release notes for the 2026-10-05 weekly dependency update (#849). Every bump replays cleanly; none of these block that PR.

Integration changes (highest value first)

  • OpenAI: Agents session stream get_final_result() / with_result_collection() skip tracing #859 OpenAI: Agents session stream helpers skip tracing (bug). openai 3.23 added AgentSessionEventStream.get_final_result() and with_result_collection(). Our _TracedStream / _AsyncTracedStream in py/src/braintrust/integrations/openai/tracing.py passes unknown attributes through to the real stream, so calling either method skips _AgentSessionTrace.observe() / finish(). The openai.agents.sessions.create span then gets no output or metrics and is never closed. Fix: drain the traced generator before calling the real stream's get_final_result(), and have with_result_collection() return the traced wrapper. Needs a new cassette-backed test.
  • OpenRouter: GA client.responses is not traced by wrap_openrouter(), and client.beta.responses is not auto-instrumented #860 OpenRouter: GA client.responses is never traced. wrap_openrouter() in py/src/braintrust/integrations/openrouter/tracing.py only wraps client.beta.responses, which is now a separate, deprecated BetaResponses class. auto_instrument() covers the GA client.responses but not BetaResponses. Fix: patch BetaResponses.send/send_async only when that module exists, and make wrap_openrouter wrap client.responses. Add cassette-backed coverage, including a Responses check in test_auto_openrouter.py.
  • Anthropic: capture prompt cache diagnostics (cache_miss_reason, cache_missed_input_tokens) #861 Anthropic: capture cache diagnostics (GA in 1.9.0). Add diagnostics to METADATA_PARAMS in py/src/braintrust/integrations/anthropic/tracing.py. Log message.diagnostics.cache_miss_reason.type as metadata and cache_missed_input_tokens as a metric (e.g. prompt_cache_missed_tokens). Read the fields with getattr so older versions need no gating; this also covers BetaMessage.diagnostics.
  • agno: workflow StepProgress event text leaks into workflow span output #862 agno: keep StepProgress text out of workflow output (3.1.0). _aggregate_workflow_chunks in py/src/braintrust/integrations/agno/tracing.py appends .content from every non-WorkflowCompleted chunk, so text from the new StepProgress events will end up in the span output. Skip event == "StepProgress" there, optionally record progress in metadata, and add a focused test.
  • google-adk: instrument Workflow nodes and workflow tool calls #863 google-adk: no spans for Workflow nodes and their tool calls (predates this bump). ADK 2.x Workflow is a BaseNode, not a BaseAgent, and _ToolNode calls tool.run_async directly, so workflow tool calls get no tool span (MCP tools excepted). ADK now steers users toward Workflow over SequentialAgent / ParallelAgent. Candidate patch targets: google.adk.workflow._base_node.BaseNode.run and _tool_node._ToolNode._run_impl.

Lower priority

Cassettes that couldn't be re-recorded

These kept their previous latest recordings in #849 because a fresh recording isn't possible right now:

Nothing worth doing

openai-agents 0.23, ai-sdk 0.8, huggingface-hub 2.1, transformers 5.18, harbor 0.24. litellm 1.104.0's Windows wheel still ships CRLF tiktoken files, so the ignore_hosts workaround in test_litellm.py stays.

🤖 Generated with Claude Code

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions