Commit
·
743b676
1
Parent(s):
c204ed5
routing 2.5f to global region
Browse files- app/routes/chat_api.py +2 -2
app/routes/chat_api.py
CHANGED
@@ -116,8 +116,8 @@ async def chat_completions(fastapi_request: Request, request: OpenAIRequest, api
|
|
116 |
if key_tuple:
|
117 |
original_idx, key_val = key_tuple
|
118 |
try:
|
119 |
-
# Check if model contains "gemini-2.5-pro" for direct URL approach
|
120 |
-
if "gemini-2.5-pro" in base_model_name:
|
121 |
client_to_use = DirectVertexClient(api_key=key_val)
|
122 |
await client_to_use.discover_project_id()
|
123 |
print(f"INFO: Attempt {attempt+1}/{total_keys} - Using DirectVertexClient for model {request.model} (base: {base_model_name}) with API key (original index: {original_idx}).")
|
|
|
116 |
if key_tuple:
|
117 |
original_idx, key_val = key_tuple
|
118 |
try:
|
119 |
+
# Check if model contains "gemini-2.5-pro" or "gemini-2.5-flash" for direct URL approach
|
120 |
+
if "gemini-2.5-pro" in base_model_name or "gemini-2.5-flash" in base_model_name:
|
121 |
client_to_use = DirectVertexClient(api_key=key_val)
|
122 |
await client_to_use.discover_project_id()
|
123 |
print(f"INFO: Attempt {attempt+1}/{total_keys} - Using DirectVertexClient for model {request.model} (base: {base_model_name}) with API key (original index: {original_idx}).")
|