Skip to content

Commit 00339e8

Browse files
cursoragentdhuang
andcommitted
Remove unnecessary User-Agent header from Fireworks adapter
Co-authored-by: dhuang <dhuang@fireworks.ai>
1 parent cbc418b commit 00339e8

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

eval_protocol/adapters/fireworks_tracing.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import os
1313

1414
from eval_protocol.models import EvaluationRow, InputMetadata, ExecutionMetadata, Message
15-
from eval_protocol.common_utils import get_user_agent
1615
from .base import BaseAdapter
1716
from .utils import extract_messages_from_data
1817

@@ -274,10 +273,7 @@ def search_logs(self, tags: List[str], limit: int = 100, hours_back: int = 24) -
274273
if not tags:
275274
raise ValueError("At least one tag is required to fetch logs")
276275

277-
headers = {
278-
"Authorization": f"Bearer {os.environ.get('FIREWORKS_API_KEY')}",
279-
"User-Agent": get_user_agent(),
280-
}
276+
headers = {"Authorization": f"Bearer {os.environ.get('FIREWORKS_API_KEY')}"}
281277
params: Dict[str, Any] = {"tags": tags, "limit": limit, "hours_back": hours_back, "program": "eval_protocol"}
282278

283279
# Try /logs first, fall back to /v1/logs if not found
@@ -402,10 +398,7 @@ def get_evaluation_rows(
402398
else:
403399
url = f"{self.base_url}/v1/traces/pointwise"
404400

405-
headers = {
406-
"Authorization": f"Bearer {os.environ.get('FIREWORKS_API_KEY')}",
407-
"User-Agent": get_user_agent(),
408-
}
401+
headers = {"Authorization": f"Bearer {os.environ.get('FIREWORKS_API_KEY')}"}
409402

410403
result = None
411404
try:

eval_protocol/log_utils/fireworks_tracing_http_handler.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
import requests
88

9-
from ..common_utils import get_user_agent
10-
119

1210
class FireworksTracingHttpHandler(logging.Handler):
1311
"""Logging handler that posts structured logs to tracing.fireworks gateway /logs endpoint."""
@@ -24,10 +22,7 @@ def __init__(self, gateway_base_url: Optional[str] = None, rollout_id_env: str =
2422
api_key = os.environ.get("FIREWORKS_API_KEY")
2523
if api_key:
2624
try:
27-
self._session.headers.update({
28-
"Authorization": f"Bearer {api_key}",
29-
"User-Agent": get_user_agent(),
30-
})
25+
self._session.headers.update({"Authorization": f"Bearer {api_key}"})
3126
except Exception:
3227
pass
3328

0 commit comments

Comments
 (0)