While working on the initial observability support in Spring AI (delivered in https://github.com/spring-projects/spring-ai/pull/954), more common behaviour emerged across the different model providers with regards to the options used to customize model requests. It's worth surfacing those common options through the ChatOptions (e.g. model name, max tokens, stop sequences), EmbeddingOptions (e.g. dimensions, encoding format), and ImageOptions (e.g. image style) abstractions.

As agreed with @tzolov, I'll submit a PR for each of the three option variants and simply the observation contextual data accordingly.

  • [x] ChatOptions
  • [x] EmbeddingOptions => https://github.com/spring-projects/spring-ai/pull/1183
  • [x] ImageOptions => https://github.com/spring-projects/spring-ai/pull/1151

Comment From: tzolov

@ThomasVitale, I guess the https://github.com/spring-projects/spring-ai/pull/1151 is related to ImageOptions not to the ChatOptions as shown above?

Comment From: ThomasVitale

Right, I added the link to the wrong bullet point. I'll fix that and proceed with the 2 other PRs completing this task