import { runWithAnthropic } from './anthropic-runner.js';
import { runWithOpenAI } from './openai-runner.js';
export async function runWithProvider(prompt, agent, cwd, spawnClaudeCode) {
    switch (agent.provider) {
        case 'anthropic':
            return runWithAnthropic(prompt, agent.model);
        case 'openai':
            return runWithOpenAI(prompt, agent.model);
        default:
            // 'claude-code' or undefined
            return spawnClaudeCode(prompt, cwd);
    }
}
