LocalAI/tests/e2e
Ettore Di Giacinto e1a6010874
fix(streaming): deduplicate tool call emissions during streaming (#9292)
The Go-side incremental JSON parser was emitting the same tool call on
every streaming token because it lacked the len > lastEmittedCount guard
that the XML parser had. On top of that, the post-streaming default:
case re-emitted all tool calls from index 0, duplicating everything.

This produced duplicate delta.tool_calls events causing clients to
accumulate arguments as "{args}{args}" — invalid JSON.

Fixes:
- JSON incremental parser: add len(jsonResults) > lastEmittedCount guard
  and loop from lastEmittedCount (matching the XML parser pattern)
- Post-streaming default: case: skip i < lastEmittedCount entries that
  were already emitted during streaming
- JSON parser: use blocking channel send (matching XML parser behavior)
2026-04-10 00:44:25 +02:00
..
distributed fix(inflight): count inflight from load model, but release afterwards (#9194) 2026-03-31 23:24:45 +02:00
mock-backend fix(streaming): deduplicate tool call emissions during streaming (#9292) 2026-04-10 00:44:25 +02:00
e2e_anthropic_test.go fix(anthropic): do not emit empty tokens and fix SSE tool calls (#9258) 2026-04-07 00:38:21 +02:00
e2e_mcp_test.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
e2e_ollama_test.go feat(api): add ollama compatibility (#9284) 2026-04-09 14:15:14 +02:00
e2e_suite_test.go fix: thinking models with tools returning empty content (reasoning-only retry loop) (#9290) 2026-04-09 18:30:31 +02:00
e2e_websocket_responses_test.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
mock_backend_test.go fix(streaming): deduplicate tool call emissions during streaming (#9292) 2026-04-10 00:44:25 +02:00
realtime_webrtc_test.go feat(realtime): WebRTC support (#8790) 2026-03-13 21:37:15 +01:00
realtime_ws_test.go feat(realtime): WebRTC support (#8790) 2026-03-13 21:37:15 +01:00