Commit Graph

9 Commits

Author SHA1 Message Date
Re-bin
0a0017ff45 fix: raise tool result history limit to 16k and force save_memory in consolidation 2026-03-12 03:08:53 +00:00
Re-bin
fb77176cfd feat(custom-provider): keep instance-level session affinity header for cache locality 2026-03-05 14:25:46 +00:00
David Markey
ecdfaf0a5a feat(custom-provider): add x-session-affinity header for prompt caching 2026-03-02 11:03:12 +00:00
Re-bin
f9d72e2e74 feat: add reasoning_effort config to enable LLM thinking mode 2026-02-28 17:18:05 +00:00
Re-bin
b653183bb0 refactor(providers): move empty content sanitization to base class 2026-02-22 18:26:42 +00:00
Re-bin
2f7835a301 Merge remote-tracking branch 'origin/main' into pr-949 2026-02-22 18:21:47 +00:00
andienguyen-ecoligo
de63c31d43 fix(providers): normalize empty reasoning_content to None at provider level
PR #947 fixed the consumer side (context.py) but the root cause is at
the provider level — getattr returns "" (empty string) instead of None
when reasoning_content is empty. This causes DeepSeek API to reject the
request with "Missing reasoning_content field" error.

`"" or None` evaluates to None, preventing empty strings from
propagating downstream.

Fixes #946
2026-02-21 12:30:57 -05:00
muskliu
83ccdf6186 fix(provider): filter empty text content blocks causing API 400
When MCP tools return empty content, messages may contain empty-string
text blocks. OpenAI-compatible providers reject these with HTTP 400.

Changes:
- Add _prevent_empty_text_blocks() to filter empty text items from
  content lists and handle empty string content
- For assistant messages with tool_calls, set content to None (valid)
- For other messages, replace with '(empty)' placeholder
- Only copy message dict when modification is needed (zero-copy path
  for normal messages)

Co-Authored-By: nanobot <noreply@anthropic.com>
2026-02-22 00:20:00 +08:00
Re-bin
e2a0d63909 feat: add custom provider with direct openai-compatible support 2026-02-18 02:39:15 +00:00