-
Notifications
You must be signed in to change notification settings - Fork 645
Description
Describe the bug
After updating to the latest version(Genkit JS 1.27.0),
image inputs defined via dotPrompt using {{media url=image}} cause a runtime error when converted to OpenAI chat completion content.
This feature works fine in version 1.26.0 or lower.
The probable causes are the following changes: https://github.com/firebase/genkit/pull/3923/files
Full error message:
Error: File URLs are not supported for chat completions.
Only base64-encoded files and image URLs are supported.
Content type: undefined
To Reproduce
- Define a prompt using dotPrompt with image media:
{{media url=image}}
- Bind image to a remote image Signed-URL from Firebase Storage:
{
image: {
url: 'https://storage.googleapis.com/...'
}
}
Runtime (please complete the following information):
- OS: windows 10 22H2
Node version
- v24.13.0
Additional context
It looks like the regression is caused by relying solely on part.media.contentType
to determine whether a media input is an image.
One possible way to resolve this could be to prioritize the declared media intent
(e.g. image) over contentType, or to add a fallback for common image URL patterns
when contentType is missing.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status