GenerateTitle writes the model completion straight into sessions.title, which every shipped migration declares as VARCHAR(255). When the model ignores the "short title" instruction and returns an explanation along with the title, the follow-up Update fails with SQLSTATE 22001 (value too long for type character varying(255)) and the session silently ends up with no title. The error only reaches the log and the answer itself is unaffected, so the failure is easy to miss. Trim the reasoning prefix and surrounding whitespace, then truncate to 100 runes - by rune rather than byte, so a multi-byte character is never cut in half - and log a warning when truncation happens so the prompt can be revisited. |
||
|---|---|---|
| .. | ||
| repository | ||
| service | ||