@launchdarkly/server-sdk-ai-vercel - v0.7.35
    Preparing search index...

    Class VercelRunnerFactory

    Factory for creating Vercel AI runners.

    Vercel ships only a model runner; agent and graph runners are not provided because the Vercel AI SDK is a thin model layer rather than an agent framework.

    Hierarchy

    • AIProvider
      • VercelRunnerFactory
    Index
    _logger?: LDLogger
    • Create a Runner for an agent AI Config.

      Override in provider subclasses to return a configured Runner. Default implementation returns undefined.

      Parameters

      • _config: LDAIAgentConfig
      • Optional_tools: ToolRegistry

      Returns Promise<Runner | undefined>

      Promise resolving to a Runner, or undefined if this provider does not support agent creation.

    • Create an AgentGraphRunner for an agent graph definition.

      Override in provider subclasses to return a configured AgentGraphRunner. Default implementation returns undefined.

      Parameters

      • _graphDef: AgentGraphDefinition
      • Optional_tools: ToolRegistry

      Returns Promise<AgentGraphRunner | undefined>

      Promise resolving to an AgentGraphRunner, or undefined if this provider does not support graph execution.

    • Create a model runner from a completion AI configuration.

      Parameters

      • config: LDAICompletionConfig

        The completion (or judge) AI configuration.

      • multiTurn: boolean = true

        Whether the runner should accumulate conversation history across successive run() calls. Defaults to true (chat semantics). Pass false for stateless runners such as judges.

      Returns Promise<VercelModelRunner>

    • Create a Vercel AI model from an AI configuration. This method auto-detects the provider and creates the model instance.

      Parameters

      • aiConfig: LDAIConfig

      Returns Promise<LanguageModel>

    • Map LaunchDarkly model parameters to Vercel AI SDK parameters.

      Parameter mappings:

      • max_tokens -> maxTokens
      • max_completion_tokens -> maxOutputTokens
      • temperature -> temperature
      • top_p -> topP
      • top_k -> topK
      • presence_penalty -> presencePenalty
      • frequency_penalty -> frequencyPenalty
      • stop -> stopSequences
      • seed -> seed

      Parameters

      • Optionalparameters: { [index: string]: unknown }

      Returns VercelAIModelParameters