import { generationInputSchema, type GenerationResult as BaseGenerationResult, type GatewayModelId } from "@automate.ax/api-contract/runtime"; import { type Encodable, type ProducingSchema } from "@automate.ax/codec"; import { createAnthropic } from "@ai-sdk/anthropic"; import { createCerebras } from "@ai-sdk/cerebras"; import { createCohere } from "@ai-sdk/cohere"; import { createDeepInfra } from "@ai-sdk/deepinfra"; import { createDeepSeek } from "@ai-sdk/deepseek"; import { createFireworks } from "@ai-sdk/fireworks"; import { createGoogleGenerativeAI } from "@ai-sdk/google"; import { createGroq } from "@ai-sdk/groq"; import { createHuggingFace } from "@ai-sdk/huggingface"; import { createMistral } from "@ai-sdk/mistral"; import { createOpenAI } from "@ai-sdk/openai"; import { createPerplexity } from "@ai-sdk/perplexity"; import { createTogetherAI } from "@ai-sdk/togetherai"; import { createXai } from "@ai-sdk/xai"; import type { StandardSchemaV1 } from "@standard-schema/spec"; import type { DistributedOmit } from "type-fest"; import { type ActionObjectInput } from "../../automation/actions.js"; import type { IntegrationAccountReference } from "../../automation/integrations.js"; import type { Signal } from "../../automation/signal-protocol.js"; declare const AI_ACCOUNT_SERVICE_IDS: readonly ["anthropic", "cerebras", "cohere", "deepinfra", "deepseek", "fireworks", "google-genai", "groq", "huggingface", "mistral", "openai", "openrouter", "perplexity", "togetherai", "vercel-ai-gateway", "xai"]; type AiAccountServiceId = (typeof AI_ACCOUNT_SERVICE_IDS)[number]; type GenerateSchema = ProducingSchema; interface AiModelIdsByService { anthropic: Parameters>[0]; cerebras: Parameters>[0]; cohere: Parameters>[0]; deepinfra: Parameters>[0]; deepseek: Parameters>[0]; fireworks: Parameters>[0]; "google-genai": Parameters>[0]; groq: Parameters>[0]; huggingface: Parameters>[0]; mistral: Parameters>[0]; openai: Parameters>[0]; openrouter: never; perplexity: Parameters>[0]; togetherai: Parameters>[0]; "vercel-ai-gateway": GatewayModelId; xai: Parameters>[0]; } /** Model IDs suggested for one provider, with support for newly released IDs. */ export type GenerateModelId = AiModelIdsByService[TServiceId] | (string & {}); /** Serializable AI generation result with a schema-dependent output. */ export type GenerateResult = Omit & { /** Generated text or structured value. */ output: TOutput; }; /** Inputs accepted by the built-in AI generation action. */ export type GenerateOptions = DistributedOmit, "model"> & { /** User-managed provider account. Omit to use the platform AI Gateway. */ account?: IntegrationAccountReference; /** Provider model ID. Defaults according to the selected account. */ model?: GenerateModelId> | Exclude["model"], GatewayModelId | undefined>; /** Standard Schema used to constrain and type structured output. */ schema?: TSchema; /** Additional model guidance describing the structured output. */ schemaDescription?: string; /** Provider-facing name for the structured output. */ schemaName?: string; }; type PlatformGenerateOptions = DistributedOmit, "account"> & { account?: never; }; /** * Generates text or schema-validated structured data. * * Omit `account` to use the platform AI Gateway. Explicit provider accounts use * their own credentials and accept provider-native model IDs. * * @param options - Prompt, model, generation settings, and optional schema. */ export declare function generate(options: PlatformGenerateOptions & { schema: TSchema; }): Signal>>; /** * Generates structured data through an explicit provider account. * * @param options - Provider account, prompt, model, and output schema. */ export declare function generate(options: GenerateOptions & { account: IntegrationAccountReference; schema: TSchema; }): Signal>>; /** * Generates structured data when the account may vary at authoring time. * * @param options - Account, prompt, model, and output schema. */ export declare function generate(options: GenerateOptions & { schema: TSchema; }): Signal>>; /** * Generates plain text through the platform gateway or an explicit provider. * * @param options - Prompt, model, and generation settings. */ export declare function generate(options: PlatformGenerateOptions): Signal; /** * Generates text through an explicit provider account. * * @param options - Provider account, prompt, and model settings. */ export declare function generate(options: GenerateOptions & { account: IntegrationAccountReference; }): Signal; /** * Generates text when the account may vary at authoring time. * * @param options - Account, prompt, and model settings. */ export declare function generate(options: GenerateOptions): Signal; export {}; //# sourceMappingURL=generate.d.ts.map