Skip to content

[Bug]: LiteLLM pin 1.102.4 drops narrated tool calls on the Responses bridge; please raise to >=1.103.3 (ideally 1.108.x) #7304

Closed

Description

@ragnos-dev

Summary

pyproject.toml pins litellm>=1.102.4,<1.102.5 (from #7025, still the same on main and in v0.5.4). In that LiteLLM version, the non-streaming Responses-API bridge splits a turn where the model writes text and then calls a tool into two chat choices: text in choices[0] with finish_reason="stop", and the function call in choices[1] (BerriAI/litellm#43316). OpenViking's LiteLLM backend reads only choices[0], so the tool call is lost.

Versions

  • OpenViking core v0.5.3, with bot/vikingbot/compile from main at 4b92b3065
  • LiteLLM 1.102.4 (OpenViking's pin)
  • Provider litellm, an OpenAI model served through the Responses API (gpt-6.1-terra), non-streaming, tools enabled

Reproduction

  1. Configure vlm.provider: litellm with a model that LiteLLM routes through its Responses bridge.
  2. Send one non-streaming completion with tools where the model narrates before calling a tool (for example a Compile Reduce turn that says what it will write, then calls emit).
  3. Inspect the LiteLLM response: len(response.choices) == 2; choices[0] has text and finish_reason="stop"; choices[1] has the tool_calls.
  4. Send the same request with stream=True: the tool call arrives normally.

Observed

  • LiteLLMVLMProvider._build_vlm_response (openviking/models/vlm/backends/litellm_vlm.py, choice = response.choices[0]) returns text with no tool calls.
  • The Compile agent loop sees a plain-text turn, the job ends "Required agent transform ended without validated output", and the batch fails. This was the root cause of the missing-emit failures we had first attributed to the shape tracked in fix(compile): preserve full evidence and recover unfinished workers #7124.

Expected

The tool call is returned to the agent loop whether or not the response is streamed.

Upstream fix

Workaround we use

We route the Compile model through OpenViking's own Responses adapter instead of the litellm provider. After that change, the narrated-tool-call failures stopped.

Ask

One of:

  1. Raise the LiteLLM pin to at least 1.103.3, preferably the 1.108.x line so both fixes are included; or
  2. In _build_vlm_response, collect tool_calls from every choice (and join text) instead of reading only choices[0], which also guards against other providers that split choices.

Happy to test a candidate pin against the same Compile workload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions