✗ WRONG

litellm 1.105.5

tools.parallel-calls-stream · ollama

Back to results · Scenario

Requirements

IdLevelStatusEvidence
calls-reportedMUSTCONTRADICTEDoutcome=returned; tool_calls count=1; truth count=2

What the provider sent

Finish
tool_calls
Raw finish
stop
Text
Tool calls
[
  {
    "arguments": {
      "city": "São Paulo"
    },
    "arguments_parsed_ok": true,
    "arguments_raw": "{\"city\":\"São Paulo\"}",
    "id": "call_8uaqob2r",
    "name": "get_weather"
  },
  {
    "arguments": {
      "city": "Zürich"
    },
    "arguments_parsed_ok": true,
    "arguments_raw": "{\"city\":\"Zürich\"}",
    "id": "call_nyjtbrz4",
    "name": "get_weather"
  }
]
Usage
{
  "alternatives": {},
  "cached_input": 0,
  "input": 292,
  "output": 55,
  "raw": {
    "eval_count": 55,
    "prompt_eval_cached_count": 0,
    "prompt_eval_count": 292
  },
  "reasoning": null,
  "total": 347
}
Stream completed
true
Error
null
Wire excerpt
status: 200
content-type: application/x-ndjson
body (ndjson):
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:10.221707224Z","message":{"role":"assistant","content":"","tool_calls":[{"id":"call_8uaqob2r","function":{"index":0,"name":"get_weather","arguments":{"city":"São Paulo"}}}]},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:11.273204818Z","message":{"role":"assistant","content":"","tool_calls":[{"id":"call_nyjtbrz4","function":{"index":1,"name":"get_weather","arguments":{"city":"Zürich"}}}]},"done":false}
{"model":"qwen3.5:0.8b","created_at":"2026-10-12T19:01:11.38933263Z","message":{"role":"assistant","content":""},"done":true,"done_reason":"stop","total_duration":5044967438,"load_duration":2849216,"prompt_eval_count":292,"prompt_eval_cached_count":0,"prompt_eval_duration":2830672000,"eval_count":55,"eval_duration":2201672000}

What the library reported

Outcome
returned
Finish
{
  "raw": "tool_calls",
  "source": "choices[0].finish_reason",
  "surface": "primary",
  "value": "tool_calls"
}
Text
Value
null
Surface
absent
Tool calls
[
  {
    "arguments": null,
    "arguments_parsed_ok": false,
    "arguments_raw": "{\"city\": \"S\\u00e3o Paulo\"}{\"city\": \"Z\\u00fcrich\"}",
    "id": "2f23c42e-bd01-4986-9930-ce4b44c20a64",
    "name": "get_weather"
  }
]
Usage
{
  "cached_input": null,
  "input": null,
  "output": null,
  "reasoning": null,
  "surface": {
    "cached_input": "absent",
    "input": "absent",
    "output": "absent",
    "reasoning": "absent",
    "total": "absent"
  },
  "total": null
}
Stream
{
  "chunks_seen": 3,
  "completed": null,
  "used": true
}
Error
null
Unsupported reason
null
Full observation JSON
{
  "elapsed_ms": 242.66346544027328,
  "error": null,
  "finish": {
    "raw": "tool_calls",
    "source": "choices[0].finish_reason",
    "surface": "primary",
    "value": "tool_calls"
  },
  "format": "wiretruth.observation/v1",
  "library": {
    "api": "litellm.completion",
    "language": "python",
    "name": "litellm",
    "version": "1.105.5"
  },
  "notes": [],
  "outcome": "returned",
  "stream": {
    "chunks_seen": 3,
    "completed": null,
    "used": true
  },
  "structured": {
    "attempted": false,
    "returned_as_success": false,
    "value": null
  },
  "text": {
    "surface": "absent",
    "value": null
  },
  "tool_calls": [
    {
      "arguments": null,
      "arguments_parsed_ok": false,
      "arguments_raw": "{\"city\": \"S\\u00e3o Paulo\"}{\"city\": \"Z\\u00fcrich\"}",
      "id": "2f23c42e-bd01-4986-9930-ce4b44c20a64",
      "name": "get_weather"
    }
  ],
  "unsupported_reason": null,
  "usage": {
    "cached_input": null,
    "input": null,
    "output": null,
    "reasoning": null,
    "surface": {
      "cached_input": "absent",
      "input": "absent",
      "output": "absent",
      "reasoning": "absent",
      "total": "absent"
    },
    "total": null
  }
}

Fixture

recorded ollama/tools.parallel-calls-stream

ProvenanceValue
Recorded at2026-10-12T19:01:06Z
Requested modelqwen3.5:0.8b
Returned modelqwen3.5:0.8b
CI runhttps://github.com/kartsan03/wiretruth/actions/runs/38294709109

Reproduce

wiretruth serve ollama/tools.parallel-calls-stream

Plain-library snippet from the shim manifest.

litellm.completion(model='ollama_chat/' + model, api_base=WIRETRUTH_BASE_URL_OLLAMA, api_key=WIRETRUTH_API_KEY); host root

Upstream

fix-merged Issue · PR

Fixed in: not specified

Existing upstream issue, not opened by wiretruth. Native Ollama sends function.index 0 and 1 in separate chunks; LiteLLM does not lift that field to the delta tool-call index. Delta resets its default index to zero for each chunk, so ordinary index-based assembly merges two argument objects into one unparseable call (https://github.com/BerriAI/litellm/blob/v1.105.1/litellm/types/utils.py#L1555-L1573). The Ollama parser also replaces the wire ids with UUIDs, reported separately as https://github.com/BerriAI/litellm/issues/46543. Closed upstream on 2026-11-09: https://github.com/BerriAI/litellm/pull/49183 gives each streamed tool call its own index on main, and the backport https://github.com/BerriAI/litellm/pull/50718 is merged to lts/1.108.x but not in a release yet (v1.108.4 predates it). The cell stays WRONG until the replaced ids (https://github.com/BerriAI/litellm/issues/46543) are fixed too.

reported Issue

Fixed in: not specified

The native Ollama streaming parser replaces each tool-call id that Ollama sends with a random UUID once the arguments look complete (https://github.com/BerriAI/litellm/blob/v1.105.1/litellm/llms/ollama/chat/transformation.py#L480-L489). Separate from the index-0 merge in https://github.com/BerriAI/litellm/issues/33678; fixing that one alone leaves the ids wrong.

History

VersionGrade
1.105.5✗ WRONG
1.105.1✗ WRONG