Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[bot] Spring AI OpenAI auto-instrumentation only covers chat — Image/Audio (speech & transcription) models are not instrumented

Đang mở
#151 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
65/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
java, spring
Lĩnh vực
devtools

Hướng nghiên cứu

Bắt đầu trong SpringAIOpenAIInstrumentationModule.java ở các dòng 39–58 và BraintrustSpringAI.java, sau đó kiểm tra các API thực thi của OpenAiImageModel, OpenAiAudioTranscriptionModel và OpenAiAudioSpeechModel. Mở rộng BraintrustSpringAITest.java để bao phủ các lệnh gọi hình ảnh, chuyển lời nói thành văn bản và tổng hợp giọng nói; hoàn thành nghĩa là các model này tạo ra spans và các bài kiểm thử chat và stream hiện có vẫn tiếp tục đạt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

<!-- provider-gap-audit: springai-openai-image-audio-not-instrumented -->

Summary

SpringAIOpenAIInstrumentationModule only installs a ByteBuddy hook on org.springframework.ai.openai.OpenAiChatModel$Builder.build(). Spring AI's spring-ai-openai artifact also ships stable, documented execution-model classes for image generation (OpenAiImageModel) and audio (OpenAiAudioTranscriptionModel, OpenAiAudioSpeechModel) — none of these are targeted by any TypeInstrumentation, so calls made through them produce no spans at all (not even generic/untagged ones, since the interception point itself never fires).

This is distinct from the already-filed embedding gap ("Spring AI instrumentation limited to OpenAI and Anthropic chat models; no embedding model support"), which covers OpenAiEmbeddingModel. It's also distinct from the direct-OpenAI-SDK gaps ("OpenAI Images API spans missing input/output capture", "OpenAI audio transcription and speech spans missing braintrust.output_json"), which are about com.openai:openai-java's own client.images()/client.audio(), not the Spring AI wrapper.

What is missing

braintrust-sdk/instrumentation/springai_1_0_0/src/main/java/dev/braintrust/instrumentation/springai/v1_0_0/auto/SpringAIOpenAIInstrumentationModule.java:

@Override
public List<TypeInstrumentation> typeInstrumentations() {
    return List.of(new OpenAiChatModelBuilderInstrumentation());
}

Only OpenAiChatModelBuilderInstrumentation (matching org.springframework.ai.openai.OpenAiChatModel$Builder) is registered. There is no equivalent TypeInstrumentation for:

  • org.springframework.ai.openai.OpenAiImageModel — image generation execution API (ImageModel.call())
  • org.springframework.ai.openai.OpenAiAudioTranscriptionModel — speech-to-text execution API
  • org.springframework.ai.openai.OpenAiAudioSpeechModel — text-to-speech execution API

All three are constructed independently of OpenAiChatModel and make their own HTTP calls through Spring AI's OpenAiAudioApi/OpenAiImageApi, which are not wrapped by BraintrustRestInterceptor/BraintrustWebClientFilter the way OpenAiApi (used by chat) is. Manual wrapping via BraintrustSpringAI also has no entry point for these model types — grep for ImageModel, AudioTranscriptionModel, AudioSpeechModel in braintrust-sdk/instrumentation/springai_1_0_0/ returns zero matches.

Braintrust docs status

not_found — the Braintrust docs for Spring AI / Java integrations do not mention image or audio model coverage; only chat completion examples are shown.

Upstream sources

Local files inspected

  • braintrust-sdk/instrumentation/springai_1_0_0/src/main/java/dev/braintrust/instrumentation/springai/v1_0_0/auto/SpringAIOpenAIInstrumentationModule.java — lines 39–58 (only chat model builder instrumentation registered)
  • braintrust-sdk/instrumentation/springai_1_0_0/src/main/java/dev/braintrust/instrumentation/springai/v1_0_0/BraintrustSpringAI.java — no image/audio model wrap entry point
  • braintrust-sdk/instrumentation/springai_1_0_0/src/test/java/dev/braintrust/instrumentation/springai/v1_0_0/BraintrustSpringAITest.java — only chat model tests (OpenAI + Anthropic, call/stream)
  • Full-module grep for ImageModel, AudioTranscriptionModel, AudioSpeechModel — zero matches
Ngôn ngữ chính
Java
Star
21
Fork
5
Merge trung bình
2 ngày 7 giờ
Pull request đã merge (30 ngày)
8

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của braintrustdata/braintrust-sdk-java

Tất cả issue của braintrustdata/braintrust-sdk-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.