Skip to content

Commit 3c516e0

Browse files
committed
only pass fireworks key if it's fireworks model
1 parent ea7687d commit 3c516e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

eval_protocol/proxy/proxy_core/litellm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ async def handle_chat_completion(
6363
auth_header = request.headers.get("authorization", "")
6464
if auth_header.startswith("Bearer "):
6565
api_key = auth_header.replace("Bearer ", "").strip()
66-
data["api_key"] = api_key
66+
# Only inject API key if model is a Fireworks model
67+
model = data.get("model")
68+
if model and isinstance(model, str) and model.startswith("fireworks_ai"):
69+
data["api_key"] = api_key
6770

6871
# If metadata IDs are provided, add them as tags
6972
insertion_id = None

0 commit comments

Comments
 (0)