fix: correct openrouter input_references format ({type,image_url:{url}}, was {url}->400 ZodError)
This commit is contained in:
@@ -56,7 +56,7 @@ export async function generateImage(opts: GenerateOpts): Promise<GenerateResult>
|
||||
n: 1,
|
||||
output_format: opts.outputFormat || 'png',
|
||||
};
|
||||
if (opts.inputUrl) body.input_references = [{ url: opts.inputUrl }];
|
||||
if (opts.inputUrl) body.input_references = [{ type: 'image_url', image_url: { url: opts.inputUrl } }];
|
||||
if (opts.aspectRatio) body.aspect_ratio = opts.aspectRatio;
|
||||
if (opts.resolution && !opts.aspectRatio) body.resolution = opts.resolution; // nie beides
|
||||
if (opts.background) body.background = opts.background;
|
||||
|
||||
Reference in New Issue
Block a user