INNER CODE UNIT · TypeScript

getModelForAgent

ZaxbyHub/opencode-swarm · src/agents/index.ts:165

function getModelForAgent(
	agentName: string,
	swarmAgents?: Record<
		string,
		{
			model?: string;
			temperature?: number;
			disabled?: boolean;
			fallback_models?: string[];
		}
	>,
	swarmPrefix?: string,
	quiet?: boolean,
): string {
	// Strip the user-configured swarm prefix to get the canonical role
	// (e.g., "banana_coder" with swarmPrefix="banana" -> "coder").
	const baseAgentName = stripSwarmPrefix(agentName, swarmPrefix);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…