Skip to content

[BUG CLIENT]: Tool choice required can hang indefinitely for some models #474

@louis-sanna-dev

Description

@louis-sanna-dev

This issue is to track a separate problem from the previously discussed client/event-loop behavior.

Separately, the server-side request appears to hang indefinitely for some models when using tool calling with tool_choice="required".

Repro:

await client.chat.complete_async(
    model="mistral-small-latest",  # or "mistral-vibe-cli-fast"
    messages=[{"role": "user", "content": "Say hello."}],
    tools=[{"type": "function", "function": {"name": "f", "parameters": {"type": "object"}}}],
    tool_choice="required",
    timeout_ms=120000,
)

Observed behavior:

  • The request does not complete.
  • With timeout_ms=120000, the client eventually raises ReadTimeout after 120 seconds.
  • The server never seems to return a response for this payload.

Expected behavior:

  • Either a normal tool-call response is returned quickly, or the API rejects the request explicitly.
  • It should not hang indefinitely until the client-side timeout is reached.

Notes:

  • Affected models observed so far: mistral-small-latest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions