Skip to content

Fast-coding pool returns malformed tool_calls responses #124

Description

@stgreenb

Summary

Models in the fast-coding pool (routeway/deepseek-v4-flash:free, nvidia/kimi-k2.6:free, openrouter/kimi-k2.6:free) return malformed responses when the client includes tool definitions in the request.

Observed Behavior

When a request includes a tools array (OpenAI-compatible), the fast-coding pool models respond with finish_reason: "tool_calls" but the message object does NOT contain a tool_calls array.

Expected Behavior

Either return a valid tool_calls array with function call arguments, or return finish_reason: "stop" if the model does not support tool calling.

Impact

Breaks client-side structured output capture. Pi agents on the fast-coding pool hang because they see finish_reason: "tool_calls" and wait for a tool_calls payload that never arrives.

Workaround

Use the default pool (model: "fcm:default") which handles tool calls correctly.

Steps to Reproduce

  1. POST to FCM endpoint with tools array
  2. Observe finish_reason: "tool_calls" with no tool_calls array in message

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions