UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio

77 lines (76 loc) 2.79 kB
/** * ThinkingConfig utility functions for constructing thinking configuration objects. * * This module provides helper functions to create thinkingConfig objects consistently * across the codebase, reducing duplication in CLI and providers. */ import type { ThinkingLevel, ThinkingConfig, CreateThinkingConfigOptions, NativeThinkingConfig } from "../types/index.js"; /** * Default token budget for thinking operations */ export declare const DEFAULT_THINKING_BUDGET_TOKENS = 10000; /** * Default thinking level for Gemini 3 models */ export declare const DEFAULT_THINKING_LEVEL: ThinkingLevel; /** * Creates a thinkingConfig object from CLI-style options. * * This helper consolidates the pattern used in CLI command handlers * to convert simple CLI flags into the full thinkingConfig structure. * * @param options - CLI-style options with thinking, thinkingBudget, thinkingLevel * @returns ThinkingConfig object or undefined if thinking is not enabled * * @example * ```typescript * // From CLI options * const config = createThinkingConfig({ * thinking: true, * thinkingBudget: 15000, * thinkingLevel: "high" * }); * // Returns: { enabled: true, budgetTokens: 15000, thinkingLevel: "high" } * ``` */ export declare function createThinkingConfig(options: CreateThinkingConfigOptions): ThinkingConfig | undefined; /** * Creates a thinkingConfig from record-style options (useful for CLI handlers). * * This handles the type casting that's commonly needed when working with * CLI argument records. * * @param options - Record-style options from CLI argv * @returns ThinkingConfig object or undefined if thinking is not enabled * * @example * ```typescript * const config = createThinkingConfigFromRecord(argv as Record<string, unknown>); * ``` */ export declare function createThinkingConfigFromRecord(options: Record<string, unknown>): ThinkingConfig | undefined; /** * Creates thinkingConfig for native Gemini SDK (not AI SDK). * * This is used for direct calls to the Gemini SDK where the config * structure is different from the AI SDK providerOptions. * * @param config - The thinkingConfig from options * @returns NativeThinkingConfig object or undefined * * @example * ```typescript * const nativeConfig = createNativeThinkingConfig(options.thinkingConfig); * if (nativeConfig) { * sdkConfig.thinkingConfig = nativeConfig; * } * ``` */ export declare function createNativeThinkingConfig(config: ThinkingConfig | undefined): NativeThinkingConfig | undefined; /** * Checks if thinkingConfig should be applied based on options. * * @param config - The thinkingConfig from options * @returns true if thinking should be enabled */ export declare function shouldEnableThinking(config: ThinkingConfig | undefined): boolean;