Coding Agents
Coding agents can generate frequent model and tool requests from development environments. Route those requests through AISIX when platform teams need governed access to upstream models, provider credentials, and MCP tools.
These guides cover coding tools that call AISIX from a local editor, CLI, remote development environment, or automation job.
Why Route Coding Agents Through AISIX
A common rollout is for a platform team to make AISIX the approved gateway for developer AI tools. Developers configure Codex, Claude Code, Cline, or another client with an AISIX proxy URL, caller API key, and custom model value instead of raw provider credentials. The custom model value is the AISIX model alias.
The coding agent keeps its normal workflow. AISIX enforces access, policy, and telemetry before forwarding model requests or MCP tool calls upstream.
This setup is useful when teams want to:
- keep provider credentials out of local editor and CLI configuration;
- authenticate each developer, project, automation job, or shared tool profile with a caller API key;
- use model aliases to control which upstream models each client can reach;
- apply budgets, rate limits, guardrails, and usage reporting to coding-agent traffic;
- change the upstream provider or model behind an alias without asking every developer to reconfigure their tool.
Sensitive Code and Credentials
Coding agents may send source code, configuration snippets, stack traces, or terminal output as part of a task. That context can contain API keys, customer data, personal information, or internal identifiers.
Because AISIX sits between the coding agent and the upstream model or MCP server, teams can inspect and control that traffic at the gateway layer. Use PII Detection and Redaction when sensitive values should be masked or blocked, and use Guardrails for broader request and response policy checks.
Choose a Client Guide
Start with the guide for the coding tool you want to route through AISIX:
| Client | Primary AISIX path | Guide |
|---|---|---|
| Codex | OpenAI Responses API | Codex |
| Claude Code | Anthropic Messages | Claude Code |
| Cline | OpenAI-compatible API | Cline |
Each guide assumes the AISIX gateway already has a model alias and caller API key for the route the client will use. In the client UI or config file, that alias may appear as a custom model, model ID, or model name. If you have not created those resources yet, start with Self-Hosted Quickstart, OpenAI SDK Quickstart, or Anthropic SDK Quickstart.
How Coding Agents Use AISIX
Coding agents usually connect to AISIX in one of two ways:
| Client path | AISIX route | Use when |
|---|---|---|
| Model requests | OpenAI-compatible routes for Chat Completions or Responses API, or Anthropic Messages | The agent should call models through an AISIX caller API key and model alias. |
| Tool requests | MCP Gateway at /mcp | The agent should discover and call upstream MCP tools through AISIX tool access control. |
Both paths use AISIX as the boundary between the coding tool and the upstream service. The tool keeps its native client shape, while AISIX owns the gateway-facing API key, model or tool authorization, traffic controls, guardrails, and observability.
For MCP-specific governance, see MCP Gateway Overview. For the available proxy API families, see Supported Endpoints.