Skip to content

Validate base64 embedding inputs use data URI format#145038

Draft
DonalEvans wants to merge 3 commits intoelastic:mainfrom
DonalEvans:validate-embedding-base64-data-uri-format
Draft

Validate base64 embedding inputs use data URI format#145038
DonalEvans wants to merge 3 commits intoelastic:mainfrom
DonalEvans:validate-embedding-base64-data-uri-format

Conversation

@DonalEvans
Copy link
Contributor

The EMBEDDING task type requires that image inputs using the BASE64 format are data URIs. This commit adds validation that inputs using the BASE64 format conform to the data URI format; i.e. that they begin with "data:{some text}/{some other text};base64,"

This validation does not guarantee that the specified MIME type is valid, that the MIME type matches the base64 data, or that the base46 data in the input is valid.

Closes #144900

The EMBEDDING task type requires that image inputs using the BASE64
format are data URIs. This commit adds validation that inputs using the
BASE64 format conform to the data URI format; i.e. that they begin
with "data:{some text}/{some other text};base64,"

This validation does not guarantee that the specified MIME type is
valid, that the MIME type matches the base64 data, or that the base46
data in the input is valid.
@DonalEvans DonalEvans added >bug Feature:GenAI Features around GenAI :SearchOrg/Inference Label for the Search Inference team Team:Search - Inference v9.4.0 labels Mar 26, 2026
@elasticsearchmachine
Copy link
Collaborator

Hi @DonalEvans, I've created a changelog YAML for you.

@DonalEvans DonalEvans marked this pull request as ready for review March 26, 2026 22:25
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-inference-team (Team:Search - Inference)

@DonalEvans DonalEvans marked this pull request as draft March 26, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug Feature:GenAI Features around GenAI :SearchOrg/Inference Label for the Search Inference team Team:Search - Inference v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Inference API] Data URI format should be enforced for image inputs with embedding task

2 participants