Skip to content

Release v0.2.6

Choose a tag to compare

@github-actions github-actions released this 08 Jun 13:25
Immutable release. Only release title and notes can be modified.
1c55ae2

Breaking Changes

⚠️ Breaking Changes

  • ChatMessage.Content type changed from string to json.RawMessage.
    Existing code that marshals or unmarshals ChatMessage must be updated to handle the new type.
  • Image content is now converted to OpenAI’s multimodal image_url format.
    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 ChatContentPart and ImageURL types for multimodal content arrays.
  • Add vision field to ModelConfig to control image handling per model.
  • Convert Anthropic image sources to OpenAI image_url with 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.Content to json.RawMessage for 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.json with new vision field 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.