Shakti Prasad Mohapatra
29056b2335
fix(title): disable Gemini thinking tokens to prevent max_tokens starvation
...
Gemini models enable internal thinking/reasoning tokens by default.
When generate_title() called call_llm() with max_tokens=64, Gemini
consumed the entire 64-token budget on internal thought tokens,
truncating the JSON title response before it could complete. The
fallback prose extractor then picked up the opening fence (```json)
or a bare brace as the session title.
Two-part fix:
1. title_generator.py: Pass reasoning_config={"enabled": False} to
call_llm() so thinking is explicitly disabled for title generation.
2. chat_completions.py: In _build_gemini_thinking_config, when
reasoning is disabled (enabled=False or effort="none"), set
thinkingBudget: 0 on Gemini models that support it (2.5+ and 3.x).
includeThoughts: False only hides thought parts from the response
while the model still reasons internally and bills thought tokens
against maxOutputTokens. thinkingBudget: 0 truly disables thinking
so thought tokens do not consume the max_tokens budget.
Fixes #91927
2026-09-12 21:10:02 -07:00
..
2026-09-12 05:09:11 -07:00
2026-09-07 16:48:29 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-12 21:10:02 -07:00
2026-09-10 11:48:01 -07:00
2026-09-06 20:50:02 +05:30
2026-09-03 13:16:47 -07:00
2026-09-03 09:44:26 -07:00
2026-09-12 08:25:40 -07:00
2026-09-10 18:08:16 -07:00
2026-09-09 12:21:28 +05:30
2026-09-12 01:35:05 -07:00
2026-09-07 08:07:26 -07:00
2026-09-06 05:37:03 -07:00
2026-09-06 05:37:03 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 20:10:26 -07:00
2026-09-02 21:38:20 -07:00
2026-09-03 17:13:22 -07:00
2026-09-12 08:28:49 -07:00
2026-09-11 19:39:12 -07:00
2026-09-07 06:02:22 -07:00
2026-09-12 01:35:05 -07:00
2026-09-07 07:06:58 -07:00
2026-09-09 12:19:13 +05:30
2026-09-12 01:35:05 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-05 10:54:19 +05:30
2026-09-12 22:40:28 +05:30
2026-09-07 05:24:15 -07:00
2026-09-07 05:24:15 -07:00
2026-09-10 18:08:16 -07:00
2026-09-07 21:43:54 +05:30
2026-09-10 15:13:02 -04:00
2026-09-06 22:45:31 +05:30
2026-09-07 21:22:49 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 08:13:01 -07:00
2026-09-07 05:59:08 -07:00
2026-09-11 02:07:48 -07:00
2026-09-11 02:07:48 -07:00
2026-09-05 16:44:23 +05:30
2026-09-10 03:04:51 -07:00
2026-09-11 03:45:33 +05:30
2026-09-03 09:44:26 -07:00
2026-09-07 08:06:48 -07:00
2026-09-11 03:45:31 +05:30
2026-09-03 22:00:01 -07:00
2026-09-11 03:45:33 +05:30
2026-09-03 09:44:26 -07:00
2026-09-12 05:56:15 -07:00
2026-09-07 08:19:32 -07:00
2026-09-07 07:10:28 -07:00
2026-09-12 08:23:42 -07:00
2026-09-03 04:31:46 -07:00
2026-09-12 08:27:11 -07:00
2026-09-09 16:30:24 -07:00
2026-09-03 17:13:22 -07:00
2026-09-09 11:29:56 -07:00
2026-09-10 10:35:07 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 21:10:50 -07:00
2026-09-11 15:26:46 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-07 08:08:04 -07:00
2026-09-12 01:35:05 -07:00
2026-09-11 15:26:46 -07:00
2026-09-12 08:23:13 -07:00
2026-09-09 13:08:25 +05:30
2026-09-09 10:58:16 -07:00
2026-09-07 08:28:43 -07:00
2026-09-11 11:54:49 -07:00
2026-09-03 22:00:01 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 22:21:06 -07:00
2026-09-12 08:22:57 -07:00
2026-09-10 10:27:07 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-10 18:11:25 -07:00
2026-09-12 07:46:36 -07:00
2026-09-11 16:50:20 -07:00
2026-09-06 09:09:00 -07:00
2026-09-04 00:15:16 -07:00
2026-09-06 09:11:04 -07:00
2026-09-02 22:21:06 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 15:26:46 -07:00
2026-09-09 12:17:57 +05:30
2026-09-03 09:44:26 -07:00
2026-09-03 15:07:39 -07:00
2026-09-03 13:28:22 -07:00
2026-09-12 01:35:05 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-12 13:44:52 -07:00
2026-09-11 03:45:33 +05:30
2026-09-12 08:06:48 -07:00
2026-09-03 13:48:49 -07:00
2026-09-07 08:24:54 -07:00
2026-09-10 09:22:31 -07:00
2026-09-12 08:37:14 -07:00
2026-09-03 17:13:22 -07:00
2026-09-10 13:23:24 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-08 04:38:47 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 06:15:43 -07:00
2026-09-06 05:35:12 -07:00
2026-09-09 10:32:01 +05:30
2026-09-12 07:54:57 -07:00
2026-09-03 17:13:22 -07:00
2026-09-12 08:25:36 -07:00
2026-09-07 07:10:28 -07:00
2026-09-12 08:25:59 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 03:31:03 -07:00
2026-09-03 10:40:25 -07:00
2026-09-03 12:29:52 -07:00
2026-09-03 13:29:35 -07:00
2026-09-03 03:31:03 -07:00
2026-09-12 08:34:07 -07:00
2026-09-09 10:31:26 +05:30
2026-09-09 10:31:26 +05:30
2026-09-03 13:24:04 -07:00
2026-09-04 00:15:16 -07:00
2026-09-02 19:45:03 -07:00
2026-09-12 21:10:02 -07:00
2026-09-10 02:21:16 +05:30
2026-09-11 19:39:12 -07:00
2026-09-12 21:07:46 -07:00
2026-09-06 22:56:51 +05:30
2026-09-12 08:25:14 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 00:15:16 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-04 00:15:16 -07:00
2026-09-11 03:45:33 +05:30
2026-09-12 08:27:11 -07:00
2026-09-03 09:44:26 -07:00
2026-09-10 10:45:57 -07:00
2026-09-06 13:21:17 -07:00
2026-09-10 10:27:07 -07:00
2026-09-03 13:12:23 -07:00
2026-09-11 06:37:27 -07:00
2026-09-09 12:17:57 +05:30
2026-09-10 13:23:24 -07:00
2026-09-03 09:44:26 -07:00
2026-09-11 06:24:11 -07:00
2026-09-09 09:51:31 -07:00
2026-09-09 12:17:57 +05:30
2026-09-03 09:44:26 -07:00
2026-09-03 13:12:23 -07:00
2026-09-06 13:21:17 -07:00
2026-09-06 13:21:17 -07:00
2026-09-12 10:00:06 +05:30
2026-09-07 06:15:43 -07:00
2026-09-11 01:37:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-09 11:42:43 -07:00
2026-09-06 14:19:42 -07:00
2026-09-06 13:21:17 -07:00
2026-09-10 02:44:26 -07:00
2026-09-10 11:48:01 -07:00
2026-09-10 11:48:01 -07:00
2026-09-09 02:35:41 -07:00
2026-09-12 13:44:52 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-04 07:17:00 -07:00