Include model path in validation error

This commit is contained in:
Frank
2025-07-27 19:41:45 -04:00
parent 2060d3656b
commit fbdf227b45
+2 -2
View File
@@ -18,7 +18,7 @@ export async function generate(directory: string) {
toml.models = {};
const provider = Provider.safeParse(toml);
if (!provider.success) {
provider.error.cause = toml;
provider.error.cause = { providerPath, toml };
throw provider.error;
}
@@ -37,7 +37,7 @@ export async function generate(directory: string) {
toml.id = modelID;
const model = Model.safeParse(toml);
if (!model.success) {
model.error.cause = toml;
model.error.cause = { modelPath, toml };
throw model.error;
}
provider.data.models[modelID] = model.data;