[bot] Azure AI Inference SDK (`@azure-rest/ai-inference`) not instrumented — no tracing for Azure AI Foundry model execution (63,908 weekly downloads)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- azure, typescript
调研方向
首先阅读 js/src/auto-instrumentations/configs/ 中现有的配置,尤其是 openai.ts,以及 js/src/auto-instrumentations/configs/all.ts 中的注册信息。然后检查 e2e/scenarios/ 和列出的 Azure SDK 接口;当通过 @azure-rest/ai-inference 的 chat completions、streaming 和 embeddings 具备带测试的 tracing 覆盖率时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Summary
Microsoft publishes a dedicated TypeScript SDK for Azure AI model inference: @azure-rest/ai-inference (part of the Azure SDK for JavaScript). It provides execution APIs for chat completions, streaming, and embeddings for models hosted on Azure AI Foundry (Phi, Mistral, Meta Llama, and others). This package uses a path-based REST client pattern that is architecturally distinct from the openai npm package and is not covered by any existing instrumentation. Users who call @azure-rest/ai-inference directly get no Braintrust spans.
What instrumentation is missing
The @azure-rest/ai-inference package exposes these execution surfaces, none of which are instrumented:
| SDK Method | Description |
|---|---|
client.path("/chat/completions").post({ body: { messages, ... } }) |
Chat completions for hosted models |
.post({ body: { ..., stream: true } }).asNodeStream() |
Streaming chat completions |
client.path("/embeddings").post({ body: { input, model } }) |
Text embeddings |
Users instantiate it as:
import ModelClient from "@azure-rest/ai-inference";
import { AzureKeyCredential } from "@azure/core-auth";
const client = ModelClient(endpoint, new AzureKeyCredential(apiKey));
const response = await client.path("/chat/completions").post({
body: {
messages: [{ role: "user", content: "Hello" }],
model: "Phi-4",
},
});
Auto-instrumentation gap:
The @azure-rest/ai-inference SDK uses a path-based REST client architecture (from @azure/core-rest-pipeline) that is fundamentally different from the openai package's class-method structure. None of the existing configs in js/src/auto-instrumentations/configs/ target any @azure-rest/* module paths. The existing openai instrumentation targets openai module file paths and does not fire for calls made through @azure-rest/ai-inference.
No coverage in any instrumentation layer:
- No auto-instrumentation config for
@azure-rest/ai-inferenceinjs/src/auto-instrumentations/configs/ - No wrapper function (e.g.
wrapAzureAIInference()) - No channels or plugin for Azure AI Inference methods in
js/src/instrumentation/plugins/ - No e2e test scenarios
- Grep for
azure-rest,@azure, orai-inferenceacrossjs/src/returns zero matches
Braintrust docs status
unclear — The Braintrust integrations page at https://www.braintrust.dev/docs/integrations lists "Azure AI Foundry" as a supported provider, but the JavaScript SDK documentation does not describe any direct instrumentation for the @azure-rest/ai-inference package.
Upstream references
@azure-rest/ai-inferencesource: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/ai/ai-inference-rest- npm install:
npm install @azure-rest/ai-inference
Local files inspected
js/src/auto-instrumentations/configs/— full config list:anthropic.ts,openai.ts,ai-sdk.ts,groq.ts,mistral.ts,cohere.ts,huggingface.ts,google-genai.ts,google-adk.ts,genkit.ts,openai-agents.ts,openrouter.ts,openrouter-agent.ts,claude-agent-sdk.ts,cursor-sdk.ts,github-copilot.ts,openai-codex.ts,flue.ts— no Azure AI Inference config presentjs/src/auto-instrumentations/configs/all.ts—@azure-rest/ai-inferencenot listed among any instrumentation groups- Full repo grep for
azure-rest,@azure,ai-inferenceinjs/src/— zero matches e2e/scenarios/— no Azure AI Inference test scenarios
- 主要语言
- TypeScript
- 星标
- 29
- 派生
- 16
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 69
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
braintrustdata/braintrust-sdk-javascript 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
braintrustdata/braintrust-sdk-javascript#2605 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
braintrustdata/braintrust-sdk-javascript#2604 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
braintrustdata/braintrust-sdk-javascript#2603 ·
维护者通常 1 天内回复
-
typescript
难度 4/5 3-5 天 新手友好度 55/100
braintrustdata/braintrust-sdk-javascript#2578 ·
维护者通常 1 天内回复
-
[bot] Instrument Letta Agent SDK (143,425 weekly downloads)可能已有人在做 @karthiksenv 于 1 天前认领。 未关闭typescript
难度 4/5 3-5 天 新手友好度 55/100
braintrustdata/braintrust-sdk-javascript#2577 ·
维护者通常 1 天内回复
查看 braintrustdata/braintrust-sdk-javascript 的全部 Issue
相似的 Issue
-
ui(ListToolbar): search takes the full row on a phone instead of sharing it with the result count未关闭
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
priority:high
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
immich-app/immich#32426 ·
维护者通常 1 天内回复
-
documentation good first issue hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 78/100
libredb/libredb-studio#1756 ·
维护者通常 1 天内回复