Aksel Joonas Reedi commited on
Commit
0b64e00
·
unverified ·
1 Parent(s): 962191f

Make X-HF-Bill-To configurable via HF_BILL_TO env (default smolagents) (#57)

Browse files
Files changed (1) hide show
  1. agent/core/llm_params.py +2 -1
agent/core/llm_params.py CHANGED
@@ -68,7 +68,8 @@ def _resolve_llm_params(
68
  "api_key": api_key,
69
  }
70
  if os.environ.get("INFERENCE_TOKEN"):
71
- params["extra_headers"] = {"X-HF-Bill-To": "huggingface"}
 
72
  if reasoning_effort:
73
  hf_level = "low" if reasoning_effort == "minimal" else reasoning_effort
74
  if hf_level in _HF_ALLOWED_EFFORTS:
 
68
  "api_key": api_key,
69
  }
70
  if os.environ.get("INFERENCE_TOKEN"):
71
+ bill_to = os.environ.get("HF_BILL_TO", "smolagents")
72
+ params["extra_headers"] = {"X-HF-Bill-To": bill_to}
73
  if reasoning_effort:
74
  hf_level = "low" if reasoning_effort == "minimal" else reasoning_effort
75
  if hf_level in _HF_ALLOWED_EFFORTS: