Skip to content

[bot] Missing instrumentation for Azure AI Inference Java SDK #118

@braintrust-bot

Description

@braintrust-bot

Summary

The Braintrust Java SDK does not instrument the Azure AI Inference Java SDK (com.azure:azure-ai-inference). This is Microsoft's official Java client for the Azure AI Foundry model catalog and GitHub Models, providing execution-oriented APIs for chat completions (sync and streaming), text embeddings, and function/tool calling. It is a distinct library from com.azure:azure-ai-openai (tracked in #68) — it targets a different Azure service endpoint and uses a different client hierarchy.

There is no instrumentation module, wrapper, test, example, or dependency for azure-ai-inference anywhere in this repository.

What is missing

The com.azure:azure-ai-inference SDK provides these execution surfaces, none of which are instrumented:

API Class Description
complete() ChatCompletionsClient Synchronous chat completions
completeAsync() ChatCompletionsAsyncClient Async chat completions
completeStream() ChatCompletionsClient Streaming chat completions (delta chunks)
embed() EmbeddingsClient Text embedding generation
Function/tool calling ChatCompletionsOptions Tool invocation during model execution
Multimodal ChatMessageImageContentItem Image inputs for vision-capable models

Why existing instrumentation does not cover this

The existing openai_2_15_0 module wraps com.openai:openai-java's internal HTTP client. The azure-ai-openai issue (#68) covers com.azure:azure-ai-openai, which targets the Azure OpenAI Service endpoint (/openai/deployments/).

com.azure:azure-ai-inference is a separate library targeting the Azure AI Inference Service endpoint (/models/chat/completions), used for:

  • GitHub Models (free-tier inference from github.com)
  • Azure AI Foundry model catalog (Llama, Mistral, Cohere, and other non-OpenAI models via Azure)

It uses the com.azure.core HTTP pipeline (Netty-based), which is completely separate from all existing instrumentation. Neither the OpenAI module nor the Azure OpenAI issue covers these calls.

Braintrust docs status

Upstream sources

Local files inspected

  • braintrust-sdk/instrumentation/ — contains openai_2_15_0, anthropic_2_2_0, genai_1_18_0, langchain_1_8_0, springai_1_0_0, aws_bedrock_2_30_0; no azure-ai-inference directory
  • settings.gradle — lists all instrumentation modules; no Azure AI Inference module present
  • Full-repo grep for azure.ai.inference, azure-ai-inference, ChatCompletionsClient, EmbeddingsClient (Azure) — zero matches

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions