@gotcos/glasses-server 6.39.2 → 6.39.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/package.json +1 -1
- package/server/lib/ollama-bridge.ts +20 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## 6.39.3
|
|
2
|
+
|
|
3
|
+
Local turns answer in seconds again: thinking is off by default.
|
|
4
|
+
|
|
5
|
+
The Ollama bridge sent no `think` field, so a thinking-class model spent its
|
|
6
|
+
full hidden reasoning chain before the first visible token. Measured on
|
|
7
|
+
qwen3.5:35b the day it became the default local model: 6,265 generated tokens
|
|
8
|
+
for a 150-word answer, 98.6 seconds of dead screen against 2.2 seconds with
|
|
9
|
+
thinking disabled, at the same visible answer quality -- and a hard prompt
|
|
10
|
+
could out-run the 180-second wall clock entirely.
|
|
11
|
+
|
|
12
|
+
Every request now sends `think: false` unless COS_OLLAMA_THINK opts back in
|
|
13
|
+
("1"/"true", or an explicit budget: low, medium, high, max). The daemon
|
|
14
|
+
silently tolerates `think: false` on models without the thinking capability
|
|
15
|
+
(verified live), so no capability gating is needed. COS Control 0.5.77
|
|
16
|
+
allowlists the new key so a pinned preference survives Update Server.
|
|
17
|
+
|
|
1
18
|
## 6.39.2
|
|
2
19
|
|
|
3
20
|
Every Claude fork failed; the copy it left behind was real.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gotcos/glasses-server",
|
|
3
|
-
"version": "6.39.
|
|
3
|
+
"version": "6.39.3",
|
|
4
4
|
"description": "COS Glasses \u2014 self-hosted AI heads-up-display server for Even G2 smart glasses, powered by Claude Code, Codex, Cursor Agent CLI, or local Ollama",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,6 +30,25 @@ import { OLLAMA_MODEL } from '../../shared/model-preference.js'
|
|
|
30
30
|
|
|
31
31
|
const INACTIVITY_MS = 60_000
|
|
32
32
|
const WALL_MAX_MS = 180_000
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Thinking is OFF by default. A thinking-class model spends a hidden
|
|
36
|
+
* reasoning chain before its first visible token -- measured 2026-08-26 on
|
|
37
|
+
* qwen3.5:35b: 6,265 generated tokens for a 150-word answer (~20K thinking
|
|
38
|
+
* chars), 98.6s wall against 2.2s with thinking disabled, at the same
|
|
39
|
+
* visible answer quality. On the lens that is a dead screen for a minute
|
|
40
|
+
* and a half, and a hard prompt can out-run WALL_MAX_MS entirely. The
|
|
41
|
+
* daemon silently tolerates `think: false` on models WITHOUT the thinking
|
|
42
|
+
* capability (verified live against llama3.2:1b -- HTTP 200), so no
|
|
43
|
+
* capability gate is needed. COS_OLLAMA_THINK opts back in: "1"/"true"
|
|
44
|
+
* enables it, or an explicit budget level passes through.
|
|
45
|
+
*/
|
|
46
|
+
export function resolveOllamaThink(raw: string | undefined): boolean | string {
|
|
47
|
+
const value = (raw ?? '').trim().toLowerCase()
|
|
48
|
+
if (value === '1' || value === 'true') return true
|
|
49
|
+
if (value === 'low' || value === 'medium' || value === 'high' || value === 'max') return value
|
|
50
|
+
return false
|
|
51
|
+
}
|
|
33
52
|
const HISTORY_LIMIT = 20
|
|
34
53
|
|
|
35
54
|
type OllamaChatMessage = { role: 'system' | 'user' | 'assistant'; content: string }
|
|
@@ -207,6 +226,7 @@ export async function callOllamaStreaming(
|
|
|
207
226
|
model: catalog.model,
|
|
208
227
|
messages,
|
|
209
228
|
stream: true,
|
|
229
|
+
think: resolveOllamaThink(process.env.COS_OLLAMA_THINK),
|
|
210
230
|
}),
|
|
211
231
|
signal: abort.signal,
|
|
212
232
|
})
|