Skip to content

[BUG] Models - Mistral - Multiple Tool Calls #374

Open
@pgrayy

Description

@pgrayy

Checks

  • I have updated to the lastest minor and patch version of Strands
  • I have checked the documentation and this is not expected behavior
  • I have searched ./issues and there are no duplicates of my issue

Strands Version

0.2.1

Python Version

+3.10

Operating System

Linux

Installation Method

pip

Steps to Reproduce

Run hatch test tests-integ/test_model_mistral.py with the multi-tool tests uncommented.

Expected Behavior

Mistral can successfully stream multiple tool calls at once.

Actual Behavior

Only 1 tool call is successfully reported to the agent.

Additional Context

Mistral is streaming its tool events out of order. All tool stop events are reported together (here). process_stream expects a tool call to stream all its events before the next tool call is reported.

Possible Solution

See the OpenAIModel provider implementation for an example on how to handle tool call event ordering.

Related Issues

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions