Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#866 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
observability

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
21
Fork
23
Merge trung bình
20 giờ 2 phút
Pull request đã merge (30 ngày)
95

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của braintrustdata/braintrust-sdk-python

Tất cả issue của braintrustdata/braintrust-sdk-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.