mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-24 04:38:46 +00:00
fix(ai): use nullable instead of optional for configFiles in AI suggestion schema (#4732)
OpenAI strict mode for response_format requires every property to be listed in 'required'. Optional fields must instead be modeled as nullable so the key stays required while still allowing no value. Fixes #4267
This commit is contained in:
@@ -24,7 +24,7 @@ interface DockerOutput {
|
|||||||
dockerCompose: string;
|
dockerCompose: string;
|
||||||
envVariables: Array<{ name: string; value: string }>;
|
envVariables: Array<{ name: string; value: string }>;
|
||||||
domains: Array<{ host: string; port: number; serviceName: string }>;
|
domains: Array<{ host: string; port: number; serviceName: string }>;
|
||||||
configFiles?: Array<{ content: string; filePath: string }>;
|
configFiles?: Array<{ content: string; filePath: string }> | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getAiSettingsByOrganizationId = async (organizationId: string) => {
|
export const getAiSettingsByOrganizationId = async (organizationId: string) => {
|
||||||
@@ -136,7 +136,7 @@ export const suggestVariants = async ({
|
|||||||
filePath: z.string(),
|
filePath: z.string(),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.optional(),
|
.nullable(),
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user