Commit c792d752 authored by Your Name's avatar Your Name

Fix image model routing: use request model, fall back to default

- If request specifies a model, use that
- If request doesn't specify a model (empty or 'image'), use default
- Legacy 'image:' prefix also falls back to default
- Error handling already exists for when no backend is available
parent fa5c634f
...@@ -3278,8 +3278,13 @@ async def create_image_generation(request: ImageGenerationRequest): ...@@ -3278,8 +3278,13 @@ async def create_image_generation(request: ImageGenerationRequest):
) )
# Determine model to use # Determine model to use
# Priority: 1) model specified in request, 2) default image model from --image-model
model_to_use = request.model model_to_use = request.model
if model_to_use.startswith("image:"): if not model_to_use or model_to_use == "image":
# No model specified in request, use default
model_to_use = image_model
elif model_to_use.startswith("image:"):
# Legacy format - strip prefix and use default
model_to_use = image_model model_to_use = image_model
# Track errors for proper fallback chain # Track errors for proper fallback chain
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment