From 3a4e04471120d01006477bf5b0764879460adc18 Mon Sep 17 00:00:00 2001 From: RECTOR Date: Tue, 2 Jun 2026 08:34:55 +0700 Subject: [PATCH] cleanup(env): drop dead SIPHER_OPENROUTER_API_KEY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pi-ai reads only the canonical OPENROUTER_API_KEY (see @mariozechner/pi-ai/dist/env-api-keys.js:93). The SIPHER_OPENROUTER_API_KEY variable was unused by code, but its presence in .env.example and docs/deployment.md created ambiguity. In frontier_sip_17 this caused a silent prod chat outage: the valid key was saved under the sipher-prefixed name, the invalid (old) key under OPENROUTER_API_KEY, and pi-ai used the invalid one — emitting empty content with no error log. Removes the dead reference from .env.example and docs/deployment.md. Adds an inline comment in .env.example to discourage reintroducing the prefixed form. docker-compose.yml in the repo never declared it, so no change there (the VPS-side compose still has it and is addressed separately in #294). Closes #295. --- .env.example | 5 ++++- docs/deployment.md | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index c1ace38a..4ff070e2 100644 --- a/.env.example +++ b/.env.example @@ -24,7 +24,10 @@ JWT_EXPIRY=24h AUTHORIZED_WALLETS= # Sipher Agent (OpenRouter) -SIPHER_OPENROUTER_API_KEY= +# pi-ai reads OPENROUTER_API_KEY (see @mariozechner/pi-ai/dist/env-api-keys.js). +# Do NOT introduce a SIPHER_OPENROUTER_API_KEY — historically it caused a silent +# prod outage when the valid key was stored under the sipher-prefixed name and +# the invalid one was under OPENROUTER_API_KEY (issue #295). OPENROUTER_API_KEY= SIPHER_MODEL=anthropic/claude-sonnet-4.6 diff --git a/docs/deployment.md b/docs/deployment.md index 95a1d569..995fb435 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -28,8 +28,7 @@ SSH access: `ssh sip` (the `sipher` container runs under the `sip` user, there i | `ADMIN_API_KEY` | Admin API key for `/api/admin/*` endpoints. Empty = endpoints return 503. | `openssl rand -hex 32` | | `API_KEYS` | Comma-separated public API keys | Generate per client | | `SOLANA_RPC_URL` | Primary Solana RPC endpoint | Provider dashboard | -| `SIPHER_OPENROUTER_API_KEY` | LLM provider key (OpenRouter) | openrouter.ai dashboard | -| `OPENROUTER_API_KEY` | Fallback for non-Sipher agents | openrouter.ai dashboard | +| `OPENROUTER_API_KEY` | LLM provider key — read by pi-ai. Authoritative for sipher agent chat. | openrouter.ai dashboard | ### Optional