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) |
||
|---|---|---|
| .. | ||
| config | ||
| executors | ||
| handlers | ||
| services | ||
| transformer | ||
| translator | ||
| utils | ||
| .npmignore | ||
| index.js | ||