11import { AgentIcon } from '@/components/icons'
22import { isHosted } from '@/lib/environment'
33import { createLogger } from '@/lib/logs/console-logger'
4- import { MODELS_TEMP_RANGE_0_1 , MODELS_TEMP_RANGE_0_2 } from '@/providers/model-capabilities'
5- import { getAllModelProviders , getBaseModelProviders } from '@/providers/utils'
4+ import {
5+ getAllModelProviders ,
6+ getBaseModelProviders ,
7+ getHostedModels ,
8+ MODELS_TEMP_RANGE_0_1 ,
9+ MODELS_TEMP_RANGE_0_2 ,
10+ providers ,
11+ } from '@/providers/utils'
612import { useOllamaStore } from '@/stores/ollama/store'
713import type { ToolResponse } from '@/tools/types'
814import type { BlockConfig } from '../types'
@@ -121,29 +127,11 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
121127 placeholder : 'Enter your API key' ,
122128 password : true ,
123129 connectionDroppable : false ,
124- // Hide API key for all OpenAI and Claude models when running on hosted version
130+ // Hide API key for all hosted models when running on hosted version
125131 condition : isHosted
126132 ? {
127133 field : 'model' ,
128- // Include all OpenAI models and Claude models for which we don't show the API key field
129- value : [
130- // OpenAI models
131- 'gpt-4o' ,
132- 'o1' ,
133- 'o1-mini' ,
134- 'o1-preview' ,
135- 'o3' ,
136- 'o3-preview' ,
137- 'o4-mini' ,
138- 'gpt-4.1' ,
139- 'gpt-4.1-nano' ,
140- 'gpt-4.1-mini' ,
141- // Claude models
142- 'claude-sonnet-4-0' ,
143- 'claude-opus-4-0' ,
144- 'claude-3-7-sonnet-latest' ,
145- 'claude-3-5-sonnet-latest' ,
146- ] ,
134+ value : getHostedModels ( ) ,
147135 not : true , // Show for all models EXCEPT those listed
148136 }
149137 : undefined , // Show for all models in non-hosted environments
@@ -158,7 +146,7 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
158146 connectionDroppable : false ,
159147 condition : {
160148 field : 'model' ,
161- value : [ 'azure/gpt-4o' , 'azure/o3' , 'azure/o4-mini' , 'azure/gpt-4.1' , 'azure/model-router' ] ,
149+ value : providers [ 'azure-openai' ] . models ,
162150 } ,
163151 } ,
164152 {
@@ -170,7 +158,7 @@ export const AgentBlock: BlockConfig<AgentResponse> = {
170158 connectionDroppable : false ,
171159 condition : {
172160 field : 'model' ,
173- value : [ 'azure/gpt-4o' , 'azure/o3' , 'azure/o4-mini' , 'azure/gpt-4.1' , 'azure/model-router' ] ,
161+ value : providers [ 'azure-openai' ] . models ,
174162 } ,
175163 } ,
176164 {
0 commit comments