mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 01:10:10 +08:00
* fix(imagegen): prefill image models the providers still serve The OpenAI image provider prefilled gpt-image-1, which OpenAI retired on 2026-10-23, and OpenRouter prefilled google/gemini-2.5-flash-image-preview, which OpenRouter no longer lists, so a user who kept the prefill got a failing first request. They now prefill gpt-image-2 and google/gemini-3.1-flash-image. * fix(imagegen): prefill gpt-image-2.6-flare instead of gpt-image-2 OpenAI shuts gpt-image-2 down on 2027-02-10 and names gpt-image-2.6-flare or -sunburst as the replacement; its image guide recommends the 2.6 models for new integrations. Flare is the general, fast-iteration model and uses the same Images API, so the OpenAI prefill moves to it now instead of to another retiring model.
30 lines
1.0 KiB
Python
30 lines
1.0 KiB
Python
"""Image-generation Settings prefills must name models the provider still serves.
|
|
|
|
OpenAI retired gpt-image-1 on 2026-10-23 (dall-e-2 and dall-e-3 on 2026-05-12) and
|
|
shuts gpt-image-2 down on 2027-02-10, naming gpt-image-2.6-flare or -sunburst:
|
|
https://platform.openai.com/docs/deprecations. OpenRouter no longer lists
|
|
google/gemini-2.5-flash-image-preview.
|
|
"""
|
|
|
|
from deeptutor.services.config.provider_runtime import IMAGEGEN_PROVIDERS
|
|
|
|
RETIRED = {
|
|
"openai": {"gpt-image-2", "gpt-image-1", "dall-e-3", "dall-e-2"},
|
|
"openrouter": {"google/gemini-2.5-flash-image-preview"},
|
|
}
|
|
|
|
|
|
def test_openai_prefill_is_a_served_image_model() -> None:
|
|
spec = IMAGEGEN_PROVIDERS["openai"]
|
|
|
|
assert spec.default_model == "gpt-image-2.6-flare"
|
|
assert spec.default_model not in RETIRED["openai"]
|
|
|
|
|
|
def test_openrouter_prefill_is_a_listed_image_model() -> None:
|
|
spec = IMAGEGEN_PROVIDERS["openrouter"]
|
|
|
|
assert spec.default_model == "google/gemini-3.1-flash-image"
|
|
assert spec.default_model not in RETIRED["openrouter"]
|
|
assert spec.adapter == "chat_completions"
|