Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions web/components/providers/imc-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,23 +169,23 @@ export default function InterModuleCommunicationProvider({
throw new Error("Agent method not found.");
}

const config = llmConfig
? llmConfig
: method.LLMConfig
? method.LLMConfig
: agent.LLMConfig
? agent.LLMConfig
: undefined; // TODO: use editor level default config -- getDefaultLLMConfig();

if (!config) {
throw new Error("No LLM config found for this agent method.");
}

if (editorContext?.persistSettings?.isUseManagedCloud) {
const result = await runAgentMethodCloud(agent, methodName, args);

return result;
} else {
const config = llmConfig
? llmConfig
: method.LLMConfig
? method.LLMConfig
: agent.LLMConfig
? agent.LLMConfig
: undefined; // TODO: use editor level default config -- getDefaultLLMConfig();

if (!config) {
throw new Error("No LLM config found for this agent method.");
}

const provider = config.provider;

const apiKey = getAPIKey(editorContext, provider);
Expand Down