AzureEmbeddingConfigSchema (embedding-model/azure.ts)

agentset · packages/validation/src/embedding-model/azure.ts · typescript · MIT
ai

Defines a Zod schema for configuring Azure OpenAI embedding models.

// Source: https://github.com/agentset-ai/agentset | License: MIT | Copyright 2025 Ahmed Riad
// Provided via justclaw.it.com; keep this notice with the code.
import { z } from "zod/v4";

import { openaiEmbeddingModelEnum } from "./openai";

export const AzureEmbeddingConfigSchema = z
  .object({
    provider: z.literal("AZURE_OPENAI"),
    model: openaiEmbeddingModelEnum,
    resourceName: z.url().meta({
      description:
        "The resource name of the Azure OpenAI API. https://{resourceName}.openai.azure.com/v1",
      examples: ["my-resource-name"],
    }),
    deployment: z
      .string()
      .describe("The deployment name of the Azure OpenAI API."),
    apiKey: z.string().describe("The API key for the Azure OpenAI API."),
    apiVersion: z
      .string()
      .describe(
     

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key