This commit is contained in:
2026-07-21 01:31:53 -05:00
parent fafc502aeb
commit 4e7e86a3be
11 changed files with 254 additions and 13 deletions
+16
View File
@@ -18,6 +18,22 @@ go-second-key # optional comment
# disabled-key
```
For deployments such as Railway, keys can instead be supplied as a JSON environment variable. When set, `OPENCODE_API_KEYS` takes precedence over `keys.txt`:
```sh
OPENCODE_API_KEYS='["go-first-key","go-second-key"]'
```
To convert `keys.txt` into a copyable JSON value:
```sh
npm run keys:env
```
The global context limit defaults to 256k tokens and can be changed with `MAX_CONTEXT_TOKENS`.
Inference requests are limited per client IP to 2 requests per second, 100 requests per five hours, and $10 of reported upstream cost per five hours. Railway's `X-Real-IP` header is used to identify clients.
Start the proxy:
```sh