diff --git a/apps/client/public/locales/en-US/translation.json b/apps/client/public/locales/en-US/translation.json index b622087b..95fbfc0c 100644 --- a/apps/client/public/locales/en-US/translation.json +++ b/apps/client/public/locales/en-US/translation.json @@ -1307,5 +1307,9 @@ "Page tree (child pages, recursive)": "Page tree (child pages, recursive)", "Render the full nested tree of all descendant pages": "Render the full nested tree of all descendant pages", "Showing {{count}} subpages_one": "Showing {{count}} subpage", - "Showing {{count}} subpages_other": "Showing {{count}} subpages" + "Showing {{count}} subpages_other": "Showing {{count}} subpages", + "Protocol": "Protocol", + "How chat requests are sent and how reasoning is surfaced": "How chat requests are sent and how reasoning is surfaced", + "OpenAI-compatible (surfaces reasoning)": "OpenAI-compatible (surfaces reasoning)", + "OpenAI (official)": "OpenAI (official)" } diff --git a/apps/client/public/locales/ru-RU/translation.json b/apps/client/public/locales/ru-RU/translation.json index 038323a8..0d4926cd 100644 --- a/apps/client/public/locales/ru-RU/translation.json +++ b/apps/client/public/locales/ru-RU/translation.json @@ -1160,5 +1160,9 @@ "Render the full nested tree of all descendant pages": "Показать полное вложенное дерево всех дочерних страниц", "Showing {{count}} subpages_one": "Показано {{count}} подстраница", "Showing {{count}} subpages_few": "Показано {{count}} подстраницы", - "Showing {{count}} subpages_many": "Показано {{count}} подстраниц" + "Showing {{count}} subpages_many": "Показано {{count}} подстраниц", + "Protocol": "Протокол", + "How chat requests are sent and how reasoning is surfaced": "Как отправляются запросы чата и как показывается reasoning", + "OpenAI-compatible (surfaces reasoning)": "OpenAI-совместимый (показывает reasoning)", + "OpenAI (official)": "OpenAI (официальный)" } diff --git a/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx b/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx index 713d9b65..08348756 100644 --- a/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx +++ b/apps/client/src/features/workspace/components/settings/components/ai-provider-settings.tsx @@ -38,6 +38,7 @@ import { AiTestCapability, IAiSettingsUpdate, SttApiStyle, + ChatApiStyle, } from "@/features/workspace/services/ai-settings-service.ts"; import { useAiRolesQuery } from "@/features/ai-chat/queries/ai-chat-query.ts"; import { IAiRole } from "@/features/ai-chat/types/ai-chat.types.ts"; @@ -82,6 +83,8 @@ const STT_LANGUAGE_OPTIONS: { value: string; label: string }[] = [ // (empty means "leave unchanged" unless explicitly cleared). const formSchema = z.object({ chatModel: z.string(), + // Chat provider implementation (reasoning surfacing). Default openai-compatible. + chatApiStyle: z.enum(["openai-compatible", "openai"]), // Cheap model id for the anonymous public-share assistant; empty = use chatModel. publicShareChatModel: z.string(), // Agent-role id whose persona the public-share assistant adopts; empty = @@ -308,6 +311,7 @@ export default function AiProviderSettings() { validate: zod4Resolver(formSchema), initialValues: { chatModel: "", + chatApiStyle: "openai-compatible" as ChatApiStyle, publicShareChatModel: "", publicShareAssistantRoleId: "", embeddingModel: "", @@ -330,6 +334,7 @@ export default function AiProviderSettings() { if (!settings) return; form.setValues({ chatModel: settings.chatModel ?? "", + chatApiStyle: settings.chatApiStyle ?? "openai-compatible", publicShareChatModel: settings.publicShareChatModel ?? "", publicShareAssistantRoleId: settings.publicShareAssistantRoleId ?? "", embeddingModel: settings.embeddingModel ?? "", @@ -359,6 +364,7 @@ export default function AiProviderSettings() { // Everything is OpenAI-compatible. driver: "openai", chatModel: values.chatModel, + chatApiStyle: values.chatApiStyle, // Cheap model id for the anonymous public-share assistant; empty falls // back to chatModel server-side. publicShareChatModel: values.publicShareChatModel, @@ -761,6 +767,24 @@ export default function AiProviderSettings() { {t("Resolves to {{url}}", { url: chatResolved })} +