@gotcos/glasses-server 6.39.3 → 6.40.0
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 +19 -0
- package/package.json +1 -1
- package/server/lib/ollama-bridge.ts +31 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## 6.40.0
|
|
2
|
+
|
|
3
|
+
Local thinking now follows the effort you asked for.
|
|
4
|
+
|
|
5
|
+
6.39.3 turned thinking off wholesale. This release makes it a ladder: the
|
|
6
|
+
default effort keeps local turns instant, and raising the effort raises the
|
|
7
|
+
thinking budget with it -- xhigh maps to a high thinking level, max and
|
|
8
|
+
ultracode to the maximum. That is what the escalation means: in a controlled
|
|
9
|
+
flag benchmark against an Opus 5 reference (10/10), a local Qwen model WITH
|
|
10
|
+
thinking also scored 10/10, where the same model without it scored 6-7. The
|
|
11
|
+
daemon accepts level strings on Qwen-class models and silently tolerates
|
|
12
|
+
think:false on models without the capability (both probed live).
|
|
13
|
+
|
|
14
|
+
COS_OLLAMA_THINK becomes a PIN rather than the only switch: "1"/"true"
|
|
15
|
+
always think, "0"/"false" never think, an explicit level forces that level,
|
|
16
|
+
and unset defers to the effort map. Pairs with COS Control 0.5.79, which
|
|
17
|
+
adds a local-model picker writing COS_OLLAMA_MODEL so multi-model daemons
|
|
18
|
+
stop depending on pull order.
|
|
19
|
+
|
|
1
20
|
## 6.39.3
|
|
2
21
|
|
|
3
22
|
Local turns answer in seconds again: thinking is off by default.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gotcos/glasses-server",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.40.0",
|
|
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": {
|
|
@@ -26,28 +26,45 @@ import {
|
|
|
26
26
|
startOllamaRun,
|
|
27
27
|
} from './ollama-run-ledger.js'
|
|
28
28
|
import { notifyExchange, notifySessionStart } from './telegram-notify.js'
|
|
29
|
-
import { OLLAMA_MODEL } from '../../shared/model-preference.js'
|
|
29
|
+
import { OLLAMA_MODEL, type EffortPreference } from '../../shared/model-preference.js'
|
|
30
30
|
|
|
31
31
|
const INACTIVITY_MS = 60_000
|
|
32
32
|
const WALL_MAX_MS = 180_000
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Thinking
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
35
|
+
* Thinking follows the REQUESTED EFFORT, not a blanket switch.
|
|
36
|
+
*
|
|
37
|
+
* The default effort ('high' -- every ordinary lens turn) keeps thinking
|
|
38
|
+
* OFF: measured 2026-08-26 on qwen3.5:35b, a hidden chain turned a
|
|
39
|
+
* 2.2-second answer into 98.6 seconds of dead screen at the same visible
|
|
40
|
+
* quality, and a hard prompt can out-run WALL_MAX_MS entirely. Raising the
|
|
41
|
+
* effort raises the thinking budget with it (xhigh -> 'high', max and
|
|
42
|
+
* ultracode -> 'max'), because that is what the escalation MEANS -- the
|
|
43
|
+
* flag benchmark showed a thinking local model matching Opus 5 (10/10)
|
|
44
|
+
* where the same model without thinking scored 6-7. Level strings are
|
|
45
|
+
* accepted by the daemon on Qwen-class models (probed live), and
|
|
46
|
+
* `think: false` is silently tolerated by models WITHOUT the thinking
|
|
47
|
+
* capability (verified against llama3.2:1b -- HTTP 200), so no capability
|
|
48
|
+
* gate is needed.
|
|
49
|
+
*
|
|
50
|
+
* COS_OLLAMA_THINK, when set, PINS the behavior regardless of effort:
|
|
51
|
+
* "1"/"true" always think, "0"/"false" never think, or an explicit level.
|
|
52
|
+
* Anything unrecognized reads as unset and defers to the effort map.
|
|
45
53
|
*/
|
|
46
|
-
export function resolveOllamaThink(
|
|
54
|
+
export function resolveOllamaThink(
|
|
55
|
+
raw: string | undefined,
|
|
56
|
+
effort?: EffortPreference,
|
|
57
|
+
): boolean | string {
|
|
47
58
|
const value = (raw ?? '').trim().toLowerCase()
|
|
48
59
|
if (value === '1' || value === 'true') return true
|
|
60
|
+
if (value === '0' || value === 'false') return false
|
|
49
61
|
if (value === 'low' || value === 'medium' || value === 'high' || value === 'max') return value
|
|
50
|
-
|
|
62
|
+
switch (effort) {
|
|
63
|
+
case 'xhigh': return 'high'
|
|
64
|
+
case 'max':
|
|
65
|
+
case 'ultracode': return 'max'
|
|
66
|
+
default: return false
|
|
67
|
+
}
|
|
51
68
|
}
|
|
52
69
|
const HISTORY_LIMIT = 20
|
|
53
70
|
|
|
@@ -226,7 +243,7 @@ export async function callOllamaStreaming(
|
|
|
226
243
|
model: catalog.model,
|
|
227
244
|
messages,
|
|
228
245
|
stream: true,
|
|
229
|
-
think: resolveOllamaThink(process.env.COS_OLLAMA_THINK),
|
|
246
|
+
think: resolveOllamaThink(process.env.COS_OLLAMA_THINK, options?.effort),
|
|
230
247
|
}),
|
|
231
248
|
signal: abort.signal,
|
|
232
249
|
})
|