Repository navigation
Commit f421d52
authored
The Settings UI's "Thinking budgets" section, the per-call-site int
budget plumbing in nlp-service's _read_thinking_budget JSON-read path
+ cache, the db.ts getter/setter cluster, the API route validator, and
the SQLite settings row + /data/llm-config.json mirror key are all
removed. Migration v22 actively scrubs both stores on existing installs.
Per-call-site budget VALUES (extract: 512, draft: 1024, etc.) STAY
hardcoded in nlp-service/services/llm_client.py:_DEFAULT_THINKING_BUDGETS
and continue to flow through LLMRequest.thinking_budget to both providers
(GeminiProvider's thinking_config kwarg, DeepSeekProvider's conditional
reasoning_effort enum). Behaviour reverts to the pre-a53c66b shape:
hardcoded design intent, not user-tunable.
Why now: per issue #7's "Evaluated and confirmed NOT to work" list,
thinking_budget tuning is silently ignored on Gemini 2.5 models upstream
(googleapis/python-genai#782). The user-visible knob (a53c66b, 2026-04-30)
was added as a mitigation attempt for the structured-output repetition-
loop bug; it never reliably did anything. The actual mitigations
(json-repair salvage, halved-input fallback, _with_retry, DeepSeek
alternative provider, per-source provider switching) are independent
and stay in place.
Why a migration: unlike retired toggles whose settings rows can re-enable
a feature later, this knob is dead weight by construction. The JSON
mirror at /data/llm-config.json lives on the kompl-data named volume
which preserves orphan keys across rebuilds. v22 deletes both surfaces
idempotently. v22 stacks on chore's v21 (deployment_mode purge).
Behaviour: zero observable change on Gemini 2.5 (knob was upstream-
ignored). Zero change on DeepSeek for default-budget call sites (most
of them — LLMRequest.thinking_budget defaults to 0; DeepSeek only sets
reasoning_effort when > 0).
Removed: ~520 lines (Settings section + state hooks, db.ts getter/setter
+ types + const + validator function, API route validator + imports +
GET field + POST type + knownFields entry, _thinking_cache, JSON-read
logic in _read_thinking_budget, 2 test files totaling 13 tests).
Schema bumps to v22 (migrate.py SCHEMA_VERSION, helpers/schema.sql:221,
health/route.ts:58, integration-test.sh stage 1 assertion).
Signed-off-by: tuirk <[email protected]>
1 parent 6317b2c commit f421d52
10 files changed
Lines changed: 44 additions & 522 deletions
File tree
- app/src
- __tests__
- helpers
- app
- api
- health
- settings
- settings
- lib
- nlp-service
- services
- tests
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| |||
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | | - | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
| |||
74 | 71 | | |
75 | 72 | | |
76 | 73 | | |
77 | | - | |
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
| |||
88 | 84 | | |
89 | 85 | | |
90 | 86 | | |
91 | | - | |
92 | 87 | | |
93 | 88 | | |
94 | 89 | | |
| |||
229 | 224 | | |
230 | 225 | | |
231 | 226 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | 227 | | |
258 | 228 | | |
0 commit comments