fix: removing gemini from litellm for now, it is breaking

This commit is contained in:
Hemang
2025-11-06 12:19:46 +01:00
parent a6bed68aa5
commit 1b08b8fb66
2 changed files with 1 additions and 8 deletions

View File

@@ -160,15 +160,11 @@ import random
import os
base_url = "/api/v1/gateway/litellm/{add-your-dataset-name-here}"
EXAMPLE_MODELS = ["openai/gpt-4o", "gemini/gemini-2.5-flash-preview-09-2025", "anthropic/claude-3-5-haiku-20241022"]
EXAMPLE_MODELS = ["openai/gpt-4o", "anthropic/claude-3-5-haiku-20241022"]
model = random.choice(SAMPLE_MODELS)
base_url += "/" + model.split("/")[0] # append /gemini /openai or /anthropic.
if model.split("/")[0] == "gemini":
base_url += f"/v1beta/models/{model.split('/')[1]}" # gemini expects the model name in the url.
chat_response = completion(
model=model,
messages=[{"role": "user", "content": "What is the capital of France?"}],

View File

@@ -10,7 +10,6 @@ from litellm import completion
MODEL_API_KEYS = {
"openai/gpt-4o": "OPENAI_API_KEY",
"gemini/gemini-2.5-flash-preview-09-2025": "GEMINI_API_KEY",
"anthropic/claude-3-5-haiku-20241022": "ANTHROPIC_API_KEY",
}
@@ -46,8 +45,6 @@ async def test_chat_completion(
)
base_url += "/" + litellm_model.split("/")[0] # add provider name
if litellm_model.split("/")[0] == "gemini":
base_url += f"/v1beta/models/{litellm_model.split('/')[1]}" # gemini expects the model name in the url
chat_response = completion(
model=litellm_model,