Cline
Cline supports OpenAI-compatible providers with a custom base URL, API key, and model ID. Use that provider type when Cline should send model requests through AISIX.
In this guide, you will configure Cline to call the AISIX OpenAI-compatible proxy API with an AISIX caller API key. The Cline model ID will be an AISIX model alias.
Prerequisites
Before starting, prepare the following:
- Cline installed in your editor.
- A running AISIX gateway with the proxy listener available.
- An AISIX caller API key.
- A model alias the caller API key can access through the OpenAI-Compatible API.
Configure Cline
Open Cline settings and choose the OpenAI-compatible provider. Then set these values:
| Cline setting | AISIX value |
|---|---|
| API provider | OpenAI Compatible |
| Base URL | http://127.0.0.1:3000/v1 |
| API key | YOUR_CALLER_API_KEY |
| Model ID | gpt-4o-prod |
Use your actual AISIX proxy URL, caller API key, and model alias. The model ID Cline sends is the AISIX alias, not the upstream provider model ID.
Verify the Route
Use Cline's provider verification action to confirm the endpoint, key, and model alias. Then send a short prompt from Cline.
When the request succeeds, verify the following results:
- Cline prints a model response.
- AISIX records a successful
POST /v1/chat/completionsrequest for the selected model alias.
AISIX authenticates the caller API key, checks model access, resolves the model alias, applies configured policies, and dispatches to the upstream provider behind the alias.
If the request fails, check these items:
| Symptom | Check |
|---|---|
| Authentication fails | Confirm the API key in Cline is an AISIX caller API key. |
| Model is not found | Confirm the model ID in Cline is an AISIX model alias visible to that caller API key. |
| Cline reports route or payload errors | Confirm the selected model alias supports OpenAI-compatible chat requests. |
| Requests bypass AISIX | Confirm the Base URL points to the AISIX proxy API root and includes /v1. |
Add Gateway Policy
After Cline traffic reaches AISIX, apply the same controls you use for other OpenAI-compatible clients:
- Use Caller API Keys to isolate developers, teams, projects, or automation profiles.
- Use Rate Limits and Budgets to control high-volume coding-agent traffic.
- Use Guardrails when prompts or responses need content checks.
- Use Metrics and Logs to inspect request volume, latency, and status.
Next Steps
- OpenAI-Compatible API: review gateway-facing request behavior.
- Streaming: confirm streaming behavior if your Cline workflow depends on streamed output.
- Tool Calling: review OpenAI-compatible tool-call behavior through AISIX.