Malina Claude Opus 4.8 commited on
Commit
988cdc2
路
1 Parent(s): 466ef03

brain: bill inference to NextNeural org via bill_to (was charging personal token owner)

Browse files

InferenceClient(bill_to='NextNeural') routes Inference Providers usage to the org
instead of the personal account that owns HF_TOKEN. Also unblocks replies since the
org has billing/credit. Configurable via ARIA_BILL_TO; requirements bumped for bill_to.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Files changed (2) hide show
  1. brain/orchestrator.py +6 -1
  2. requirements.txt +1 -1
brain/orchestrator.py CHANGED
@@ -24,7 +24,12 @@ from .schema import sanitize_bubbles
24
  MODEL = os.environ.get("ARIA_MODEL", "google/gemma-3-27b-it")
25
  HF_TOKEN = os.environ.get("HF_TOKEN") # Space secret, used for server-side inference
26
 
27
- _client = InferenceClient(model=MODEL, token=HF_TOKEN)
 
 
 
 
 
28
 
29
 
30
  _SIGNOFF_PL = ["musz臋 lecie膰", "ok to nara", "elo, wpadn臋 p贸藕niej",
 
24
  MODEL = os.environ.get("ARIA_MODEL", "google/gemma-3-27b-it")
25
  HF_TOKEN = os.environ.get("HF_TOKEN") # Space secret, used for server-side inference
26
 
27
+ # Bill inference to the organization (not the personal account that owns the token).
28
+ # Requires org billing to be set up and the token to be a member. Set ARIA_BILL_TO=""
29
+ # to fall back to personal billing.
30
+ BILL_TO = os.environ.get("ARIA_BILL_TO", "NextNeural") or None
31
+
32
+ _client = InferenceClient(model=MODEL, token=HF_TOKEN, bill_to=BILL_TO)
33
 
34
 
35
  _SIGNOFF_PL = ["musz臋 lecie膰", "ok to nara", "elo, wpadn臋 p贸藕niej",
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
  gradio>=6.5.1
2
- huggingface_hub>=0.27.0
 
1
  gradio>=6.5.1
2
+ huggingface_hub>=0.29.0