import type { Summarizer } from "./summarize.js"; import type { Synthesizer } from "./synthesize.js"; import type { CruxSummarizer } from "./crux.js"; import type { ChatModel } from "./llm/types.js"; import type { ProviderKind } from "./llm/factory.js"; /** * User-facing configuration. Anything omitted falls back to environment * variables and then to sensible defaults. * * graft is vendor-neutral: `provider` names only the WIRE FORMAT, not a company. * `openai` speaks the OpenAI-compatible API — point `baseUrl` at OpenRouter, * Fireworks, a LiteLLM proxy, Groq, a local server, or OpenAI itself, and pass * your own key. `anthropic` speaks the native Messages API. Any LLM-backed * operation needs an API key. */ export interface EngineConfig { /** Where the graph lives. Env: GRAFT_DIR. Default: `/.context`. */ contextDir?: string; /** Wire format / SDK. Env: GRAFT_PROVIDER. Default: `openai`. */ provider?: ProviderKind; /** API key for the chosen provider. Env: GRAFT_API_KEY (legacy: OPENROUTER_API_KEY). */ apiKey?: string; /** Model id. Env: GRAFT_MODEL. Provider-specific default. */ model?: string; /** Base URL for OpenAI-compatible endpoints. Env: GRAFT_BASE_URL. */ baseUrl?: string; /** Override the whole transport (skips provider/apiKey/baseUrl). */ chatModel?: ChatModel; /** Override the synthesizer. */ synthesizer?: Synthesizer; /** Override the code summarizer. */ summarizer?: Summarizer; /** Override the per-symbol crux summarizer. */ cruxSummarizer?: CruxSummarizer; } /** Fully-resolved configuration with all defaults applied. */ export interface ResolvedConfig { contextDir?: string; provider: ProviderKind; apiKey?: string; model: string; baseUrl?: string; headers?: Record; /** True when the key came from the deprecated OPENROUTER_* fallback. */ usedLegacyEnv: boolean; chatModel?: ChatModel; synthesizer?: Synthesizer; summarizer?: Summarizer; cruxSummarizer?: CruxSummarizer; } /** Per-provider default model. */ export declare const DEFAULT_MODELS: Record; export declare const DEFAULTS: { readonly provider: ProviderKind; readonly model: string; }; /** Merge user config with environment variables and defaults. */ export declare function resolveConfig(config?: EngineConfig): ResolvedConfig; //# sourceMappingURL=providers.d.ts.map