Skip to main content

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 settingAISIX value
API providerOpenAI Compatible
Base URLhttp://127.0.0.1:3000/v1
API keyYOUR_CALLER_API_KEY
Model IDgpt-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/completions request 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:

SymptomCheck
Authentication failsConfirm the API key in Cline is an AISIX caller API key.
Model is not foundConfirm the model ID in Cline is an AISIX model alias visible to that caller API key.
Cline reports route or payload errorsConfirm the selected model alias supports OpenAI-compatible chat requests.
Requests bypass AISIXConfirm 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:

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.
API7.ai Logo

The digital world is connected by APIs,
API7.ai exists to make APIs more efficient, reliable, and secure.

Sign up for API7 newsletter

Product

API7 Gateway

SOC2 Type IIISO 27001HIPAAGDPRRed Herring

Copyright © APISEVEN PTE. LTD 2019 – 2026. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the Apache Software Foundation