You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert various image sources into OpenAI-compatible image_url parts and send them inline in chat messages so vision-capable models work via both binding and REST paths. Key changes:
- convertToWorkersAIChatMessages: accept LanguageModelV3DataContent (Uint8Array, base64, data URL), normalize to bytes, and emit content arrays with image_url data: URLs; removed the separate images array.
- workers-ai-provider: allow messages.content to be either string or content-part arrays, normalize binding messages but pass content arrays through at runtime.
- workersai-chat-language-model / create-fetcher: stop extracting a separate image payload and instead include content arrays in inputs; cast inputs for binding runtime use.
- Tests and e2e fixtures: added/updated tests for base64, data URLs, multiple images, REST & binding vision flows; updated mock binding worker to handle vision route.
- Docs: added Vision (Image Inputs) usage examples to READMEs.
This enables sending images (Uint8Array, base64, or data URLs) inline as image_url parts so models like Llama 4 Scout and Kimi K2.5 can perform vision tasks.
Images can be provided as `Uint8Array`, base64 strings, or data URLs. Multiple images per message are supported. Works with both the binding and REST API configurations.
0 commit comments