File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,13 @@ func applyProviderDefaults(config *wconfig.AIModeConfigType) {
6161 if config .APITokenSecretName == "" {
6262 config .APITokenSecretName = "OPENAI_KEY"
6363 }
64+ if len (config .Capabilities ) == 0 {
65+ if isO1Model (config .Model ) {
66+ config .Capabilities = []string {}
67+ } else {
68+ config .Capabilities = []string {uctypes .AICapabilityTools , uctypes .AICapabilityImages , uctypes .AICapabilityPdfs }
69+ }
70+ }
6471 }
6572 if config .Provider == uctypes .AIProvider_OpenRouter {
6673 if config .Endpoint == "" {
@@ -176,6 +183,19 @@ func isLegacyOpenAIModel(model string) bool {
176183 return false
177184}
178185
186+ func isO1Model (model string ) bool {
187+ if model == "" {
188+ return false
189+ }
190+ o1Prefixes := []string {"o1" , "o1-mini" }
191+ for _ , prefix := range o1Prefixes {
192+ if aiutil .CheckModelPrefix (model , prefix ) {
193+ return true
194+ }
195+ }
196+ return false
197+ }
198+
179199func isValidAzureResourceName (name string ) bool {
180200 if name == "" || len (name ) > 63 {
181201 return false
You can’t perform that action at this time.
0 commit comments