import { createParacosmClient } from 'paracosm';
const client = createParacosmClient({
provider: 'openai',
costPreset: 'economy',
models: { departments: 'gpt-5.4' }, // pin only departments to flagship
});
const scenario = await client.compileScenario(worldJson);
const out = await client.runSimulation(leader, [], { maxTurns: 6, seed: 42 });
// Per-call override wins over client defaults:
const quality = await client.runSimulation(leader, [], {
maxTurns: 8, seed: 42,
costPreset: 'quality', // promote this one run to flagship
});
Create a Paracosm client with pinned defaults. Env vars are read once at construction; subsequent
process.envmutations won't retrigger.