INNER CODE UNIT · TypeScript
match
ZaxbyHub/opencode-swarm · src/agents/index.ts:158
const match = agentName.match(/^([^_]+)_/);
return match ? match[1] : undefined;
}
/**
* Get the model for an agent within a specific swarm config
*/
function getModelForAgent(
agentName: string,
swarmAgents?: Record<
string,
{
model?: string;
temperature?: number;
disabled?: boolean;
fallback_models?: string[];
}
>,