Tip: Lock Claude Code to an Approved Model Set With enforceAvailableModels — and Patch the Env-Var Bypass
GitHub·medium signal
Use enforceAvailableModels to constrain which models Claude Code can run, but note that before v2.1.176 an alias model pick could still be redirected to a blocked model via ANTHROPIC_DEFAULT_*_MODEL environment variables. Upgrade to v2.1.176+ so the allowlist actually holds and /fast refuses to toggle into a disallowed model. This matters for teams enforcing cost or compliance policies on which models agents may invoke.