{"record":{"id":"0d517377c7f0c1ef","repo":"Dokploy/dokploy","slug":"no-response-received-from-the-model","errorCode":null,"errorMessage":"No response received from the model","messagePattern":"No response received from the model","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/dokploy/server/api/routers/ai.ts","lineNumber":306,"sourceCode":"\t\t\tz.object({\n\t\t\t\tapiUrl: z.string().min(1),\n\t\t\t\tapiKey: z.string(),\n\t\t\t\tmodel: z.string().min(1),\n\t\t\t}),\n\t\t)\n\t\t.mutation(async ({ input }) => {\n\t\t\ttry {\n\t\t\t\tconst provider = selectAIProvider({\n\t\t\t\t\tapiUrl: input.apiUrl,\n\t\t\t\t\tapiKey: input.apiKey,\n\t\t\t\t});\n\t\t\t\tconst model = provider(input.model);\n\t\t\t\tconst result = await generateText({\n\t\t\t\t\tmodel,\n\t\t\t\t\tprompt: \"Reply with 'ok'\",\n\t\t\t\t});\n\t\t\t\tif (!result.text) {\n\t\t\t\t\tthrow new Error(\"No response received from the model\");\n\t\t\t\t}\n\t\t\t\treturn { success: true, message: \"Connection successful\" };\n\t\t\t} catch (error) {\n\t\t\t\tthrow new TRPCError({\n\t\t\t\t\tcode: \"BAD_REQUEST\",\n\t\t\t\t\tmessage:\n\t\t\t\t\t\terror instanceof Error\n\t\t\t\t\t\t\t? error.message\n\t\t\t\t\t\t\t: `Connection failed: ${error}`,\n\t\t\t\t});\n\t\t\t}\n\t\t}),\n\n\tsuggest: protectedProcedure\n\t\t.input(\n\t\t\tz.object({\n\t\t\t\taiId: z.string(),\n\t\t\t\tinput: z.string(),","sourceCodeStart":288,"sourceCodeEnd":324,"githubUrl":"https://github.com/Dokploy/dokploy/blob/546686ea3587f12ec5652217dedd9f7960fb6d15/apps/dokploy/server/api/routers/ai.ts#L288-L324","documentation":"Guard inside createTelegramNotification: after the telegram row insert, the INSERT INTO notifications returned nothing and the whole transaction rolls back — no Telegram destination is persisted.","triggerScenarios":"The notifications insert violating NOT NULL/enum constraints (missing name or destination type not accepting 'telegram'), or aborted transaction from the prior statement.","commonSituations":"Schema drift on notifications; new required column added without default.","solutions":["Verify notifications schema (required columns, destination-type enum includes 'telegram')","Apply pending migrations","Test the raw INSERT to identify the violated constraint"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!input.name?.trim()) throw new Error('Notification name is required');","typeGuard":null,"tryCatchPattern":"try { await createTelegramNotification(input); } catch (e) { if (e?.message?.includes('Inserting notification')) { /* verify notifications schema */ } throw e; }","preventionTips":["Keep notifications enum/constraints in sync with new providers"],"tags":["database","drizzle","notification","transaction"],"backgroundTag":"database-insert-failed","analyzedSha":"546686ea3587f12ec5652217dedd9f7960fb6d15","analyzedAt":"2026-08-27T05:18:58.095Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}