mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 18:50:33 +00:00
Some o-series models will raise a 400 error for `"role": "system"` (`o1-mini` and `o1-preview` will raise, `o1` and `o3-mini` will not). Here we update `ChatOpenAI` to update the role to `"developer"` for all model names matching `^o\d`. We only make this change on the ChatOpenAI class (not BaseChatOpenAI).