Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#151 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
65/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
java, spring
領域
devtools

調査の方向性

SpringAIOpenAIInstrumentationModule.java の39–58行目と BraintrustSpringAI.java から始め、次に OpenAiImageModel、OpenAiAudioTranscriptionModel、OpenAiAudioSpeechModel の実行APIを調査します。画像、文字起こし、音声呼び出しのカバレッジを BraintrustSpringAITest.java に追加します。これらのモデルが spans を生成し、既存の chat と stream のテストが引き続き成功すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

<!-- 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
主要言語
Java
スター
21
フォーク
5
平均マージ
2日 7時間
マージ済み PR(30日)
8

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

braintrustdata/braintrust-sdk-java のほかの issue

braintrustdata/braintrust-sdk-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。