Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

OpenAI + LiteLLM: trace new decisions API

未关闭
#921 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@AbhiPrasad 已经在做这个了。

开始于 2026年10月13日。

  • #927 来自 @AbhiPrasad —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

feature integration: litellm integration: openai python

OpenAI 3.26.0 added client.decisions.create (sync + async). It calls a model and returns usage, including cached, cache-write and reasoning tokens. LiteLLM 1.105.0 added matching litellm.decisions() / litellm.adecisions() (litellm/decisions/main.py).

Neither is traced today, so these calls produce no LLM spans.

Proposed change

  • py/src/braintrust/integrations/openai/: patch Decisions.create and AsyncDecisions.create to emit an LLM span, reusing the existing usage parsing.
  • py/src/braintrust/integrations/litellm/patchers.py: add patchers for decisions / adecisions.
  • Add cassette-backed tests for both, gated on the version that introduced the API (see integrations/versioning.py).

Found while reviewing the dependency bumps in #911 (openai 3.24.0 → 3.29.0, litellm 1.104.0 → 1.105.0).

主要语言
Python
星标
22
派生
24
平均合并
15 小时 1 分钟
30 天内合并 PR
109

环境准备

  • 提供 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 摘要。