Core configuration management for API keys, environment, and runtime settings.
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import dotenv from "dotenv";
import YAML from "yaml";
import { findWorkspaceRoot } from "./utils.js";
export type LlmProtocol = "openai" | "anthropic";
/**
* AI runner type - determines which CLI tool to use for AI execution
*/
export type RunnerType = "opencode" | "claude-code";
export interface LlmConfig {
baseUrl: string;
apiKey: string;
model: string;
protocol: LlmProtocol;
maxTokens: number;
temperature: number;
timeoutMs: number;
authHeader?: string;
authScheme?: string;
extraHeaders?: Record<string, string>;
/**
* Per-checkpoint model overrides. The key is the checkpoint id (e.g.
* "l3_gen", "l4_gen", "implementation") and the value is a model slug
* supported by the
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key