Does magentic support o1 and o1-mini models?
Hi,
I was trying to use these models today while generating structured output with OpenaiChatModel. But, I ran into issues as these models do not support the same range of parameters as older models like gpt-4. Thus magentic breaks quite heavily.
Notably, the o1 models don't:
- support to set
max_tokens(aside from setting it to 1) - allow the
parallel_tool_calls parameter - support
tools
Right now all structured output in magentic uses tool calls which these models don't support. o1 (but not o1-mini I think) supports openai's structured outputs, which magentic should really be using in the case where a single structured output is desired (no union in return type and no functions provided). Issue for that is #295 Apart from that, I think we just have to wait for openai to add support for tools. The parallel_tool_calls and max_tokens parameters could be optionally omitted.
https://platform.openai.com/docs/guides/structured-outputs#supported-models
@jackmpcollins It looks like o3-mini now supports function calls -- https://platform.openai.com/docs/models#o3-mini
These models also use developer messages rather than system messages (which are now deprecated iiuc) -- not sure if magentic under-the-hood still relies on those?
Exciting times!