AI gateways proxy requests between AI clients and LLM backends, enabling provider abstraction, cost control, compliance, and observability. The author explores using an AI gateway to route Claude Code requests to Mistral's Devstral model (EU-based, Apache 2.0) instead of Anthropic, motivated by data privacy concerns under the US Patriot Act. Bifrost is chosen as the gateway for being self-hosted, Go-based, and easy to start. A step-by-step walkthrough covers setting up Bifrost, configuring a Mistral provider, creating routing rules, and debugging a 422 API error caused by a mismatch in the `reasoning_effort` parameter. A workaround (`CLAUDE_CODE_DISABLE_THINKING=1`) is shared. The post also covers budget management features: daily token caps, model redirection when over budget, and fallback to a local llama-server instance when spending limits are exceeded.