Function vendorOf

  • Who trained the model a seat ran on, or undefined when that cannot be determined. opts.vendor (declared on the pool entry or the fixed seat) wins; a native provider on its own endpoint gives its maker, and on a custom base URL (opts.baseUrl, or the provider's URL variable when none is given) gives undefined; a host gives the model id's maker prefix. An empty or whitespace-only URL counts as none, as every call reads one (baseUrlIfSet), so the next source decides.

    Parameters

    • provider: string

      The provider id the seat runs on, such as 'openrouter'.

    • model: string

      The model id sent to that provider.

    • opts: {
          vendor?: string;
          baseUrl?: string;
      } = {}

      A declared vendor, and the baseUrl the call goes to.

      • Optional vendor?: string
      • Optional baseUrl?: string

    Returns string | undefined

    The vendor, lower-cased ('anthropic', 'meta'), or undefined.