发布

  • feat(ai): add ImageModel interface with Atlas Cloud and OpenAI support (#2905)

    frostbyte_neo 发布于 2026-05-28 11:21:46 +00:00

    Add ai.ImageModel interface for text-to-image generation alongside
    the existing ai.Model for text. Uses the same options pattern
    (WithAPIKey, WithBaseURL) and the same provider registration
    system (RegisterImage/NewImage).

    Implement GenerateImage for Atlas Cloud and OpenAI providers via
    the OpenAI-compatible /v1/images/generations endpoint. Default
    image model is gpt-image-1. Responses return images as URL,
    base64, or both depending on the provider.

    Update Atlas Cloud blog post and integration guide with image
    generation examples. Update ai/README.md with ImageModel docs.

    Co-authored-by: Claude noreply@anthropic.com

    下载附件