Sticker generation was failing when using newer GPT image models (gpt-image-1, gpt-image-1-mini, gpt-image-1.5). The issue occurred because stickers requested 256x256 size, but these models only support 1024x1024, 1536x1024, 1024x1536, and auto. To reproduce, send `!bai sticker Something` to an agent configured with a GPT image model. The error was: invalid_request_error: Invalid value: '256x256'. Supported values are: '1024x1024', '1024x1536', '1536x1024', and 'auto'. (param: size) (code: invalid_value) The fix replaces the hardcoded 256x256 size override with a `smallest_size_possible` flag, letting each provider determine the appropriate sticker size based on the model being used. The `openai_compat` provider still defaults to requesting 256x256 in all cases (regardless of model name).
6.7 KiB
6.7 KiB