UsesResponsesOptions reports whether the model should use OpenAI Responses API provider options.
(model fantasy.LanguageModel)
| 122 | // UsesResponsesOptions reports whether the model should use OpenAI Responses |
| 123 | // API provider options. |
| 124 | func UsesResponsesOptions(model fantasy.LanguageModel) bool { |
| 125 | if model == nil { |
| 126 | return false |
| 127 | } |
| 128 | switch model.Provider() { |
| 129 | case fantasyopenai.Name, fantasyazure.Name: |
| 130 | return fantasyopenai.IsResponsesModel(model.Model()) |
| 131 | default: |
| 132 | return false |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | // ReasoningEffortFromChat normalizes chat-config reasoning effort values for |
| 137 | // OpenAI and returns the canonical provider effort value. |