feat: chatbot model setting + tool-calling toggle, simplify admin AI config (v0.59.0)

Chatbot (general assistant + per-recipe Q&A) now resolves its default model
from its own site setting (DEFAULT_CHAT_PROVIDER/MODEL) instead of sharing
the generic "text" use case with recipe generation, so admins can point it
at a different model.

Added AI_TOOL_CALLING_ENABLED: turns off the chatbot's createRecipe/
addToShoppingList tools (and the forced-retry pass) for models that don't
reliably support tool calling — it falls back to plain text answers.

Simplified the admin AI Configuration page: it showed provider keys and
routing settings twice (a read-only card, then an identical edit form).
Merged into one editable section; the resolved fallback provider is now a
one-line note instead of its own card.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Arnaud
2026-07-20 21:14:04 +02:00
parent f6975e98a9
commit 623e5bcd34
10 changed files with 120 additions and 113 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ ${stepList || "None listed"}
`.trim();
const [configResult, privateBio] = await Promise.all([
resolveAiConfigOrError(() => getModelConfigForUseCase(session!.user.id, "text")),
resolveAiConfigOrError(() => getModelConfigForUseCase(session!.user.id, "chat")),
getUserPrivateBio(session!.user.id),
]);
if (!configResult.ok) return configResult.response;