import * as z from "zod"; import { ModelTierSchema } from "./domain.js"; import { Id } from "./ids.js"; /** One tier of a space mapped to a model of a connected credential. */ export const ModelTierMappingSchema = z.object({ tier: ModelTierSchema, credentialId: Id, provider: z.string(), modelId: z.string(), }); export type ModelTierMapping = z.infer; export const SetModelTierInput = z.object({ tier: ModelTierSchema, /** null removes the mapping, so bots asking for this tier use their usual model again. */ model: z .object({ credentialId: Id, modelId: z.string().trim().min(1).max(200), }) .nullable(), }); export type SetModelTierInput = z.infer;