Vercel AI SDK Provider (Gateway)

Implements

Constructors

Properties

Methods

Constructors

Properties

name: string = 'vercel'
displayName: string = 'Vercel AI SDK'

Methods

  • Sends a message to the AI provider.

    Parameters

    • prompt: string

      User's message

    • apiKey: string

      API Key (optional for local)

    • Optionaloptions: { baseUrl?: string; modelName?: string }

      Additional options (baseUrl, modelName)

    • OptionalonProgress: (chunk: string) => void

      Callback for streaming responses (optional)

    Returns Promise<string>

    Full response string

  • Fetches available models from the provider.

    Parameters

    • apiKey: string

      API Key

    • Optionaloptions: { baseUrl?: string; type?: "image" | "chat" }

      Base URL override

    Returns Promise<any[]>