VS Code Continue
Configure Continue, the open-source AI code assistant for VS Code, to use agentgateway deployed in Kubernetes.
Before you begin
3. Install the Continue extension in VS Code.Get the gateway URL
export INGRESS_GW_ADDRESS=$(kubectl get svc -n agentgateway-system agentgateway-proxy \
-o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "Gateway address: $INGRESS_GW_ADDRESS"export INGRESS_GW_ADDRESS=$(kubectl get svc -n agentgateway-system agentgateway-proxy \
-o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
echo "Gateway address: $INGRESS_GW_ADDRESS"After port-forwarding, the gateway is accessible at http://localhost:8080. Use localhost:8080 wherever the instructions reference $INGRESS_GW_ADDRESS.
kubectl port-forward -n agentgateway-system svc/agentgateway-proxy 8080:80Configure Continue
- Edit the
~/.continue/config.jsonfile to add your agentgateway endpoint. - Replace
<INGRESS_GW_ADDRESS>and<route-path>with your gateway address and the path from your HTTPRoute configuration.
{
"models": [
{
"title": "agentgateway (Kubernetes)",
"provider": "openai",
"model": "gpt-4o-mini",
"apiBase": "http://<INGRESS_GW_ADDRESS>/<route-path>",
"apiKey": "anything"
}
]
}Review the following table to understand this configuration.
| Field | Description |
|---|---|
title | Display name shown in the Continue model selector. |
provider | Set to openai for any OpenAI-compatible endpoint. |
model | The model name from your agentgateway backend configuration. |
apiBase | Your gateway address and the route path from your HTTPRoute. |
apiKey | A placeholder value if agentgateway has no authentication, or your gateway API key. |
Verify the connection
- Open the Continue sidebar in VS Code (
Cmd + Mon macOS,Ctrl + Mon Windows/Linux). - Select agentgateway (Kubernetes) from the model dropdown.
- Send a test message to confirm the connection.