@@ -45,50 +45,39 @@ export class AgentConfigProvider {
4545
4646 /**
4747 *
48- * - executor-vlm: VLM_API_KEY, VLM_BASE_URL, VLM_MODEL
49- * - action-summarizer: CLAUDE_API_KEY, CLAUDE_BASE_URL, CLAUDE_SMALL_MODEL
50- * - Other Agent: CLAUDE_API_KEY, CLAUDE_BASE_URL, CLAUDE_MODEL
48+ * All graph agents use the same OpenAI-compatible model config:
49+ * - VLM_API_KEY
50+ * - VLM_BASE_URL
51+ * - VLM_MODEL
5152 *
5253 */
5354 async getModelConfig ( agentName : AgentName , region = "CN" ) : Promise < ModelConfig > {
5455 const config = await this . getConfig ( agentName , region ) ;
5556
56- const isVLM = agentName === AgentName . EXECUTOR_VLM ;
57- const isSmall = agentName === AgentName . ACTION_SUMMARIZER ;
57+ const apiKey = this . configService . get < string > ( "VLM_API_KEY" ) ;
58+ const baseURL = this . configService . get < string > ( "VLM_BASE_URL" ) ;
59+ const model = this . configService . get < string > ( "VLM_MODEL" ) ;
5860
59- const apiKey = isVLM
60- ? this . configService . get < string > ( "VLM_API_KEY" )
61- : this . configService . get < string > ( "CLAUDE_API_KEY" ) ;
62- const baseURL = isVLM
63- ? this . configService . get < string > ( "VLM_BASE_URL" )
64- : this . configService . get < string > ( "CLAUDE_BASE_URL" ) ;
65- const envModel = isVLM
66- ? this . configService . get < string > ( "VLM_MODEL" )
67- : isSmall
68- ? this . configService . get < string > ( "CLAUDE_SMALL_MODEL" )
69- : this . configService . get < string > ( "CLAUDE_MODEL" ) ;
70-
71- const model = envModel ;
7261
7362 if ( ! apiKey ) {
7463 throw new Error (
7564 `API key not configured for agent: ${ agentName } . ` +
76- ` Set ${ isVLM ? " VLM_API_KEY" : "CLAUDE_API_KEY" } in .env` ,
65+ " Set VLM_API_KEY in .env" ,
7766 ) ;
7867 }
7968
8069 if ( ! model ) {
8170 throw new Error (
8271 `Model not configured for agent: ${ agentName } . ` +
83- ` Set ${ isVLM ? " VLM_MODEL" : "CLAUDE_MODEL" } in .env` ,
72+ " Set VLM_MODEL in .env" ,
8473 ) ;
8574 }
8675
8776 return {
8877 model,
8978 apiKey,
9079 baseURL : baseURL || undefined ,
91- fallbackModel : config . fallbackModel ?? undefined ,
80+ fallbackModel : model ,
9281 temperature : config . temperature ?? undefined ,
9382 maxTokens : config . maxTokens ?? undefined ,
9483 topP : config . topP ?? undefined ,
0 commit comments