Skip to content

Commit 5aa3c3e

Browse files
committed
fix(web): update OpenRouter model ID and add x402 env to compose
OpenRouter dropped the date-suffixed model ID format — `anthropic/claude-haiku-4-5-20251001` → `anthropic/claude-haiku-4.5`. This caused 502s on the /api/query route. Also adds x402 environment variables to docker-compose.yml so payment gate works in production.
1 parent 026ee3d commit 5aa3c3e

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ X402_PRICE_CENTS=1
103103
X402_FACILITATOR_URL=https://x402.org/facilitator
104104

105105
# Custom query API
106-
QUERY_API_MODEL=anthropic/claude-haiku-4-5-20251001
106+
QUERY_API_MODEL=anthropic/claude-haiku-4.5
107107

108108
# Email digest
109109
RESEND_API_KEY=

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Optional config (all have sensible defaults in `config.ts`):
8888
- `GIT_PUSH_ENABLED` (true) — push report commits to remote (heartbeat daemon only)
8989
- `REPORTS_DIR` — override reports directory path (used by web container for Docker volume mount)
9090
- `DATA_DIR` (process.cwd()) — directory for subscriber data (web container uses Docker volume mount)
91-
- `QUERY_API_MODEL` (`anthropic/claude-haiku-4-5-20251001`) — model for custom query API via OpenRouter
91+
- `QUERY_API_MODEL` (`anthropic/claude-haiku-4.5`) — model for custom query API via OpenRouter
9292
- `RESEND_API_KEY` — Resend email API key (required for email digest)
9393
- `DIGEST_FROM_EMAIL` (`digest@solis.rectorspace.com`) — from address for digest emails
9494
- `DIGEST_UNSUBSCRIBE_SECRET` — HMAC key for stateless unsubscribe token verification

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ services:
1717
- DIGEST_FROM_EMAIL=${DIGEST_FROM_EMAIL}
1818
- DIGEST_UNSUBSCRIBE_SECRET=${DIGEST_UNSUBSCRIBE_SECRET}
1919
- DIGEST_API_SECRET=${DIGEST_API_SECRET}
20+
- ENABLE_X402=${ENABLE_X402}
21+
- X402_RECEIVER_ADDRESS=${X402_RECEIVER_ADDRESS}
22+
- X402_PRICE_CENTS=${X402_PRICE_CENTS}
2023
volumes:
2124
- /home/solis/solis/reports:/app/reports:ro
2225
- /home/solis/solis/data:/app/data:rw

packages/web/src/lib/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const webEnv = cleanEnv(process.env, {
88

99
// OpenRouter — custom query API
1010
OPENROUTER_API_KEY: str({ default: '' }),
11-
QUERY_API_MODEL: str({ default: 'anthropic/claude-haiku-4-5-20251001' }),
11+
QUERY_API_MODEL: str({ default: 'anthropic/claude-haiku-4.5' }),
1212

1313
// API rate limiting
1414
API_RATE_LIMIT: num({ default: 30 }),

0 commit comments

Comments
 (0)