In the DEV Community article "One model gateway across clouds: LiteLLM on Cloud Run and Azure with zero API keys," Miguel Moreno describes how agents on Google Cloud and Azure use a shared model catalogue. The original is at https://dev.to/gde/one-model-gateway-across-clouds-litellm-on-cloud-run-and-azure-with-zero-api-keys-3ma7.
Keep the caller's identity when traffic moves
One gateway runs on Cloud Run and the other runs on Azure Container Apps. Both can call Gemini through Vertex AI and models through Azure OpenAI. An agent presents a Microsoft Entra token to its local gateway. In Moreno's design, the gateway's custom authentication hook checks the token and the invocation role, then looks up the agent's team and permitted models. The two deployments share a token audience and a Cloud SQL Postgres database for agent records, model permissions and usage.
The gateways use their own workload identities on the provider side. Moreno describes federation in both directions for requests that cross clouds. The model request path therefore avoids distributing static provider API keys to agents. The gateway still needs a separate administration key, which the team keeps in its secret managers.
Test a shutdown and a refusal separately
Moreno reports switching off the Azure gateway and seeing the Azure agent's next answer arrive through the Google Cloud gateway. That exercise demonstrates a gateway outage in the proof of concept. A useful companion test would send a request for a model the caller cannot use and confirm that the client preserves the refusal. The same principle applies to rate limiting. A valid response that denies a request should end that attempt, even if a second gateway is reachable.
The shared database remains a dependency for both deployments. Rate counters live in a separate Redis instance on each side, so matching limits at the two gateways do not create a single global limit. Moreno also recommends giving one gateway responsibility for database migrations and pinning the LiteLLM image because the custom hook imports internal interfaces. Those details give a team concrete checks to run before treating the second deployment as its recovery path.