INNER CODE UNIT · TypeScript

getModel

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

	const getModel = (baseName: string) =>
		getModelForAgent(baseName, swarmAgents, swarmPrefix, quiet);

	// Helper to load custom prompts
	const getPrompts = (name: string) => loadAgentPrompt(name);

	// Emit a gated-agent advisory (deduped across swarms within a single
	// createAgents call). Issue #1914 Defect 3. Mirrors the quiet-ternary
	// pattern used by the council moderator deprecation advisory (~L795).
	const emitGatedAgentAdvisory = (msg: string): void => {
		if (_emittedGatedAgentAdvisories.has(msg)) return;
		_emittedGatedAgentAdvisories.add(msg);
		if (quiet) {
			addDeferredWarning(msg);
		} else {
			advisoryWarn(msg);
		}
	};

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…