Rename Opus gate to OPUS_ACCESS_ORG (default ml-agent-explorers)#73
Rename Opus gate to OPUS_ACCESS_ORG (default ml-agent-explorers)#73akseljoonas wants to merge 1 commit intomainfrom
Conversation
…xplorers The Opus staff gate was named after HF employees (HF_EMPLOYEE_ORG, require_huggingface_org_member), which read as "only HF staff can use Opus". The actual intent is just "members of a specific HF Hub org" — and the org we want is ml-agent-explorers, the same join-org the WelcomeScreen already promotes for free HF inference credits. - HF_EMPLOYEE_ORG -> OPUS_ACCESS_ORG, default ml-agent-explorers - require_huggingface_org_member -> require_opus_access_org_member - _require_hf_for_anthropic -> _require_opus_org_for_anthropic - 403 copy now names the actual org and points at its Hub page Operators: set OPUS_ACCESS_ORG=huggingface on the Space if you want to keep the old staff-only behavior. Default unlocks Opus for anyone who joins ml-agent-explorers via the existing WelcomeScreen tile.
|
@claude please review this PR. Focus on correctness, security, LiteLLM/Bedrock routing impact, and whether it's safe to merge against current main. Keep it concise and prefer inline comments where it matters. |
|
Claude finished @akseljoonas's task in 1m 45s —— View job PR Review — Rename Opus gate to
|
Summary
The Opus access gate was named after HF staff (
HF_EMPLOYEE_ORG,require_huggingface_org_member,_require_hf_for_anthropic) and defaulted to thehuggingfaceorg, which reads as "Opus is an employee perk". The actual intent was just "members of a specific HF Hub org" — and the org we want isml-agent-explorers, which the WelcomeScreen already promotes to every visitor as the way to unlock free HF inference credits.This is a pure rename + default swap, no behavior change other than which org unlocks Opus.
HF_EMPLOYEE_ORG→OPUS_ACCESS_ORG, defaultml-agent-explorersrequire_huggingface_org_member→require_opus_access_org_member_require_hf_for_anthropic→_require_opus_org_for_anthropichuggingface.co/ml-agent-explorersDeployment note
Unset
HF_EMPLOYEE_ORGon the Space (it's no longer read). Optionally setOPUS_ACCESS_ORG=huggingfaceif you want the old staff-only behavior. With defaults, anyone who joinsml-agent-explorersvia the existing WelcomeScreen tile automatically unlocks Opus.Test plan
ml-agent-explorers→ can pick Opus, gets 1/day (free) or 20/day (Pro) per quotaml-agent-explorers→ picks Opus → 403 with new copy naming the orgOAUTH_CLIENT_IDunset) → still unrestrictedOPUS_ACCESS_ORG=huggingfaceenv override → only staff can pick Opus (old behavior)