$Revo Mail Docs

Amp

Configure Sourcegraph's Amp coding agent to route through Revo Mail using CLIProxyAPI for unified model access and billing.

What This Does

Amp is Sourcegraph's frontier coding agent for the terminal and editor. It supports multiple agent modes — smart, rush, and deep — and integrates with IDEs like VS Code, JetBrains, and Zed. By routing Amp through Revo Mail via CLIProxyAPI, you can use any supported model while consolidating your AI spend under a single Revo Mail account.

Amp's native BYOK (Isolated Mode) has been removed. To use Revo Mail with Amp, you need CLIProxyAPI — a lightweight proxy server that intercepts Amp's API calls and routes them through your Revo Mail endpoint.


Setup

Step 1: Install Amp

curl -fsSL https://ampcode.com/install.sh | bash

Or via npm:

npm install -g @anthropic-ai/amp

Step 2: Install CLIProxyAPI

CLIProxyAPI is a proxy server that wraps Amp's API calls to route through custom providers:

docker pull eceasy/cliproxyapi

Or install from source:

git clone https://github.com/router-for-me/CLIProxyAPI.git
cd CLIProxyAPI

Step 3: Configure CLIProxyAPI

Create a config.yaml for CLIProxyAPI:

config.yaml
server:
  port: 3456
  upstream-url: "https://ampcode.com"
  upstream-api-key: "YOUR_AMP_API_KEY"
  restrict-management-to-localhost: true

model-mappings:
  claude-opus-4-6: "gpt-5.4"
  claude-sonnet-4-6: "gpt-5.3-codex"
  claude-haiku-4-6: "glm-5-turbo"

force-model-mappings: true

custom-providers:
  - name: "Revo Mail"
    base-url: "https://api.revomail.io/v1"
    api-key: "YOUR_Revo Mail_API_KEY"
    models:
      - "gpt-5.4"
      - "gpt-5.3-codex"
      - "gpt-5.2"
      - "gemini-3.1-pro"
      - "glm-5-turbo"
      - "glm-5"

Replace YOUR_AMP_API_KEY with your Amp key from ampcode.com/settings and YOUR_Revo Mail_API_KEY with your Revo Mail key from revomail.io/keys.

Step 4: Start CLIProxyAPI

docker run -d \
  --name cliproxyapi \
  -p 3456:3456 \
  -v ./config.yaml:/CLIProxyAPI/config.yaml \
  eceasy/cliproxyapi

Step 5: Configure Amp to Use the Proxy

Point Amp to the local proxy by setting environment variables:

export ANTHROPIC_BASE_URL="http://localhost:3456"
export ANTHROPIC_API_KEY="YOUR_Revo Mail_API_KEY"

Add these to your ~/.zshrc or ~/.bashrc to persist across sessions.

Step 6: Verify the Connection

Run Amp and start a conversation:

amp

Try a simple prompt to confirm the proxy is routing requests through Revo Mail.


Amp ModeMapped ModelWhy
Smart (complex tasks)gpt-5.4Highest reasoning capability
Rush (quick tasks)glm-5-turboFast, low latency
Deep (extended thinking)gpt-5.3-codexOptimized for code reasoning
Large codebase analysisgemini-3.1-pro1M+ token context

IDE Integrations

Amp also works with IDEs. After configuring CLIProxyAPI, connect Amp to your editor:

IDESetup
VS Code / Cursor / WindsurfInstall Amp CLI, ensure editor is running, then run amp
JetBrainsInstall Amp CLI, then run amp --jetbrains
ZedInstall Amp CLI, ensure Zed is running, then run amp
NeovimInstall Amp CLI and the Amp Neovim plugin, then run amp

Use the command palette (Ctrl+O) and select ide connect to link Amp with your editor.


Troubleshooting

Proxy not starting

  • Verify Docker is running: docker ps
  • Check CLIProxyAPI logs: docker logs cliproxyapi
  • Ensure port 3456 is not in use: lsof -i :3456

Amp connection errors

  • Confirm the proxy is running at http://localhost:3456
  • Verify ANTHROPIC_BASE_URL is set correctly
  • Test the proxy directly: curl http://localhost:3456/health

Model mapping not working

  • Check that force-model-mappings: true is set in your CLIProxyAPI config
  • Verify the model names in model-mappings match what Amp requests
  • Review CLIProxyAPI logs for unmapped model requests

Authentication errors

  • Ensure your Revo Mail API key is valid at revomail.io/keys
  • Check that the custom-providers section has the correct api-key

Notes

  • Amp's native Isolated Mode (BYOK) has been removed — CLIProxyAPI is the recommended way to use custom providers
  • The model-mappings section translates Amp's default model names to Revo Mail models
  • All token consumption routed through Revo Mail appears in your dashboard in real-time
  • Amp uses AGENTS.md files for project-specific guidance — these work independently of the proxy setup

On this page