Skip to main content

Function: vendorOf()

vendorOf(provider, model, opts?): string | undefined

Defined in: packages/agentos/src/api/runtime/pool/vendor.ts:102

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.

Parameters​

provider​

string

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

model​

string

The model id sent to that provider.

opts?​

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

baseUrl?​

string

vendor?​

string

Returns​

string | undefined

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