34 Commits

Author SHA1 Message Date
Nikolas de Hor
ad99d5aaa0 fix: merge consecutive user messages into single message
Some LLM providers (Minimax, Dashscope) strictly reject consecutive
messages with the same role. build_messages() was emitting two separate
user messages back-to-back: the runtime context and the actual user
content.

Merge them into a single user message, handling both plain text and
multimodal (image) content. Update _save_turn() to strip the runtime
context prefix from the merged message when persisting to session
history.

Fixes #1414
Fixes #1344
2026-03-03 00:59:58 -03:00
Jack Lu
3ee061b879
Merge branch 'main' into main 2026-03-01 13:35:24 +08:00
Re-bin
5ca386ebf5 fix: preserve reasoning_content and thinking_blocks in session history 2026-02-28 17:37:12 +00:00
JK_Lu
977ca725f2 style: unify code formatting and import order
- Remove trailing whitespace and normalize blank lines
- Unify string quotes and line breaks for long lines
- Sort imports alphabetically across modules
2026-02-28 20:55:43 +08:00
aiguozhi123456
db4185c8b7 Add timestamp format hint for HISTORY.md grep searching 2026-02-27 11:11:42 +00:00
Re-bin
cdbede2fa8 refactor: simplify /stop dispatch, inline commands, trim verbose docstrings 2026-02-25 17:04:08 +00:00
Re-bin
d55a850357 refactor: simplify runtime context injection — drop JSON/dedup, keep untrusted tag 2026-02-25 16:13:48 +00:00
rickthemad4
87a2084ee2 feat: add untrusted runtime context layer for stable prompt prefix 2026-02-24 16:38:29 +00:00
Re-bin
f294e9d065 refactor: merge runtime context helpers and move imports to top 2026-02-24 16:15:21 +00:00
rickthemad4
56b9b33c6d fix: stabilize system prompt for better cache reuse 2026-02-24 14:18:50 +00:00
Re-bin
d9462284e1 improve agent reliability: behavioral constraints, full tool history, error hints 2026-02-23 09:13:08 +00:00
Re-bin
13d768cd93 Merge branch 'main' into pr-939 2026-02-21 17:06:05 +00:00
Xubin Ren
6a9152f0c4
Merge PR #947 to Fix 'Missing reasoning_content field' error for deepseek provider.
fix(context): Fix 'Missing `reasoning_content` field' error for deepseek provider.
2026-02-22 00:47:58 +08:00
nanobot-bot
01c835aac2 fix(context): Fix 'Missing reasoning_content field' error for deepseek provider. 2026-02-21 23:11:30 +08:00
vincentchen
b3acd19c7b Remove redundant tools description (because tools information is passed in with each self.provider.chat() call) 2026-02-21 20:28:42 +08:00
Re-bin
aeb07d3450 refactor(loop): remove interim text retry, use system prompt constraint instead 2026-02-21 07:32:58 +00:00
Re-bin
0c2fea6d33 Merge branch 'main' into pr-795 2026-02-20 11:25:51 +00:00
Re-bin
715b2db24b feat: stream intermediate progress to user during tool execution 2026-02-18 14:23:51 +00:00
Ivan
e44f14379a fix: sanitize messages and ensure 'content' for strict LLM providers
- Strip non-standard keys like 'reasoning_content' before sending to LLM
- Always include 'content' key in assistant messages (required by StepFun)
- Add _sanitize_messages to LiteLLMProvider to prevent 400 BadRequest errors
2026-02-18 11:57:58 +03:00
Re-bin
1db05c881d fix: omit empty content in assistant messages 2026-02-17 08:59:05 +00:00
nano bot
56bc8b5677 fix: avoid sending empty content entries in assistant messages 2026-02-17 03:52:08 +00:00
Re-bin
94c21fc235 feat: redesign memory system — two-layer architecture with grep-based retrieval 2026-02-12 15:02:52 +00:00
Re-bin
7087947e0e feat(cron): add one-time 'at' schedule to skill docs and show timezone in system prompt 2026-02-12 06:50:44 +00:00
Re-bin
d335494212 feat: add interleaved chain-of-thought to agent loop 2026-02-12 06:25:25 +00:00
Re-bin
2931694eb8 fix: preserve reasoning_content in conversation history for thinking models 2026-02-08 18:37:41 +00:00
Re-bin
764c6d02a1 refactor: simplify runtime environment info in system prompt 2026-02-06 03:26:39 +00:00
Re-bin
980c5992f4 Merge branch 'main' into pr-107 2026-02-06 03:21:44 +00:00
Re-bin
b1d6670ce0 feat: add cron tool for scheduling reminders and tasks 2026-02-05 15:09:51 +00:00
Devin
d5ee8f3e55
Update context.py
Add doc string.
2026-02-05 10:45:36 +08:00
Shukfan Law
22156d3a40 feat: added runtime environment summary to system prompt 2026-02-04 22:17:35 +08:00
Re-bin
ac390253c3 simplify vision support code 2026-02-02 13:29:38 +00:00
Yitong Li
f4b081b83f feat: add vision support for image recognition in Telegram 2026-02-02 15:32:12 +08:00
Re-bin
051a97fa4e feat: add sub-agent system 2026-02-01 16:28:45 +00:00
Re-bin
d4cc48afd5 🐈nanobot: hello world! 2026-02-01 07:36:42 +00:00