[bot] Instrument Z.AI Java SDK (34,271 weekly downloads)
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- java
- Domínio
- backend, observability
Direção de pesquisa
Read AGENTS.md and compare the existing modules under braintrust-sdk/instrumentation/*, especially their build.gradle files. Then inspect the upstream zai-org/z-ai-sdk-java client APIs and the repository’s instrumentation patterns. Done means the Java SDK’s relevant Z.AI calls are traced and covered by tests; the issue does not identify specific entry points or tests.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
Z.AI (formerly Zhipu AI, makers of the GLM model family) publishes an official Java SDK, zai-org/z-ai-sdk-java, distributed on Maven Central as ai.z.openapi:zai-sdk. It exposes a dedicated client (ZaiClient / ZhipuAiClient) for execution-oriented generative AI calls — chat completions (sync + streaming), function/tool calling, embeddings, vision, image generation, video generation, and speech. This SDK is not covered by any existing instrumentation module in this repo, and its client classes are entirely distinct from the com.openai/com.anthropic/dev.langchain4j/Spring AI/Bedrock/Google GenAI classes already instrumented, so none of today's bytecode instrumentation applies to it.
What is missing
| Capability | Upstream (ai.z.openapi:zai-sdk) |
Braintrust Java SDK instrumentation |
|---|---|---|
| Chat completions (sync) | ✅ ChatCompletionService |
❌ not instrumented |
| Streaming chat completions | ✅ Flowable-based streaming |
❌ not instrumented |
| Function / tool calling | ✅ | ❌ not instrumented |
| Embeddings | ✅ | ❌ not instrumented |
| Vision / multimodal | ✅ | ❌ not instrumented |
| Image / video generation | ✅ | ❌ not instrumented |
None of braintrust-sdk/instrumentation/* targets the ai.z.openapi group — the directory currently contains only anthropic_2_2_0, aws_bedrock_2_30_0, genai_1_18_0, langchain_1_14_0, langchain_1_8_0, openai_2_15_0, springai_1_0_0, and springai_2_0_0.
Weekly downloads
Maven Central does not publish public per-artifact download counts, so per this repo's established precedent (e.g. #162) the primary tracked distribution for this SDK family is cited instead: the official Python package zai-sdk on PyPI had 34,271 downloads in the last 7 days, as of 2026-10-19, per pypistats.org (https://pypistats.org/api/packages/zai-sdk/recent → {"last_week": 34271}; corroborated by the daily overall series at https://pypistats.org/api/packages/zai-sdk/overall covering 2026-04-08–2026-10-18).
Braintrust docs status
Checked braintrust.dev/docs/admin/ai-providers: Braintrust lists OpenAI, Anthropic, Google Vertex AI, Azure AI Foundry, Bedrock, and custom providers as configurable AI providers. GLM (Z.AI's model family) appears only as a Braintrust-hosted built-in model (GLM-5.2, GLM-5.3 Flash, served via Baseten through the Braintrust gateway using an OpenAI-compatible endpoint) — there is no direct Z.AI/Zhipu provider integration or SDK-instrumentation guidance. A user calling Z.AI's own API directly via the official zai-sdk Java client (rather than routing through Braintrust's gateway with the OpenAI SDK) gets no tracing today.
Upstream sources
- SDK repo: https://github.com/zai-org/z-ai-sdk-java
- Official docs: https://docs.z.ai/guides/develop/java/introduction
- Maven Central: https://central.sonatype.com/artifact/ai.z.openapi/zai-sdk (latest
0.3.5; active release cadence from0.0.6through0.3.5across 2025–2026)
Braintrust docs sources
- https://www.braintrust.dev/docs/admin/ai-providers
- https://braintrust.dev/blog/glm-52-vs-opus-48-technical-report
Local files inspected
AGENTS.mdbraintrust-sdk/instrumentation/*/build.gradle(anthropic_2_2_0, aws_bedrock_2_30_0, genai_1_18_0, langchain_1_14_0, langchain_1_8_0, openai_2_15_0, springai_1_0_0, springai_2_0_0)- Directory listing of
braintrust-sdk/instrumentation/*
- Linguagem predominante
- Java
- Estrelas
- 21
- Forks
- 5
- Merge médio
- 18h 29min
- PRs com merge (30d)
- 8
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de braintrustdata/braintrust-sdk-java
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 38/100
Todas as issues de braintrustdata/braintrust-sdk-java
Issues semelhantes
-
bug/错误
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
FCL-Team/FoldCraftLauncher#1951 ·
Mantenedores costumam responder em até 4 dias
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 68/100
quarkusio/quarkus-agent-mcp#296 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
commons-app/apps-android-commons#7072 ·
Mantenedores costumam responder em até 1 dia
-
enhancement web-ui
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
jenkinsci/jenkins#27583 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100