v0.2.0 — LLM reliability (502 fix) + batched-round turn model #8

Closed
opened 2026-10-11 16:43:59 +02:00 by kamilkrzywda · 0 comments
Owner

v0.2.0

502 reliability fix. The live reasoning model qwen3.8-27b was exhausting its max_tokens:4000 output budget on chain-of-thought, returning null content → HTTP 502 on roughly half of turns (with no retry or logging). llm.chat now sends reasoning_effort:"low" (thinking stays active but cut ~85%), retries up to 3× with 2s→3s backoff on timeout/5xx/network/null-content (not on 4xx), logs every call, and the output budget is env-tunable (LLM_MAX_TOKENS, default 4000). Turns are now ~4–5× faster and well under the ~90s upstream proxy wall.

Batched round model. Actions and diplomatic messages are queued into game.pending via POST /api/games/:id/action and POST /api/games/:id/diplomacy (fast, no LLM call, no turn advance). A single "Jump forward" (POST /api/games/:id/jump) commits the whole batch in ONE LLM turn, applies the TurnResult, clears the queue, and advances the world by one period. Diplomacy no longer advances a turn on its own; the old POST /api/games/:id/turn route is removed.

UI. New small "Add action" / "Add to round" buttons (secondary, sm) plus a prominent "Jump forward" button (primary, shows the queued count) and a visible pending-queue list in the action panel.

Version bump 0.1.0 → 0.2.0.

## v0.2.0 **502 reliability fix.** The live reasoning model `qwen3.8-27b` was exhausting its `max_tokens:4000` output budget on chain-of-thought, returning null `content` → HTTP 502 on roughly half of turns (with no retry or logging). `llm.chat` now sends `reasoning_effort:"low"` (thinking stays active but cut ~85%), retries up to 3× with 2s→3s backoff on timeout/5xx/network/null-content (not on 4xx), logs every call, and the output budget is env-tunable (`LLM_MAX_TOKENS`, default 4000). Turns are now ~4–5× faster and well under the ~90s upstream proxy wall. **Batched round model.** Actions and diplomatic messages are queued into `game.pending` via `POST /api/games/:id/action` and `POST /api/games/:id/diplomacy` (fast, no LLM call, no turn advance). A single "Jump forward" (`POST /api/games/:id/jump`) commits the whole batch in ONE LLM turn, applies the `TurnResult`, clears the queue, and advances the world by one period. Diplomacy no longer advances a turn on its own; the old `POST /api/games/:id/turn` route is removed. **UI.** New small "Add action" / "Add to round" buttons (secondary, sm) plus a prominent "Jump forward" button (primary, shows the queued count) and a visible pending-queue list in the action panel. Version bump `0.1.0` → `0.2.0`.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/History#8