Proxy AI CLI tools through AI Gateway
AI Gateway can proxy requests from AI command-line tools to LLM providers. This gives you centralized control over AI traffic: log all requests, track costs across teams, enforce rate limits, or apply security policies and guardrails.
Supported AI CLI tools:
- Claude Code: Anthropic, OpenAI, Azure OpenAI, Google Gemini, AWS Bedrock, and Alibaba Cloud (DashScope)
- Codex CLI: OpenAI
- Qwen Code CLI: OpenAI and Alibaba Cloud (DashScope)
Current limitations:
- Load balancing or failover features currently only work if all providers share the same model identifier.
- Streaming is not supported when using non-Claude models with the following providers: Azure OpenAI, Google Gemini, and AWS Bedrock. Token usage might be reported as 0, but otherwise functionality is not affected.
Claude Code
Claude Code is Anthropic’s command-line tool that delegates coding tasks to Claude AI. Route Claude Code requests through AI Gateway to monitor usage, control costs, and enforce rate limits across your development team.
Codex CLI
Codex CLI is OpenAI’s command-line tool for code generation and assistance. Proxy Codex CLI requests through AI Gateway to gain visibility into API usage, implement rate limiting, and centralize credential management.
Qwen Code CLI
Qwen Code CLI is an AI-powered coding assistant that uses OpenAI-compatible endpoints. Proxy Qwen Code CLI requests through Kong AI Gateway to gain visibility into API usage, implement rate limiting, and centralize credential management.