xonecas.io
60255
Zn

Zoea-Nova / files

Zoea-Nova / documentation / current / KNOWN_PROVIDER_ISSUES.md

3.3 KB
1# Known Provider Issues
2
3This document tracks known issues with LLM provider APIs that affect Zoea Nova. These are upstream bugs in the provider APIs, not Zoea Nova bugs.
4
5## OpenCode Zen
6
7### System-Only Messages Crash Token Counting
8
9**Status:** 🔴 OPEN (Upstream Bug)  
10**Severity:** High  
11**Reported:** 2026-02-06  
12**Affects:** All OpenCode Zen models (`glm-4.7-free`, `kimi-k2.5-free`, etc.)
13
14**Issue:**
15OpenCode Zen API returns a 500 Internal Server Error when chat completion requests contain only system messages (no user or assistant messages).
16
17**Error Response:**
18```json
19{
20  "type": "error",
21  "error": {
22    "type": "error",
23    "message": "Cannot read properties of undefined (reading 'prompt_tokens')"
24  }
25}
26```
27
28**Root Cause:**
29Server-side bug in OpenCode Zen's response transformation logic. The API fails to handle cases where token count metadata is undefined or missing from upstream provider responses.
30
31**Workaround (Implemented):**
32```go
33// internal/provider/openai_common.go
34// If only system messages remain, add a dummy user message
35if allMessagesAreSystem {
36    messages = append(messages, openAIMessage{
37        Role:    "user",
38        Content: "Continue.",
39    })
40}
41```
42
43**Impact:**
44- ✅ Workaround prevents API crashes
45- ✅ No functional impact on Zoea Nova
46- ✅ Fallback is OpenAI-spec compliant
47
48**Related OpenCode Zen Issues:**
49- Issue #8228: Gemini models have similar token counting bugs (`"Cannot read properties of undefined (reading 'promptTokenCount')"`)
50- Pattern suggests systemic issue in how OpenCode Zen wraps upstream API responses
51
52**References:**
53- Investigation: `documentation/investigations/OPENCODE_ZEN_BUG_VERDICT_2026-02-06.md`
54- API Tests: `documentation/investigations/OPENCODE_ZEN_API_TESTS_2026-02-06.md`
55- Fix Report: `documentation/reports/OPENCODE_ZEN_FIX_2026-02-07.md`
56- OpenCode Issue: https://github.com/anomalyco/opencode/issues/8228
57
58---
59
60## Ollama
61
62### Occasional Context Deadline Exceeded Errors
63
64**Status:** 🟡 INVESTIGATING  
65**Severity:** Medium  
66**Reported:** 2026-02-05  
67**Affects:** Local Ollama installations
68
69**Issue:**
70Occasional timeout errors when calling Ollama chat completions:
71```
72Post "http://localhost:11434/v1/chat/completions": context deadline exceeded
73```
74
75**Evidence:**
76- 24h log analysis (2026-02-05): 65 HTTP 500s, 19 HTTP 400s, 3 prompt truncations, 23 client disconnects
77- Ollama logs show prompt truncation (`limit=32768`, `prompt=41611`) before bursts of errors
78- No corresponding errors in `~/.zoea-nova/zoea.log` during same timeframe
79
80**Possible Causes:**
811. Model size vs. context window limits
822. Request timeout configuration
833. Rate limiting interaction with burst requests
844. Ollama server resource constraints
85
86**Current Status:**
87- Documented but not resolved
88- Needs root cause analysis
89- May be related to model configuration or system resources
90
91**References:**
92- `documentation/current/KNOWN_ISSUES.md` (Provider Reliability section)
93
94---
95
96## Adding New Provider Issues
97
98When documenting new provider issues:
99
1001. **Verify it's an upstream bug** - Test with minimal curl requests
1012. **Check provider issue tracker** - See if already reported
1023. **Document workaround** - If implemented in Zoea Nova
1034. **Link to investigation** - Reference detailed analysis in `documentation/investigations/`
1045. **Update status** - Mark as resolved when fixed upstream
105
106---
107
108Last updated: 2026-02-06