Skip to content

Does O3 model usage allow functions? 'messages[59].role' does not support 'function' #717

@DanijelDomazet

Description

@DanijelDomazet

I'm trying to use o3 model and it works OK with --model o3 --temperature 1.

However, seems like the function usage is problematic.

For example "List me files in tmp directory" successfully executes ls -al /tmp, but then before commenting anything, it fails with:

BadRequestError: Error code: 400 - 
{'error': 
{'message': "Unsupported value: 'messages[59].role' does not support 'function' with this model.", 'type': 'invalid_request_error', 'param': 'messages[59].role', 
'code': 'unsupported_value'}}

The roles I see used are "user" for questions, and "assistant" for answers. Does this error mean that I have to set the role to something else?

Note, I've used functions with --model gpt-4o without problems.

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