v2.22.0

Enhanced Image URL Handling for Base64 Support

Sreejan
SreejanAuthor

This release introduces a significant improvement to the handling of multimodal requests by allowing base64-encoded images to be sent directly in the API payload.

Improvements

2
  • Replaced the strict HttpUrl type with a more flexible str type for image URLs in the chat payload schema.
  • Added a custom validator to ensure image URLs are either valid HTTP/HTTPS links or data:image/... base64 data URIs, enabling direct submission of local images.

Refactor

1
  • Simplified payload adapter logic for all providers by removing the need to convert HttpUrl objects to strings. This change streamlines code and reduces complexity across multiple provider modules.