EngLedger AI Governance

AI Tools Setup Guide

Configure your AI tools to route through your personal access URL. This lets your organisation track usage and cost without changing how you work.

Your access URL was included in the email that linked you here. Use it wherever you see YOUR_ACCESS_URL below.
After making any configuration change, fully close and reopen your tool — most AI tools only read settings at startup.

Claude Code

CLI tool for interacting with Claude directly from the terminal.

Setup

Add ANTHROPIC_BASE_URL to the env block in your user-level settings file.

PlatformPath
Linux / macOS~/.claude/settings.json
Windows%USERPROFILE%\.claude\settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "YOUR_ACCESS_URL"
  }
}

If settings.json already has an "env" key, add ANTHROPIC_BASE_URL inside it. Create the file if it doesn't exist.

Undo

Remove the "ANTHROPIC_BASE_URL" line from the env block and save. Claude Code reverts to the default Anthropic endpoint.

Cursor

AI-native code editor (desktop app, fork of VS Code).

Setup

  1. Open Cursor settings (Ctrl+, / Cmd+,)
  2. Navigate to Cursor Settings > Models
  3. Enter your access URL in the OpenAI API Base URL field
  4. Save and restart Cursor
The settings UI evolves frequently. If the above doesn't match, look for any field labelled "base URL" or "API endpoint" under Models or AI settings.

Undo

Return to the same field and clear the value. Cursor reverts to the default endpoint.

Windsurf

AI-native code editor (desktop app) by Codeium.

Setup

  1. Open Windsurf and click the Cascade panel
  2. Click the model picker at the top of the chat
  3. Select Add custom model… or navigate to Settings > AI Providers
  4. Choose OpenAI-compatible as the provider type
  5. Enter your access URL as the base URL

Undo

Delete the custom provider entry. Windsurf reverts to its default model list.

Continue

Open-source AI coding assistant — VS Code and JetBrains extension. Config lives in a single JSON file.

PlatformPath
Linux / macOS~/.continue/config.json
Windows%USERPROFILE%\.continue\config.json

You can also open it from the Continue sidebar → gear icon → Open config.json.

Setup

Add or update a model entry with apiBase:

{
  "models": [
    {
      "title": "EngLedger",
      "provider": "openai",
      "model": "gpt-4o",
      "apiBase": "YOUR_ACCESS_URL",
      "apiKey": "YOUR_API_KEY"
    }
  ]
}

Continue reloads config automatically on save — no restart needed.

Undo

Remove the apiBase line, or delete the entry and restore your original provider.

Cline / Roo Code

AI coding agents — VS Code extensions. Roo Code is a fork of Cline. Both share the same configuration approach.

Setup

  1. Open the Cline or Roo Code panel in VS Code
  2. Click the settings / gear icon
  3. Set API Provider to OpenAI Compatible
  4. Enter your access URL in the Base URL field
  5. Enter your API key and save

Undo

Change API Provider back to your original provider (e.g. Anthropic, OpenAI), which will clear the custom base URL field.

Zed

Lightweight code editor (desktop app) with a built-in AI assistant.

Setup

Open ~/.config/zed/settings.json and add or update the assistant block:

{
  "assistant": {
    "version": "2",
    "default_model": {
      "provider": "openai",
      "model": "gpt-4o"
    },
    "openai_api_url": "YOUR_ACCESS_URL"
  }
}

Save the file. Zed picks up the change immediately.

Undo

Remove the openai_api_url line. Zed reverts to https://api.openai.com/v1.

Aider

AI pair programming tool for the terminal.

Setup — environment variable (recommended)

Linux / macOS — add to ~/.bashrc or ~/.zshrc:

export OPENAI_BASE_URL=YOUR_ACCESS_URL

Then reload:

source ~/.bashrc

Windows (PowerShell) — add to $PROFILE:

$env:OPENAI_BASE_URL = "YOUR_ACCESS_URL"

Setup — CLI flag (one-off)

aider --openai-api-base YOUR_ACCESS_URL

Undo

unset OPENAI_BASE_URL                   # Linux / macOS
Remove-Item Env:OPENAI_BASE_URL         # Windows PowerShell

Codex CLI

OpenAI's open-source AI coding agent for the terminal. Two things need to be configured: the base URL so requests route through EngLedger, and API key auth so Codex doesn't prompt you to log in via browser.

Step 1 — set the base URL

Add openai_base_url to your Codex config file:

PlatformPath
Linux / macOS~/.codex/config.toml
Windows%USERPROFILE%\.codex\config.toml
openai_base_url = "YOUR_ACCESS_URL"

Create the file if it doesn't exist.

Step 2 — configure API key auth

Codex needs to know to use an API key rather than its default browser login flow. Create or edit ~/.codex/auth.json and set auth_mode to apikey along with your key:

{
  "auth_mode": "apikey",
  "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY"
}

Replace YOUR_OPENAI_API_KEY with your actual OpenAI API key from platform.openai.com/api-keys. If the file already exists, merge these fields in — don't replace the whole file if it contains other entries you need.

Treat ~/.codex/auth.json like a password file. Don't commit it, share it, or paste it into tickets.

Undo

Remove the openai_base_url line from ~/.codex/config.toml. To revert auth, delete ~/.codex/auth.json (or remove the fields you added) and run codex login to go through the normal login flow.

OpenAI SDK (Python)

The official OpenAI Python library, also used by many frameworks (LangChain, LlamaIndex, etc.).

Setup

from openai import OpenAI

client = OpenAI(
    base_url="YOUR_ACCESS_URL/v1",
    api_key="YOUR_API_KEY",
)

Undo

Remove base_url. The client defaults to https://api.openai.com/v1.

OpenAI SDK (Node / TypeScript)

The official OpenAI Node.js library, also used by many frameworks and backend services.

Setup

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "YOUR_ACCESS_URL/v1",
  apiKey: process.env.OPENAI_API_KEY,
});

Undo

Remove baseURL. The client defaults to https://api.openai.com/v1.

Environment variable (catch-all)

Not using a tool listed above? Most OpenAI-compatible tools respect OPENAI_BASE_URL automatically — setting it once covers them without any other config change.

Linux / macOS:

export OPENAI_BASE_URL=YOUR_ACCESS_URL

Add to ~/.bashrc or ~/.zshrc for persistence.

Windows (PowerShell):

$env:OPENAI_BASE_URL = "YOUR_ACCESS_URL"

Add to $PROFILE for persistence.

Undo

unset OPENAI_BASE_URL                   # Linux / macOS
Remove-Item Env:OPENAI_BASE_URL         # Windows PowerShell