Dashboardclibatch-queue.ts: 404 from upstream treat…

batch-queue.ts: 404 from upstream treated as transient — provider never disabled

Category: gotcha
Confidence: 1.00
ID: 019e6b25-30c1-7fa5-9f5e-c6fd35b2e396
Project ID: c760f4f9-42b0-4ce0-b36d-6b8c38d770b2
Cross-project: No
Recalled in other projects: 1
Source session: (none)
Created: 2026-06-23 09:27:14
Updated: 2026-06-23 09:27:14

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 5 2d ago

Content

Trap: BatchProvider.submit() returns null for any non-401/403 HTTP error, including 404. submitBatch() treats null as transient and falls back — no disable happens. For providers that don't implement /v1/messages/batches (e.g. MiniMax), this causes a wasted HTTP round-trip every 30s forever. Fix: add "not-found" return value for 404 in both Anthropic and OpenAI submit methods. In submitBatch(), handle "not-found" with provider-level disable: add disabledBatchProviders: Set<string> (keyed by provider name), persist to kv_meta via setKV(), restore on startup. Add fast-path bypass in both flush() and prompt(). Provider-level (not per-session) because the URL is baked in at construction — one provider per process. groupKey() = authFingerprint(cred)|providerID; per-credential disable was removed in favor of per-session historically.

Move to: