Release v0.2.6
Immutable
release. Only release title and notes can be modified.
Breaking Changes
ChatMessage.Contenttype changed fromstringtojson.RawMessage.
Existing code that marshals or unmarshalsChatMessagemust be updated to handle the new type.- Image content is now converted to OpenAI’s multimodal
image_urlformat.
Models without vision support ("vision": false) will receive a[Image]placeholder instead of an image URL.
Summary
This release adds full multimodal image support for Anthropic‑to‑OpenAI request conversion, introduces a vision flag in model configuration, and improves request/response handling for image data. The changes also include several bug fixes, performance tweaks, and documentation updates.
New Features
- Add support for image multimodal content in Anthropic‑to‑OpenAI conversion.
- Introduce
ChatContentPartandImageURLtypes for multimodal content arrays. - Add
visionfield toModelConfigto control image handling per model. - Convert Anthropic image sources to OpenAI
image_urlwith base64 data URLs. - Replace images with
[Image]placeholder for non‑vision models to avoid 400 errors. - Update response/stream transformers to use
ContentText()accessor.
Bug Fixes
- Fix image content blocks being discarded during request transformation.
- Fix code review comments: improve error handling and comments.
- Fix image handling for non‑vision models to prevent unwanted fallback.
- Fix formatting inconsistencies in request tests and OpenAI package.
Improvements
- Change
ChatMessage.Contenttojson.RawMessagefor dual‑format serialization (string or array). - Update request and response transformers for better type safety and clarity.
- Enhance test coverage for new multimodal content handling.
Documentation
- Update
config.example.jsonwith newvisionfield and example image handling. - Add comments and documentation for new types (
ChatContentPart,ImageURL).
Chores
- Refactor request and stream handling code for consistency.
- Update internal tests to reflect new content type and image handling logic.
- Minor code formatting fixes across repository.