9router/open-sse/services
warelik 86162eeb8f fix(combo/fusion): flatten Anthropic-style tool messages in panel calls
flattenToolHistory only recognized OpenAI-style tool calls. Anthropic-compatible clients (Claude Code, /v1/messages) send tool invocations and results as tool_use/tool_result blocks inside the message content array. Since panel calls strip the tools definitions (#1859), the panel expert models received structured tool history without schemas, causing them to fail or misbehave (leading to empty responses and 503 errors).

Extend flattenToolHistory to recognize and flatten tool_use and tool_result blocks in the content array into prose text, keeping panel expert execution robust and independent of the client API format.

PR decolua/9router#1910

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-20 15:19:31 +07:00
..
tokenRefresh feat(provider): add CodeBuddy CN provider (copilot.tencent.com) 2026-06-19 15:33:26 +07:00
usage fix: giảm spam 429 từ Claude OAuth usage endpoint 2026-06-17 11:42:20 +07:00
accountFallback.js fix: update backoff configuration and improve CLI detection messages 2026-04-17 12:54:50 +07:00
combo.js fix(combo/fusion): flatten Anthropic-style tool messages in panel calls 2026-06-20 15:19:31 +07:00
compact.js Feat : Auto restart after crash 2026-03-14 09:37:29 +07:00
kiroModels.js https://github.com/decolua/9router/pull/1167 2026-05-16 11:20:08 +07:00
model.js refactor(open-sse): registry consolidation + DRY media/oauth/adhoc cleanup 2026-06-14 13:15:48 +07:00
oauthCredentialManager.js refactor(open-sse): registry consolidation + DRY media/oauth/adhoc cleanup 2026-06-14 13:15:48 +07:00
projectId.js Add proactive token refresh lead times for providers and implement Codex proxy management 2026-04-14 11:41:06 +07:00
provider.js feat(headroom): add proxy lifecycle management + dashboard UI 2026-06-20 10:09:50 +07:00
qoderModels.js refactor(open-sse): registry consolidation + DRY media/oauth/adhoc cleanup 2026-06-14 13:15:48 +07:00
tokenRefresh.js feat(provider): add CodeBuddy CN provider (copilot.tencent.com) 2026-06-19 15:33:26 +07:00
usage.js Refactor 2026-06-15 18:18:04 +07:00