@mastra/core
Version:
16 lines • 987 B
TypeScript
import type { GatewayAuthResult, MastraModelGatewayInterface } from './base.js';
export declare function getGatewayId(gateway: MastraModelGatewayInterface): string;
export declare function shouldEnableGateway(gateway: MastraModelGatewayInterface): boolean;
export declare function hasAuthCredentials(auth?: GatewayAuthResult): auth is GatewayAuthResult;
export declare function serializeGatewayForSpan(gateway: MastraModelGatewayInterface): {
id: string;
name: string;
} & Record<string, unknown>;
/**
* Find the gateway the model router would use for a model ID.
* Disabled gateways are skipped. A gateway ID is used as the prefix (e.g.,
* "netlify" for netlify gateway); gateways may also claim a model through
* `handlesModel`. models.dev is a provider registry and doesn't use a prefix.
*/
export declare function findGatewayForModel(modelId: string, allGateways: MastraModelGatewayInterface[]): MastraModelGatewayInterface;
//# sourceMappingURL=gateway-helpers.d.ts.map