Skip to content
Coding clients

Coding clients

This page configures coding clients to call ai-gateway for chat, edits, and FIM autocomplete on this deployment. To hand off background tasks to Maku from your coding agent (maku setup <client> and the /maku MCP tools), see Maku’s Terminal and coding agent guide and CLI reference.

Support matrix

ClientModels through ai-gatewayMaku hand-offs
OpenCodeYes: opencode.json provider blockmaku setup opencode
Claude CodeNo: speaks the Anthropic Messages API onlymaku setup claude
Codex CLINot yet: speaks only the Responses APImaku setup codex
CursorNot verifiedmaku setup cursor
Gemini CLINo custom endpoint documentedmaku setup gemini
Copilot CLIYes: custom OpenAI-compatible providermaku setup copilot
VS Code + ContinueYes: chat and FIMnot applicable
OpenWebUIYes: in-cluster, on AWS onlynot applicable

ai-gateway speaks the OpenAI chat-completions API; see AI Gateway.

Endpoints per cloud

Both endpoints are Tailscale-fronted (tag:k8s ACL, see Private Access) and serve the OpenAI API under /v1. Example (the reference host), one cluster per cloud:

ClusterBase URLServes
aws-0https://llm.priv.aws.ogenki.io/v1tier-frontier always; the four xplane-* models and MoM once llm-platform is resumed
gcp-0https://llm.priv.gcp.ogenki.io/v1tier-frontier (GLM through Z.ai, no GPU needed); xplane-qwen3-8b and MoM once llm-platform is resumed

llm-platform is suspended by default on both clouds; resuming GPU models requires the opt-in gates. tier-frontier needs none of them.

Authentication

Clients send Authorization: Bearer <key>. An Envoy Gateway SecurityPolicy (infrastructure/base/envoy-ai-gateway/security-policy.yaml) compares it with Secret ai-gateway-api-keys in envoy-ai-gateway-system. Read a key into an environment variable and never paste it into a config file.

AWSGCP
SourceAWS Secrets Manager entry platform-llm-api-keysGenerated in-cluster by External Secrets Password generators (refreshPolicy: CreatedOnce)
Identitiesopenwebui_apikey, promptfoo_apikeyopenwebui, promptfoo

On AWS:

export OPENAI_API_KEY=$(aws secretsmanager get-secret-value \
  --secret-id platform-llm-api-keys \
  --query SecretString --output text | jq -r .openwebui_apikey)

On GCP:

export OPENAI_API_KEY=$(kubectl get secret -n envoy-ai-gateway-system ai-gateway-api-keys \
  -o jsonpath='{.data.openwebui}' | base64 -d)

To onboard another identity, add a key in infrastructure/base/envoy-ai-gateway/api-keys-externalsecret.yaml (AWS) or infrastructure/gcp-0/envoy-ai-gateway/password-generators.yaml and api-keys-patch.yaml (GCP). Daily token budgets are counted in shadow mode (ADR-0050).

Models exposed

Model IDBacked byAWSGCPPurpose
tier-frontierGLM through Z.aiyesyesFrontier model on CPU only; works with llm-platform suspended
MoMSemantic Routerwith llm-platformwith llm-platformClassifies the prompt and picks an xplane-* model
xplane-qwen-coderQwen2.5-Coder-7B-InstructyesnoCode chat, edits, function calling; 10% canary onto xplane-qwen-coder-sql-dpo
xplane-qwen-coder-fimQwen2.5-Coder-1.5ByesnoFIM tab completion
xplane-qwen3-8bQwen3-8ByesyesMultilingual, math, longer context (32k)
xplane-llamaguard3-1bLlama-Guard-3-1ByesnoReachable only by name
xplane-qwen-coder-sql-dpo, xplane-qwen-coder-securecodeLoRA adapters on xplane-qwen-coderyesnoNaming one always gets the adapter

OpenCode

Put the provider block in ~/.config/opencode/opencode.json or an opencode.json at the project root (https://opencode.ai/docs/providers/):

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "ogenki-aws": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Ogenki AI Gateway (aws-0)",
      "options": {
        "baseURL": "https://llm.priv.aws.ogenki.io/v1",
        "apiKey": "{env:OPENAI_API_KEY}"
      },
      "models": {
        "xplane-qwen-coder": { "name": "Qwen Coder 7B" },
        "tier-frontier": { "name": "GLM (frontier)" }
      }
    }
  },
  "model": "ogenki-aws/xplane-qwen-coder"
}

On GCP, use that cluster’s base URL and tier-frontier or xplane-qwen3-8b.

Claude Code & Codex CLI

  • Claude Code: speaks the Anthropic Messages API (/v1/messages) only, while ai-gateway serves the OpenAI API (Status). Maku hand-offs work via maku setup claude.
  • Codex CLI: requires wire_api = "responses", not yet enabled on ai-gateway. Maku hand-offs work via maku setup codex.

Cursor, Gemini CLI and Copilot CLI

  • Cursor / Gemini CLI: no custom OpenAI base URL override documented; use maku setup cursor or maku setup gemini for Maku hand-offs.
  • Copilot CLI: generate ~/.copilot/providers.json (BYOK docs):
umask 077 && mkdir -p ~/.copilot && jq -n --arg key "$OPENAI_API_KEY" '{
  providers: [{name: "ogenki", type: "openai",
               baseUrl: "https://llm.priv.aws.ogenki.io/v1", apiKey: $key}],
  models: [{id: "xplane-qwen-coder", provider: "ogenki"}]
}' > ~/.copilot/providers.json
copilot --model ogenki/xplane-qwen-coder

VS Code and Continue

In ~/.continue/config.yaml (reference):

name: Ogenki platform
version: 0.0.1
schema: v1

models:
  - name: Qwen Coder (chat / agentic)
    provider: openai
    model: xplane-qwen-coder
    apiBase: https://llm.priv.aws.ogenki.io/v1
    apiKey: ${{ secrets.OPENAI_API_KEY }}
    roles: [chat, edit, apply]
    defaultCompletionOptions:
      maxTokens: 2048
      temperature: 0.2

  - name: Qwen Coder FIM (autocomplete)
    provider: openai
    model: xplane-qwen-coder-fim
    apiBase: https://llm.priv.aws.ogenki.io/v1
    apiKey: ${{ secrets.OPENAI_API_KEY }}
    useLegacyCompletionsEndpoint: true
    roles: [autocomplete]
    defaultCompletionOptions:
      maxTokens: 256
      temperature: 0.0

Continue selects the Qwen FIM template from xplane-qwen-coder-fim and calls /v1/completions.

OpenWebUI

https://chat.priv.aws.ogenki.io (Tailscale, tag:k8s ACL) runs on AWS in llm-platform, defaulting to xplane-qwen3-8b. Sending MoM lets the Semantic Router choose the model and sets x-vsr-selected-model on the response (Autoscaling & GPUs).

Verifying the connection

BASE=https://llm.priv.gcp.ogenki.io/v1   # or https://llm.priv.aws.ogenki.io/v1

curl -sS "$BASE/models" -H "Authorization: Bearer $OPENAI_API_KEY" | jq '.data[].id'

curl -sS "$BASE/chat/completions" \
  -H "Authorization: Bearer $OPENAI_API_KEY" -H 'Content-Type: application/json' \
  -d '{"model": "tier-frontier", "messages": [{"role": "user", "content": "Say hi"}]}'