import { NexusAI } from './nexus.js'; import type { NexusAIConfig, ProvidersConfig } from '../types/config.js'; /** Providers the `createNexus()` shorthand can configure by name. */ export type CreateNexusProvider = 'openai' | 'anthropic' | 'google' | 'ollama' | 'groq' | 'mistral' | 'cohere' | 'openrouter' | 'deepseek' | 'azureOpenAI' | 'lmstudio' | 'llamaCpp'; /** * Options for `createNexus()`: the full configuration, or a one-provider shorthand whose * credentials fall back to the provider's usual environment variables. */ export interface CreateNexusOptions extends Omit, 'providers'> { /** Providers, as in the full configuration. Merged with the shorthand provider. */ providers?: ProvidersConfig; /** The one provider to configure. */ provider?: CreateNexusProvider; /** Its API key. Defaults to the provider's environment variable, such as `OPENAI_API_KEY`. */ apiKey?: string; /** Its base URL, for a proxy or a compatible server. */ baseUrl?: string; /** Azure OpenAI endpoint. Defaults to `AZURE_OPENAI_ENDPOINT`. */ endpoint?: string; /** Azure OpenAI deployment. Defaults to `AZURE_OPENAI_DEPLOYMENT`. */ deployment?: string; /** Azure OpenAI API version. Defaults to `AZURE_OPENAI_API_VERSION`. */ apiVersion?: string; /** The default model. Also switches routing to `direct` unless routing is configured. */ model?: string; } /** * Creates a `NexusAI` instance from either the full production config or a small beginner shorthand. * * Use the full `NexusAIConfig` when you need routing, retries, budgets, hooks, or multiple providers. * Use the shorthand when you only want one provider and one model. * * @example * ```ts * const ai = createNexus({ * provider: 'openai', * apiKey: process.env.OPENAI_API_KEY!, * model: 'gpt-5.4-mini', * }); * ``` */ export declare function createNexus(config?: NexusAIConfig | CreateNexusOptions): NexusAI; /** * Converts the beginner shorthand accepted by `createNexus()` into a normal `NexusAIConfig`. */ export declare function normalizeCreateNexusConfig(config: NexusAIConfig | CreateNexusOptions): NexusAIConfig;