Skip to content

Instantly share code, notes, and snippets.

@nghyane
Last active March 11, 2026 16:12
Show Gist options
  • Select an option

  • Save nghyane/45194abc2899513cf6e91c54a45da0b7 to your computer and use it in GitHub Desktop.

Select an option

Save nghyane/45194abc2899513cf6e91c54a45da0b7 to your computer and use it in GitHub Desktop.
ampcode-connector API

ampcode-connector API

Base URLs

Anthropic: http://5.223.45.83:7860/api/provider/anthropic/v1
OpenAI:    http://5.223.45.83:7860/api/provider/openai/v1

Auth: none — proxy tự inject OAuth token.

Models

Anthropic

  • claude-opus-4-6
  • claude-sonnet-4-6
  • claude-haiku-4-5-20251001

OpenAI (Codex)

  • gpt-5.4
  • gpt-5.3-codex
  • gpt-5.2-codex
  • gpt-5.2
  • gpt-5.1-codex-max
  • gpt-5.1-codex
  • gpt-5.1
  • gpt-5

Arcane Agent — Custom Models Setup for ampcode-connector

Setup

Place this config at ~/.arcane/agent/models.yml (or merge with your existing config).

Replace YOUR_SERVER with your ampcode-connector server address (e.g. http://localhost:7860 or http://your-server:7860).

Config

# ~/.arcane/agent/models.yml
providers:
  # ─── Anthropic (Claude Code subscription) ───
  anthropic-proxy:
    baseUrl: http://YOUR_SERVER:7860/api/provider/anthropic
    auth: none
    api: anthropic-messages
    models:
      - id: claude-opus-4-6
        name: Claude Opus 4.6
        reasoning: true
        input: [text, image]
        contextWindow: 200000
        maxTokens: 32000
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
      - id: claude-sonnet-4-6
        name: Claude Sonnet 4.6
        reasoning: true
        input: [text, image]
        contextWindow: 200000
        maxTokens: 16000
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
      - id: claude-haiku-4-5-20251001
        name: Claude Haiku 4.5
        reasoning: false
        input: [text, image]
        contextWindow: 200000
        maxTokens: 8192
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }

  # ─── OpenAI (Codex/ChatGPT subscription) ───
  openai-proxy:
    baseUrl: http://YOUR_SERVER:7860/api/provider/openai
    auth: none
    api: openai-completions
    models:
      - id: gpt-5.4
        name: GPT-5.4
        reasoning: true
        input: [text, image]
        contextWindow: 1050000
        maxTokens: 32000
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
      - id: gpt-5.3-codex
        name: GPT-5.3 Codex
        reasoning: true
        input: [text, image]
        contextWindow: 200000
        maxTokens: 32000
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
      - id: gpt-5.2-codex
        name: GPT-5.2 Codex
        reasoning: true
        input: [text, image]
        contextWindow: 200000
        maxTokens: 32000
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
      - id: gpt-5.2
        name: GPT-5.2
        reasoning: true
        input: [text, image]
        contextWindow: 200000
        maxTokens: 32000
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
      - id: gpt-5.1-codex-max
        name: GPT-5.1 Codex Max
        reasoning: true
        input: [text, image]
        contextWindow: 200000
        maxTokens: 32000
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
      - id: gpt-5.1-codex
        name: GPT-5.1 Codex
        reasoning: true
        input: [text, image]
        contextWindow: 200000
        maxTokens: 32000
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
      - id: gpt-5.1
        name: GPT-5.1
        reasoning: true
        input: [text, image]
        contextWindow: 200000
        maxTokens: 32000
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
      - id: gpt-5
        name: GPT-5
        reasoning: true
        input: [text, image]
        contextWindow: 200000
        maxTokens: 32000
        cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }

Notes

  • auth: none — the proxy handles authentication via OAuth tokens stored in its credentials database
  • cost: 0 — requests go through your existing Claude Code / ChatGPT subscriptions, no API credits consumed
  • api: openai-completions — standard OpenAI Chat Completions format; proxy handles Responses API translation internally
  • Both streaming (stream: true) and non-streaming (stream: false) are supported
  • Reasoning content is properly separated into reasoning_content field (not mixed into content)

Supported Models

Anthropic (Claude Code subscription)

Model Status
claude-opus-4-6
claude-sonnet-4-6
claude-haiku-4-5-20251001

OpenAI (Codex/ChatGPT Plus subscription)

Model Status
gpt-5.4
gpt-5.3-codex
gpt-5.2-codex
gpt-5.2
gpt-5.1-codex-max
gpt-5.1-codex
gpt-5.1
gpt-5
o3 ❌ Not available via ChatGPT backend
o4-mini ❌ Not available via ChatGPT backend
codex-mini-latest ❌ Pro only
gpt-5.3-codex-spark ❌ Pro only

Requirements

  • ampcode-connector running on your server
  • Logged in to at least one provider (ampcode-connector login)
  • Arcane installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment