Choose by protocol, not by model brand
The local port depends on what language the client speaks. If the tool expects an OpenAI-compatible API, point it to localhost:3000. If the tool expects an Anthropic-compatible API, point it to localhost:8000.
OpenAI SDK · Codex-style tools→localhost:3000
OpenAI-compatible endpoint→selected upstream API
Claude Code→localhost:8000
Anthropic adapter→selected upstream API
OpenAI language goes to 3000. Anthropic language goes to 8000. The upstream model can still be OpenAI, Claude, DeepSeek, Qwen or another provider, depending on the local service configuration.
Use localhost:3000 for OpenAI-compatible clients
This route is for Codex, CCSwitch and tools that ask for an OpenAI base URL, OpenAI API key, or an OpenAI-compatible endpoint. AGG now keeps the full step-by-step setup on a dedicated page with the downloadable Windows/Mac kit.
Codex + CCSwitch + DeepSeek
Run the Windows executable, open localhost:3000, add a DeepSeek channel, then point CCSwitch Codex to http://localhost:3000/v1.
Open localhost:3000 guideUse localhost:8000 for Anthropic-compatible clients
Claude Code speaks Anthropic-style requests. The localhost:8000 route uses claude-api-proxy to translate those requests to an OpenAI-compatible upstream. AGG keeps this as a separate route because the setup, health checks and failure modes are different from CCSwitch.
Claude Code + claude-api-proxy
Start the proxy, add an OpenAI provider, set ANTHROPIC_BASE_URL, then verify /api/server and /api/providers.
Open localhost:8000 guideDo not swap the ports
Claude Code uses 8000 unless your 3000 service explicitly supports Anthropic protocol.
Claude Code should not be pointed directly at localhost:3000 unless that service explicitly speaks the Anthropic protocol. OpenAI-style clients should not use localhost:8000 unless they have an Anthropic-compatible mode.
Verify the correct route before using it
First check the port that matches your client. Then send one small request and confirm the intended upstream provider recorded the usage.
Invoke-WebRequest http://localhost:8000/api/server
Invoke-WebRequest http://localhost:8000/api/providersInvoke-WebRequest http://localhost:3000Route check
Paste the non-secret response. Remove tokens, account IDs and full keys first.