9router/open-sse
Liam 01e4a28f0a
fix: normalize finish_reason to 'tool_calls' when tool calls are present (#379)
Some upstream providers (e.g. Antigravity) return non-standard finish_reason
values like 'other' instead of the OpenAI-standard 'tool_calls' when the
model invokes tools. This causes downstream consumers (e.g. OpenClaw) to
fail to execute tool calls, breaking agentic sub-agent workflows.

Changes:
- nonStreamingHandler: post-translation guard that normalizes finish_reason
  to 'tool_calls' when message.tool_calls is present
- sseToJsonHandler: accumulate tool_calls from streaming deltas in
  parseSSEToOpenAIResponse; extract function_call items from Responses API
  output in handleForcedSSEToJson
- openai-responses translator: use toolCallIndex to choose between
  'tool_calls' and 'stop' in flush and response.completed events

Tested: 7 scenarios (non-stream text, single/multiple tool calls, stream
text/tool calls, multi-turn tool conversation, tools present but unused)
2026-03-23 09:35:25 +07:00
..
config feat: add MiniMax M2.7 model support (#357) 2026-03-19 15:34:36 +07:00
executors Update Antigravity provider config and headers 2026-03-17 10:12:17 +07:00
handlers fix: normalize finish_reason to 'tool_calls' when tool calls are present (#379) 2026-03-23 09:35:25 +07:00
services fix: treat Kiro 400 'improperly formed request' as model-unavailable (#386) 2026-03-23 09:31:31 +07:00
transformer feat: enhance request handling and error management in chatCore and streamToJsonConverter 2026-02-15 12:02:53 +07:00
translator fix: normalize finish_reason to 'tool_calls' when tool calls are present (#379) 2026-03-23 09:35:25 +07:00
utils refactor: update MITM bypass logic and enhance combo name validation 2026-03-19 22:47:32 +07:00
.npmignore Update jsconfig.json and package.json to correct open-sse path references from relative to local directory. 2026-01-05 10:37:09 +07:00
index.js Refactor config 2026-03-12 16:20:46 +07:00