File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -169,23 +169,23 @@ export default function InterModuleCommunicationProvider({
169169 throw new Error ( "Agent method not found." ) ;
170170 }
171171
172- const config = llmConfig
173- ? llmConfig
174- : method . LLMConfig
175- ? method . LLMConfig
176- : agent . LLMConfig
177- ? agent . LLMConfig
178- : undefined ; // TODO: use editor level default config -- getDefaultLLMConfig();
179-
180- if ( ! config ) {
181- throw new Error ( "No LLM config found for this agent method." ) ;
182- }
183-
184172 if ( editorContext ?. persistSettings ?. isUseManagedCloud ) {
185173 const result = await runAgentMethodCloud ( agent , methodName , args ) ;
186174
187175 return result ;
188176 } else {
177+ const config = llmConfig
178+ ? llmConfig
179+ : method . LLMConfig
180+ ? method . LLMConfig
181+ : agent . LLMConfig
182+ ? agent . LLMConfig
183+ : undefined ; // TODO: use editor level default config -- getDefaultLLMConfig();
184+
185+ if ( ! config ) {
186+ throw new Error ( "No LLM config found for this agent method." ) ;
187+ }
188+
189189 const provider = config . provider ;
190190
191191 const apiKey = getAPIKey ( editorContext , provider ) ;
You can’t perform that action at this time.
0 commit comments