Spaces:
Running
Running
Update app/main.py
Browse files- app/main.py +2 -2
app/main.py
CHANGED
@@ -22,7 +22,7 @@ from google.genai import types
|
|
22 |
|
23 |
from google import genai
|
24 |
import math
|
25 |
-
|
26 |
VERTEX_EXPRESS_MODELS = [
|
27 |
"gemini-2.0-flash-001",
|
28 |
"gemini-2.0-flash-lite-001",
|
@@ -1908,7 +1908,7 @@ async def chat_completions(request: OpenAIRequest, api_key: str = Depends(get_ap
|
|
1908 |
|
1909 |
# --- Determine which client to use (Express, Rotation, or Fallback) ---
|
1910 |
client_to_use = None
|
1911 |
-
express_api_key = os.environ.get(
|
1912 |
|
1913 |
if express_api_key and base_model_name in VERTEX_EXPRESS_MODELS:
|
1914 |
print(f"INFO: Attempting to use Vertex Express Mode for model {base_model_name} with API Key.")
|
|
|
22 |
|
23 |
from google import genai
|
24 |
import math
|
25 |
+
VERTEX_EXPRESS_API_KEY = "VERTEX_EXPRESS_API_KEY"
|
26 |
VERTEX_EXPRESS_MODELS = [
|
27 |
"gemini-2.0-flash-001",
|
28 |
"gemini-2.0-flash-lite-001",
|
|
|
1908 |
|
1909 |
# --- Determine which client to use (Express, Rotation, or Fallback) ---
|
1910 |
client_to_use = None
|
1911 |
+
express_api_key = os.environ.get(VERTEX_EXPRESS_API_KEY)
|
1912 |
|
1913 |
if express_api_key and base_model_name in VERTEX_EXPRESS_MODELS:
|
1914 |
print(f"INFO: Attempting to use Vertex Express Mode for model {base_model_name} with API Key.")
|