[bot] Spring AI OpenAI auto-instrumentation only covers chat — Image/Audio (speech & transcription) models are not instrumented
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
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 APIorg.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
- Spring AI OpenAI Image generation: https://docs.spring.io/spring-ai/reference/api/image/openai-image.html
- Spring AI OpenAI Audio Transcription: https://docs.spring.io/spring-ai/reference/api/audio/transcriptions/openai-transcriptions.html
- Spring AI OpenAI Text-to-Speech: https://docs.spring.io/spring-ai/reference/api/audio/speech/openai-speech.html
OpenAiAudioTranscriptionModelAPI reference: https://docs.spring.io/spring-ai/docs/current/api/org/springframework/ai/openai/OpenAiAudioTranscriptionModel.html
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 pointbraintrust-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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của braintrustdata/braintrust-sdk-java
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Tất cả issue của braintrustdata/braintrust-sdk-java
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
inu-appcenter/memorIN-backend#288 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
frontend maui-pilot pilot-ask question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Đang mởarea/plugin
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
kestra-io/plugin-kestra#190 ·