Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

pydantic-ai: capture web-search and grounding counts from `RequestUsage.details`

已關閉
#866 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@AbhiPrasad 已經在處理了。

開始於 2026年10月8日。

  • #892 來自 @AbhiPrasad —— 已合併

評估

難度
3/5
預估耗時
1-2 天
新手友好度
72/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python
領域
observability

研究方向

Start in py/src/braintrust/integrations/pydantic_ai/tracing.py around lines 1388–1428, where RequestUsage.details currently provides reasoning and cached-token data. Review the existing cassette-backed integration tests and add coverage for a web-search tool run. Confirm that web-search and grounding counts are captured without breaking compatibility with the listed older pydantic-ai versions, and verify the workspace metadata behavior if included.

由索引模型根據 Issue 內容生成。

描述

feature python

pydantic-ai 2.52–2.54 started counting OpenAI native web searches (#8310) and Google grounding queries (#8891) in RequestUsage.details.

The usage extractor in py/src/braintrust/integrations/pydantic_ai/tracing.py (around lines 1388–1428) only reads reasoning and cached tokens from details.

Proposal

  • Record the new counts as metrics (or metadata if they aren't token counts), read defensively so older versions (0.1.9, 1.0.1, 1.10.0) are unaffected.
  • Optionally record the new workspace= run kwarg's kind in metadata (_AGENT_INPUT_ALLOWLIST already keeps the object itself out of spans).
  • Add cassette-backed coverage with a web-search tool run.

Parent: #858 (found while reviewing the 2026-10-05 weekly dependency update, #849).

🤖 Generated with Claude Code

主要語言
Python
星號
22
分支
27
平均合併
14 小時 49 分鐘
30 天內合併 PR
126

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

braintrustdata/braintrust-sdk-python 的其他 Issue

查看 braintrustdata/braintrust-sdk-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。