managarten/packages
Till JS 8adef1b39c fix(shared-llm): fall back to message.reasoning when content is empty
Reasoning-style models (Gemma 4 E4B is the first one we use, but
DeepSeek R1, Gemini 2.5 thinking, etc. behave the same way) split
their output into two fields:
  - message.content   — the final answer
  - message.reasoning — the chain-of-thought leading up to it

When the model is given too few max_tokens to finish reasoning AND
emit content, the response comes back with content="" and reasoning
populated with the half-finished thought. Verified empirically with
gemma4:e4b and `max_tokens: 10` on a "Sage Hi auf Deutsch in einem
Wort" prompt — content was "" while reasoning had "Here's a
thinking process to..." (cut off mid-thought).

For the title task this rarely matters because the system prompt is
directive enough to skip the thinking phase (verified: same gemma4:
e4b returns clean 7-token titles like "Sonnenstrahlen genießen
heute" with the standard system prompt + max_tokens 32). But it's
a real failure mode for any future task that uses a less-directive
prompt or hits a longer reasoning chain.

Defensive fix: prefer message.content first, fall back to
message.reasoning if content is empty. The fallback is a string-or-
nothing operation, no semantic interpretation — if the reasoning
field happens to contain a usable answer fragment, the caller's
cleanup chain (e.g. generateTitleTask's strip-quotes-and-dots
pipeline) will normalize it. If it's truly half-finished thought,
the caller's runRules fallback still kicks in via the existing
empty-result detection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:29:22 +02:00
..
credits chore(matrix): scrub final matrix references after subsystem removal 2026-04-08 16:39:42 +02:00
eslint-config fix(timeblocks): type errors from recurrence migration 2026-04-07 13:22:59 +02:00
feedback feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
help feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
local-llm feat(local-llm): Phase 3 — move inference into a Web Worker 2026-04-09 01:27:10 +02:00
local-store fix(mana/web): sprint 2 — auth-aware data layer + guest migration 2026-04-07 13:07:12 +02:00
notify-client chore(matrix): final scrub of stale matrix references 2026-04-08 16:47:54 +02:00
qr-export chore(workspace): unify vitest to ^4.1.2 across all packages 2026-04-07 13:58:29 +02:00
shared-auth feat(auth): structured error codes + conditional passkey UI 2026-04-08 12:40:51 +02:00
shared-auth-ui refactor(mana): rename inventar → inventory across the codebase 2026-04-09 15:50:24 +02:00
shared-branding feat(mana/web/body): new module — combined fitness training + body comp tracking 2026-04-09 16:28:19 +02:00
shared-drizzle-config feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
shared-error-tracking feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
shared-go chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
shared-hono refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
shared-i18n chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
shared-icons chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
shared-landing-ui chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
shared-links feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
shared-llm fix(shared-llm): fall back to message.reasoning when content is empty 2026-04-09 16:29:22 +02:00
shared-logger feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
shared-pwa feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
shared-python/manacore_auth feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
shared-storage chore(workspace): unify vitest to ^4.1.2 across all packages 2026-04-07 13:58:29 +02:00
shared-stores refactor(mana): rename inventar → inventory across the codebase 2026-04-09 15:50:24 +02:00
shared-tags chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
shared-tailwind docs(shared-tailwind/themes): document hsl() wrap rule + token allowlist 2026-04-09 13:05:16 +02:00
shared-theme chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
shared-theme-ui chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
shared-types chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
shared-ui feat(mana/web): clickable page titles open route in new tab 2026-04-09 14:27:51 +02:00
shared-uload feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
shared-utils refactor(mana): rename inventar → inventory across the codebase 2026-04-09 15:50:24 +02:00
shared-vite-config chore(packages): remove 4 dead zero-consumer packages 2026-04-09 11:56:25 +02:00
spiral-db refactor(mana): rename inventar → inventory across the codebase 2026-04-09 15:50:24 +02:00
subscriptions feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
test-config chore(workspace): unify vitest to ^4.1.2 across all packages 2026-04-07 13:58:29 +02:00
wallpaper-generator chore(workspace): unify vitest to ^4.1.2 across all packages 2026-04-07 13:58:29 +02:00