From 2bfcac58b00281b897615b1a6c9cea54dbe7d7f0 Mon Sep 17 00:00:00 2001 From: Yash Kumar Date: Mon, 21 Sep 2026 01:47:19 +0530 Subject: [PATCH] fix(ai): mask apiKey exposure, add audit logging, resolve masked-key UX regression --- .../dashboard/settings/handle-ai.tsx | 8 ++++- apps/dokploy/server/api/routers/ai.ts | 34 +++++++++++++++---- packages/server/src/services/ai.ts | 19 ++++++++++- 3 files changed, 52 insertions(+), 9 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/handle-ai.tsx b/apps/dokploy/components/dashboard/settings/handle-ai.tsx index b7cf186e7..0cd73d82a 100644 --- a/apps/dokploy/components/dashboard/settings/handle-ai.tsx +++ b/apps/dokploy/components/dashboard/settings/handle-ai.tsx @@ -148,6 +148,7 @@ export const HandleAi = ({ aiId }: Props) => { { apiUrl: apiUrl ?? "", apiKey: apiKey ?? "", + ...(aiId ? { aiId } : {}), }, { enabled: !!apiUrl && (isLocalOllama || !!apiKey), @@ -482,6 +483,7 @@ export const HandleAi = ({ aiId }: Props) => { apiUrl={apiUrl} apiKey={apiKey} model={form.watch("model")} + aiId={aiId} />