mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 01:03:29 +00:00
refactor(config): share agent model schema
This commit is contained in:
11
src/config/zod-schema.agent-model.ts
Normal file
11
src/config/zod-schema.agent-model.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const AgentModelSchema = z.union([
|
||||
z.string(),
|
||||
z
|
||||
.object({
|
||||
primary: z.string().optional(),
|
||||
fallbacks: z.array(z.string()).optional(),
|
||||
})
|
||||
.strict(),
|
||||
]);
|
||||
Reference in New Issue
Block a user