IsUserDefinedModel reports whether the model is a user-defined model that should have thinking configuration passed through without validation. User-defined models are configured via config file's models[] array (e.g., openai-compatibility.*.models[], *-api-key.models[]). These models are marked wi
(modelInfo *registry.ModelInfo)
| 118 | // User-defined models should have their thinking configuration applied directly, |
| 119 | // letting the upstream service validate the configuration. |
| 120 | func IsUserDefinedModel(modelInfo *registry.ModelInfo) bool { |
| 121 | if modelInfo == nil { |
| 122 | return true |
| 123 | } |
| 124 | return modelInfo.UserDefined |
| 125 | } |
| 126 | |
| 127 | // ApplyThinking applies thinking configuration to a request body. |
| 128 | // |