Skip to content
TheChatArchiveThe Chat Archive
gpt-5.6-sol· openaiHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Subagent toolcalls not handled when using LiteLLM proxy Summary When using cagent with a…

  1. User

    Subagent tool_calls not handled when using LiteLLM proxy

    Summary

    When using cagent with a LiteLLM proxy (OpenAI-compatible API), a subagent can return a valid tool_calls response, but the host agent reports “no response from subagent” and does not execute the tool call.

    Environment

    • cagent: v1.19.7
    • OS: Linux (WSL2) x86_64
    • LLM: gemini-pro via LiteLLM proxy (OpenAI-compatible)

    Expected

    Host agent receives the subagent response and executes the tool call(s), then continues the conversation with the tool result.

    Actual

    Host agent reports there is “no response from subagent” even though the subagent response contains a valid tool_calls entry. The requested tool call is not executed.

    Minimal reproduction

    1. Configure cagent to use LiteLLM as the model provider (OpenAI-compatible API).
    2. Run a workflow where the subagent is asked to use tools.
    3. The subagent returns a tool call (e.g., company_search with JSON arguments) and finishes with finish_reason: "stop".
    4. The host agent logs “no response from subagent” and does not invoke the tool.

    Notes

    • The subagent response includes a valid tool call object (type: function, name: company_search, arguments: {"datasources": ["confluence", "github", "gdrive"], "query": "LiteLLM usage teams integrations standards"}).
    • I can reproduce consistently with LiteLLM as the proxy in front of an OpenAI-compatible endpoint.

    Please let me know if you want a sanitized example payload or a minimal agent config.

    Interface

    No new interfaces are introduced.

  2. Assistant

    I’ll trace the OpenAI-compatible response conversion and subagent execution path, then add a focused regression test before running the project checks.

  3. Assistant

    rg isn’t installed in this checkout, so I’m switching to a scoped recursive search and keeping the inspection read-only.

  4. Assistant

    The failure is in stream aggregation: it handles finish_reason: "stop" before reading tool calls from that same chunk. LiteLLM can legally place both together, so the response is discarded as empty. I’m adjusting that ordering and adding the exact combined-chunk regression case.

  5. Assistant

    The first test run hit the container’s process limit while compiling dependencies, not a code failure. I’m rerunning with constrained Go parallelism, which avoids that environmental ceiling.

  6. Assistant

    The focused regression now passes. The test verifies the assistant message retains the tool call, normalizes the misleading stop reason to tool_calls, and reaches dispatch instead of being treated as no output. I’m moving through the repository-wide test, build, and lint gates now.

  7. Assistant

    The repository’s task runner is not installed in this environment. I’ll execute the underlying commands from Taskfile.yml directly, with constrained compiler parallelism.

  8. Assistant

    The unconstrained full-suite rerun exposed why the project’s test task clears provider credentials: ambient model-provider settings changed the model catalog and broke unrelated example validation. I’m rerunning with the exact .env.test isolation specified by the repository.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.