O3-mini API with tools only ever returns 1 tool no matter prompt

Hi,

We’ve been playing with o3-mini the last few days. In the playground and in our API we can never get o3-mini to produce more than one tool-call response no matter the functions, tool_choice or reasoning. Is it intentional that o3-mini can only return one tool per API call

Thanks for all the help!

2 Likes

Same problem. Makes it hard to migrate from 4o-mini

2 Likes

o3-mini tool use is a known issue and is being worked on, thanks for taking the time to flag.

4 Likes

Yep, even with a “strict”:“false” function, the AI model just is unable to comply no matter how clear the understanding, because:

This is a tool wrapper that low-iq models have a bad history with…


An alternate strategy is to have a function with an array of the API objects you need, of undetermined length:

This is the function to implement this.

{
  "name": "roll_dice",
  "description": "Rolls true random dice, supporting multiple dice rolls, returning totals of one trial",
  "strict": true,
  "parameters": {
    "type": "object",
    "required": [
      "trials"
    ],
    "properties": {
      "trials": {
        "type": "array",
        "description": "Array of trials for rolling dice",
        "items": {
          "type": "object",
          "properties": {
            "rolls": {
              "type": "number",
              "description": "The number of dice to roll"
            },
            "sides": {
              "type": "number",
              "description": "The number of sides on each die"
            }
          },
          "required": [
            "rolls",
            "sides"
          ],
          "additionalProperties": false
        }
      }
    },
    "additionalProperties": false
  }
}
1 Like

Out of curiosity, how did you find this out Foxalabs?

I have made a similar post with other problems it is having with tool calls (I cant post links even to this same forum :skull:):

1 Like

Foxalabs is a moderator here and we chat with him regularly (if you reach trust level 4, you can become a moderator too) .

3 Likes

Just been playing with o4-mini in the playground. I’m sstill struggling with it returning more than one tool. Is this an issue for the new reasoning models?

1 Like

Ran into this as well today on o4-mini

The ability to call multiple user tools in parallel is either there – or not.

Parallel tool use also has had complications with “strict” structured output functions.

How does it work? A special tool is placed, alongside the “functions” tool: a recipient for processing those parallel function calls.

This is how it looks to the AI on gpt-4.1-mini on the Chat Completions endpoint:

This is the availability of such to the o4-mini API model:

No wrapper for making parallel function calls. Thus multiple iterations to your API backend and input billing for each context use for individual function calls on Chat Completions (but a token savings by not having that additional tool always there).

You can see above I had to fill in two separate function calls to get my “parallel” use needs.

That same prompt with o4-mini on Responses put the internal iterator into a loop, returning a single function call only after 3354 output tokens. Then failure returning the single function’s value - because apparently the Responses Playground is trying to now resend and rebloat context with a prior reasoning message ID in the messages list with tool return also, needing the same state storage as reusing a response ID - prior response ID which it doesn’t do.

If one is anointed from on high, you mean :grinning_face: Are you handing those out without any obligation to check a moderator inbox?