Gap
models.editImage() in @google/genai is not instrumented. The method edits an image based on a text prompt and a list of reference images (Imagen image editing), and is a stable generative execution API.
Evidence
- SDK source:
src/models.ts in googleapis/js-genai exposes editImage() as a public method on the Models class alongside the already-instrumented generateContent and embedContent.
- Current instrumentation:
js/src/instrumentation/plugins/google-genai-channels.ts and google-genai-plugin.ts only cover models.generateContent, models.generateContentStream, and models.embedContent.
- Vendor types:
js/src/vendor-sdk-types/google-genai.ts — GoogleGenAIModels interface does not include editImage.
- Auto-instrumentation config:
js/src/auto-instrumentations/configs/google-genai.ts only instruments generateContentInternal, generateContentStreamInternal, and embedContent/embedContentInternal.
Proposed work
- Add
editImage to GoogleGenAIModels vendor type interface.
- Add a channel for
models.editImage in google-genai-channels.ts.
- Instrument the channel in
google-genai-plugin.ts to capture the prompt input and image output as an LLM span.
- Add auto-instrumentation config targeting the underlying internal method in
google-genai.ts.
Gap
models.editImage()in@google/genaiis not instrumented. The method edits an image based on a text prompt and a list of reference images (Imagen image editing), and is a stable generative execution API.Evidence
src/models.tsingoogleapis/js-genaiexposeseditImage()as a public method on theModelsclass alongside the already-instrumentedgenerateContentandembedContent.js/src/instrumentation/plugins/google-genai-channels.tsandgoogle-genai-plugin.tsonly covermodels.generateContent,models.generateContentStream, andmodels.embedContent.js/src/vendor-sdk-types/google-genai.ts—GoogleGenAIModelsinterface does not includeeditImage.js/src/auto-instrumentations/configs/google-genai.tsonly instrumentsgenerateContentInternal,generateContentStreamInternal, andembedContent/embedContentInternal.Proposed work
editImagetoGoogleGenAIModelsvendor type interface.models.editImageingoogle-genai-channels.ts.google-genai-plugin.tsto capture the prompt input and image output as an LLM span.google-genai.ts.