Skip to main content

Function: buildSplitCallers()

buildSplitCallers(plannerOptions, executionOptions?): Promise<{ executionCaller: (system, user) => Promise<string>; executionModel: string; plannerCaller: (system, user) => Promise<string>; plannerModel: string; }>

Defined in: packages/agentos/src/orchestration/planning/buildLlmCaller.ts:139

Build separate planner and execution callers with potentially different providers.

Parameters

plannerOptions

BuildLlmCallerOptions

Options for the ToT planning model (strong reasoning).

executionOptions?

BuildLlmCallerOptions

Options for agent node execution (can be different).

Returns

Promise<{ executionCaller: (system, user) => Promise<string>; executionModel: string; plannerCaller: (system, user) => Promise<string>; plannerModel: string; }>

Object with plannerCaller and executionCaller.

Example

const { plannerCaller, executionCaller } = await buildSplitCallers(
{ provider: 'claude-code-cli', model: 'claude-opus-4-6' }, // Strong for planning
{ provider: 'openai', model: 'gpt-4o' }, // Fast for execution
);

const planner = new MissionPlanner({
llmCaller: executionCaller,
plannerLlmCaller: plannerCaller,
plannerModel: 'claude-opus-4-6',
executionModel: 'gpt-4o',
...
});