Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/smoke-codex.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion containers/api-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Node.js-based API proxy that keeps LLM API credentials isolated from the agent c

```
Agent Container (172.30.0.20)
↓ HTTP request to api-proxy:10000
↓ HTTP request to 172.30.0.30:10000
API Proxy Sidecar (172.30.0.30)
↓ Injects Authorization header
↓ Routes via HTTP_PROXY (172.30.0.10:3128)
Expand Down
16 changes: 8 additions & 8 deletions docs/api-proxy-sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ When enabled, the API proxy sidecar:
│ │ │ Agent Container │ │
│ │ │ 172.30.0.20 │ │
│ │ │ OPENAI_BASE_URL= │ │
│ │ │ http://api-proxy:10000 │────┘
│ │ │ http://172.30.0.30:10000 │────┘
│ │ │ ANTHROPIC_BASE_URL= │
│ │ │ http://api-proxy:10001
│ │ │ http://172.30.0.30:10001 │
│ │ └──────────────────────────────┘
│ │
└─────────┼─────────────────────────────────────┘
Expand All @@ -38,7 +38,7 @@ When enabled, the API proxy sidecar:
```

**Traffic Flow:**
1. Agent makes request to `api-proxy:10000` or `api-proxy:10001`
1. Agent makes request to `172.30.0.30:10000` or `172.30.0.30:10001`
2. API proxy injects authentication headers
3. API proxy routes through Squid via HTTP_PROXY/HTTPS_PROXY
4. Squid enforces domain whitelist (only allowed domains pass)
Expand Down Expand Up @@ -82,7 +82,7 @@ awf --enable-api-proxy \
-- npx @openai/codex -p "write a hello world function"
```

The agent container will automatically use `http://api-proxy:10000` as the base URL.
The agent container will automatically use `http://172.30.0.30:10000` as the base URL.

### Claude Code Example

Expand All @@ -94,7 +94,7 @@ awf --enable-api-proxy \
-- claude-code "write a hello world function"
```

The agent container will automatically use `http://api-proxy:10001` as the base URL.
The agent container will automatically use `http://172.30.0.30:10001` as the base URL.

### Both Providers

Expand All @@ -113,8 +113,8 @@ When API keys are provided, the sidecar sets these environment variables in the

| Variable | Value | When Set | Description |
|----------|-------|----------|-------------|
| `OPENAI_BASE_URL` | `http://api-proxy:10000` | When `OPENAI_API_KEY` is provided | OpenAI API proxy endpoint |
| `ANTHROPIC_BASE_URL` | `http://api-proxy:10001` | When `ANTHROPIC_API_KEY` is provided | Anthropic API proxy endpoint |
| `OPENAI_BASE_URL` | `http://172.30.0.30:10000` | When `OPENAI_API_KEY` is provided | OpenAI API proxy endpoint |
| `ANTHROPIC_BASE_URL` | `http://172.30.0.30:10001` | When `ANTHROPIC_API_KEY` is provided | Anthropic API proxy endpoint |

These are standard environment variables recognized by:
- OpenAI Python SDK
Expand Down Expand Up @@ -164,7 +164,7 @@ When API keys are present (or `--enable-api-proxy` is explicitly set):

```
Agent Code
↓ (makes HTTP request to api-proxy:10000)
↓ (makes HTTP request to 172.30.0.30:10000)
Node.js API Proxy
↓ (injects Authorization: Bearer $OPENAI_API_KEY)
↓ (routes via HTTP_PROXY to Squid)
Expand Down