fix: ensure campos is always an array in pickSchemaFields function
Deploy Function / deploy (push) Successful in 22s
Deploy Migrations to Production / deploy (push) Successful in 11s

This commit is contained in:
2026-02-25 08:03:00 -06:00
parent 009e65d327
commit 738d3970e3
2 changed files with 7 additions and 2 deletions
@@ -300,7 +300,7 @@ app.post(`${prefix}/conversations/:id/messages`, async (c) => {
}
// Pedimos respuesta estructurada con responses.create
const schema = pickSchemaFields(definicion, body.campos);
const schema = pickSchemaFields(definicion, body.campos ?? []);
const planForPrompt = safePlanForPrompt(plan);
const model = CREATE_CHAT_CONVERSATION_STRUCTURED_MODELO;