anomalyco / anomalyco/opencode
V2 /api/generate returns 503 while standalone succeeds
@jlongster is already working on this.
Since Sep 7, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
The experimental V2 sessionless POST /api/generate operation returns HTTP 503 for models that complete through opencode2 run --standalone in the same isolated environment.
Versions tested
opencode2 v0.0.0-beta-18387opencode2 v0.0.0-beta-19242- Linux x86_64
Minimal reproduction
Start the app-owned server with an isolated XDG home/config/data/state/database and autoupdate disabled:
export OPENCODE_PASSWORD="$(openssl rand -hex 32)"
opencode2 serve --stdio --hostname 127.0.0.1 --port 0 --log-level none
Using the announced loopback URL, submit a harmless canary with Basic authentication:
curl --user "opencode:$OPENCODE_PASSWORD" \
--header 'content-type: application/json' \
--data '{"prompt":"Return one short greeting.","model":{"providerID":"opencode","id":"nemotron-3-ultra-free"}}' \
"$OPENCODE_URL/api/generate"
Observed: HTTP 503. On beta-18387 the same occurred with opencode/big-pickle. Beta-19242 required its current base model/plugin initialization before reaching the same 503 result.
Control using the same harmless canary and isolated environment:
printf '%s' 'Return one short greeting.' |
opencode2 run --standalone \
--model opencode/nemotron-3-ultra-free \
--format json \
--log-level none
Observed: generation completes successfully on both tested builds.
Expected
POST /api/generate should generate successfully when the same explicit model and environment succeed through run --standalone, or return a stable diagnostic that identifies the missing initialization/contract requirement.
No credentials, prompts beyond the harmless canary, response bodies, or user content are included in this report.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.