diff --git a/main.py b/main.py index c18ae9a..2f69a6b 100644 --- a/main.py +++ b/main.py @@ -836,6 +836,7 @@ async def process_request(request: Union[RequestModel, ImageGenerationRequest, A and "gpt" not in original_model \ and "o1" not in original_model \ and "gemini" not in original_model \ + and "grok" not in original_model \ and parsed_url.netloc != 'api.cloudflare.com' \ and parsed_url.netloc != 'api.cohere.com': engine = "openrouter" diff --git a/request.py b/request.py index f19efda..abe6d81 100644 --- a/request.py +++ b/request.py @@ -78,7 +78,7 @@ async def get_image_message(base64_image, engine = None): semicolon_index = base64_image.index(";") image_type = base64_image[colon_index + 1:semicolon_index] - if "gpt" == engine: + if "gpt" == engine or "openrouter" == engine: return { "type": "image_url", "image_url": {