OpenAI + LiteLLM: trace new decisions API
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
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/: patchDecisions.createandAsyncDecisions.createto emit an LLM span, reusing the existing usage parsing.py/src/braintrust/integrations/litellm/patchers.py: add patchers fordecisions/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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
braintrustdata/braintrust-sdk-python 的其他 Issue
-
feature python
难度 2/5 1-3 小时 新手友好度 76/100
braintrustdata/braintrust-sdk-python#868 ·
维护者通常 1 天内回复
-
Trace new provider APIs/params from Oct 2026 dependency bumps可能已有人在做 @AbhiPrasad 于 1 天前认领。 未关闭feature python
braintrustdata/braintrust-sdk-python#920 · 已指派 1 人 ·
维护者通常 1 天内回复
-
new-integration python
难度 4/5 3-5 天 新手友好度 55/100
braintrustdata/braintrust-sdk-python#854 ·
维护者通常 1 天内回复
-
new-integration python
难度 5/5 一周以上 新手友好度 35/100
braintrustdata/braintrust-sdk-python#853 ·
维护者通常 1 天内回复
-
new-integration python
难度 4/5 3-5 天 新手友好度 52/100
braintrustdata/braintrust-sdk-python#852 ·
维护者通常 1 天内回复
查看 braintrustdata/braintrust-sdk-python 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
Deltares/imod-python#1940 ·
维护者通常 1 天内回复
-
effort: low prio: low ready
难度 1/5 1 小时以内 新手友好度 82/100
digitalfabrik/integreat-cms#4621 ·
维护者通常 5 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
ioos/compliance-checker#1375 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
netbox status: backlog topic: testing type: housekeeping
难度 2/5 1-3 小时 新手友好度 70/100
netbox-community/netbox#23395 ·
维护者通常 1 天内回复