default-config.ts 930 Bytes
import type { AiModelConfig } from './types.js';

/**
 * Internal default configuration shipped with the module.
 *
 * Resolution order in completeChat:
 *   1. per-call opts.config        (highest precedence)
 *   2. caller-set default          (setDefaultModelConfig)
 *   3. THIS internal config file   (fallback)
 *
 * When a caller supplies nothing at all, completeChat falls back to these
 * values. To talk to a real endpoint, either edit this file or pass a config
 * explicitly — credentials are NEVER read from environment variables.
 *
 * apiKey is intentionally empty here: a bare completeChat() against an
 * unconfigured key would be meaningless, so resolveConfig throws a clear
 * "missing apiKey" error instead of silently hitting an endpoint.
 */
export const DEFAULT_MODEL_CONFIG: AiModelConfig = {
    modelName: 'gpt-4o',
    apiKey: '',
    baseUrl: undefined,
    temperature: 0.1,
    maxTokens: 4096,
};