Expand description
Image generation client: unified interface for multiple providers.
Supports two protocols:
Openai: OpenAI-compatible Images API (POST /images/generations).Dashscope: DashScope native protocol (Wanxiang), with sync and async call modes. Async mode submits a task then polls until completion.
The model used is resolved from config (default_image_model) and is not
exposed to callers - the client uses provider.model_id internally.
Structs§
- Generated
Image - A single generated image, as returned by the provider API.
- Image
GenClient - Image
GenError Info - Structured error info extracted from an
ImageGenError, for returning to the LLM in a machine-parseable form so it can decide whether to retry. - Image
GenRequest - Parameters for an image generation request.