/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; export type ModelParamsResponse = { modelId: string; type?: string | null | undefined; provider?: string | null | undefined; params: { [k: string]: { [k: string]: any } }; defaults: { [k: string]: any }; }; /** @internal */ export const ModelParamsResponse$inboundSchema: z.ZodMiniType< ModelParamsResponse, unknown > = z.object({ modelId: types.string(), type: z.optional(z.nullable(types.string())), provider: z.optional(z.nullable(types.string())), params: z.record(z.string(), z.record(z.string(), z.any())), defaults: z.record(z.string(), z.any()), }); export function modelParamsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ModelParamsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ModelParamsResponse' from JSON`, ); }