Use it
Connect your tools
Setup for Codex CLI, Claude Code, opencode, Continue, Open WebUI, the OpenAI and Anthropic SDKs, LiteLLM and curl on a room.
Every recipe assumes the bridge is running on the same computer. See Serve API to start it. The base URLs are:
- OpenAI:
http://127.0.0.1:8080/v1(Codex, opencode, Continue, Open WebUI, LiteLLM, theopenaiSDK) - Anthropic:
http://127.0.0.1:8080, no/v1(Claude Code, theanthropicSDK)
model can be any string. Any API key works, unless you started the bridge with a token; then use the token as the key.
Context settings for coding agents
Section titled “Context settings for coding agents”Codex, Claude Code and opencode don’t know how big a model called pooled is. Without the room’s context they never compact, and the room refuses the first prompt that is too long. The bridge prints the right settings for your room once its model is ready. GET /health returns the context as ctx.
| Room | Context | Codex compact limit | Claude Code output | opencode output |
|---|---|---|---|---|
| Qwen3 1.7B | 16384 | 13107 | 4096 | 4096 |
| Qwen3 1.7B, room short of memory for 16K | 8192 | 6553 | 2048 | 2048 |
| Qwen3.8 27B | 16384 | 13107 | 4096 | 4096 |
Qwen3.8 27B, ?ctx=32768 |
32768 | 26214 | 8192 | 8192 |
| Qwen3.6 35B MoE | 32768 | 26214 | 8192 | 8192 |
Qwen3.6 35B MoE, ?ctx=65536 |
65536 | 52428 | 16384 | 8192 |
The host sets the context with ?ctx= on the room page before starting the model. Use the MoE or the 27B at 32K for agents. The 1.7B is too small.
Codex CLI
Section titled “Codex CLI”Add a provider to ~/.codex/config.toml, with the numbers from the banner (this is a 32K room):
model = "pooled"model_provider = "pooled"model_context_window = 32768 # the room's contextmodel_auto_compact_token_limit = 26214 # 0.8 of it
[model_providers.pooled]name = "Pooled"base_url = "http://127.0.0.1:8080/v1"wire_api = "responses"Then run codex in your project.
model = "gpt-5-codex"instead silences the “model metadata not found” warning. Codex then sendsapply_patchas a custom tool, which works too.- Codex gives up on a stream silent for 5 minutes. The bridge sends an event every 10 s while it waits, but on a very slow room add
stream_idle_timeout_ms = 900000to the provider. - With a token, add
env_key = "POOLED_TOKEN"to the provider and exportPOOLED_TOKEN. - Codex always sends a
web_searchtool. The bridge skips it with one warning.
Claude Code
Section titled “Claude Code”Run this in your project (the banner prints it with your room’s numbers):
ANTHROPIC_BASE_URL=http://127.0.0.1:8080 ANTHROPIC_API_KEY=pooled \ CLAUDE_CODE_MAX_CONTEXT_TOKENS=32768 CLAUDE_CODE_MAX_OUTPUT_TOKENS=8192 \ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 claude --model pooledCLAUDE_CODE_MAX_CONTEXT_TOKENSis the room’s context, so Claude Code compacts in time.CLAUDE_CODE_MAX_OUTPUT_TOKENSis a quarter of the context. Without it, Claude Code says “Prompt is too long” before sending anything on a room under about 32K.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1stops side requests, such as titles, from queuing between the agent’s steps.
MCP servers work (up to 1024 tools). Anthropic’s own server tools, like web search, are skipped.
opencode
Section titled “opencode”The banner prints an opencode.json for your room. Save it in your project, or in ~/.config/opencode/opencode.json. For a 32K MoE room:
{ "$schema": "https://opencode.ai/config.json", "provider": { "pooled": { "npm": "@ai-sdk/openai-compatible", "name": "Pooled room", "options": { "baseURL": "http://127.0.0.1:8080/v1", "apiKey": "x" }, "models": { "pooled/qwen3.6-35b-moe": { "name": "Qwen3.6 35B MoE · Q4", "tool_call": true, "limit": { "context": 32768, "output": 8192 } } } } }, "model": "pooled/pooled/qwen3.6-35b-moe"}Then run OPENCODE_DISABLE_CLAUDE_CODE=1 opencode. That variable stops opencode from loading ~/.claude/CLAUDE.md and your skills into every prompt. Pass --title to opencode run, or set a small_model, to skip its title request.
Continue
Section titled “Continue”In ~/.continue/config.yaml, then pick Pooled room in Continue’s model menu:
models: - name: Pooled room provider: openai model: pooled apiBase: http://127.0.0.1:8080/v1 apiKey: pooled roles: [chat, edit]The key must not be empty. Leave autocomplete to a local model: a room is too slow for completions as you type.
Open WebUI
Section titled “Open WebUI”Open WebUI also uses port 8080, so start the bridge on another port:
npx @pooled/cli serve 4TKG9P --port 8081In Open WebUI, add a connection under Settings → Connections → OpenAI API: URL http://127.0.0.1:8081/v1, any key. The room’s model shows as pooled/<model>.
The bridge only answers on 127.0.0.1, so Open WebUI in Docker can’t reach it. Run Open WebUI on the host, or its container with --network=host.
OpenAI and Anthropic SDKs
Section titled “OpenAI and Anthropic SDKs”Change the base URL and nothing else:
from openai import OpenAIclient = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="pooled")
from anthropic import Anthropicclient = Anthropic(base_url="http://127.0.0.1:8080", api_key="pooled")The SDKs also read OPENAI_BASE_URL / OPENAI_API_KEY and ANTHROPIC_BASE_URL / ANTHROPIC_API_KEY, so existing code runs unchanged. Tools, streaming, JSON output and the Responses API all work. See Tool calling.
LiteLLM
Section titled “LiteLLM”model_list: - model_name: pooled litellm_params: model: openai/pooled api_base: http://127.0.0.1:8080/v1 api_key: pooledRun the proxy on the same computer as the bridge. If others use your proxy, their prompts go to the room too.
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/v1/chat/completions -H 'content-type: application/json' \ -d '{"model": "pooled", "messages": [{"role": "user", "content": "Hi"}], "stream": true}'
curl http://127.0.0.1:8080/v1/messages -H 'content-type: application/json' -H 'anthropic-version: 2023-06-01' \ -d '{"model": "pooled", "max_tokens": 200, "messages": [{"role": "user", "content": "Hi"}]}'With a token, add -H "Authorization: Bearer $POOLED_TOKEN". Status codes are on HTTP endpoints.