spring-ai icon indicating copy to clipboard operation
spring-ai copied to clipboard

Add WebP image support for multimodality

Open laurentperez opened this issue 5 months ago • 1 comments

Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested. => I searched for "webp".

Expected Behavior

WebP images can be used in multimodality

Current Behavior

Currently no constant is available for WebP in https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/util/MimeTypeUtils.html which is used by Spring AI Media class.

Context

How has this issue affected you?

Currently my company has a PDF to WebP converter pipeline and we'd like to then send these webp images to a LLM supporting multimodality.

laurentperez avatar Jun 20 '26 18:06 laurentperez

Thanks for reporting this.

I checked the current OpenAiChatOptions implementation and it looks like promptCacheKey is indeed missing, while the reference documentation still lists spring.ai.openai.chat.options.prompt-cache-key.

I’d be happy to work on a small PR to restore this option if the team agrees with that direction.

The change would likely include:

  • adding promptCacheKey to OpenAiChatOptions
  • adding builder/getter/mutate/equality coverage
  • mapping it to the OpenAI chat completion request
  • adding focused tests for the builder/property binding/request mapping

codingkiddo avatar Jun 25 '26 03:06 codingkiddo