@mastra/core
Version:
15 lines • 940 B
TypeScript
import type { LanguageModelV2CallOptions } from '../../_types/@ai-sdk_provider@2.0.5/dist/index.js';
/** True for the gateway's OpenRouter chat models, false for its native Anthropic OAuth models. */
export declare function isOpenRouterModel(model: {
provider?: unknown;
}): boolean;
/**
* The Mastra gateway's chat endpoint only runs `openrouter:*` server tools. Another provider's
* native tool is rejected with a 400 (OpenAI, xAI models) or dropped without an error (Anthropic,
* Google models), so the model silently loses the tool.
*
* A native web search tool with no arguments is swapped for the gateway's web search, which works
* for every tool-calling model. Any other native tool fails here with an actionable message.
*/
export declare function prepareToolsForMastraGateway(options: LanguageModelV2CallOptions, routerId: string): LanguageModelV2CallOptions;
//# sourceMappingURL=mastra-gateway-provider-tools.d.ts.map