Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🙈 feat: Config Option to Hide Response Feedback Buttons (#15085)

Marco Beretta29f6ec6eae5c
diff --git a/api/server/routes/__tests__/messages-content-edit.spec.js b/api/server/routes/__tests__/messages-content-edit.spec.js
index 4c12efff2e..9c7accc9d6 100644
--- a/api/server/routes/__tests__/messages-content-edit.spec.js
+++ b/api/server/routes/__tests__/messages-content-edit.spec.js
@@ -14,6 +14,7 @@ jest.mock('@librechat/api', () => ({
mergeQuotedTextForCount: jest.fn((text) => text),
CHILD_THREAD_READ_ONLY_ERROR: 'Child thread is view-only.',
isSubagentThreadWriteBlocked: jest.fn().mockResolvedValue(false),
+ requireFeedbackEnabled: (req, res, next) => next(),
}));
jest.mock('~/server/services/Endpoints/agents/subagentThreadStore', () => ({}));
diff --git a/api/server/routes/__tests__/messages-delete.spec.js b/api/server/routes/__tests__/messages-delete.spec.js
index 0661b94d96..3f2f63b983 100644
--- a/api/server/routes/__tests__/messages-delete.spec.js
+++ b/api/server/routes/__tests__/messages-delete.spec.js
@@ -15,6 +15,7 @@ jest.mock('@librechat/api', () => ({
traceIdForMessage: jest.fn((messageId) => `trace-${messageId}`),
CHILD_THREAD_READ_ONLY_ERROR: 'Child thread is view-only.',
isSubagentThreadWriteBlocked: jest.fn().mockResolvedValue(false),
+ requireFeedbackEnabled: (req, res, next) => next(),
}));
jest.mock('~/server/services/Endpoints/agents/subagentThreadStore', () => ({}));
diff --git a/api/server/routes/__tests__/messages-feedback.spec.js b/api/server/routes/__tests__/messages-feedback.spec.js
index 92aac83a1a..ba2e8d1950 100644
--- a/api/server/routes/__tests__/messages-feedback.spec.js
+++ b/api/server/routes/__tests__/messages-feedback.spec.js
@@ -12,6 +12,7 @@ jest.mock('@librechat/api', () => ({
traceIdForMessage: jest.fn((messageId) => `trace-${messageId}`),
CHILD_THREAD_READ_ONLY_ERROR: 'Child thread is view-only.',
isSubagentThreadWriteBlocked: jest.fn().mockResolvedValue(false),
+ requireFeedbackEnabled: jest.fn((req, res, next) => next()),
}));
jest.mock('~/server/services/Endpoints/agents/subagentThreadStore', () => ({}));
@@ -65,7 +66,7 @@ jest.mock('~/db/models', () => ({
describe('PUT /:conversationId/:messageId/feedback', () => {
let app;
- const { sendFeedbackScore } = require('@librechat/api');
+ const { sendFeedbackScore, requireFeedbackEnabled } = require('@librechat/api');
const { updateMessage } = require('~/models');
beforeAll(() => {
@@ -82,6 +83,7 @@ describe('PUT /:conversationId/:messageId/feedback', () => {
beforeEach(() => {
jest.clearAllMocks();
+ requireFeedbackEnabled.mockImplementation((req, res, next) => next());
updateMessage.mockImplementation((userId, { messageId, feedback }) =>
Promise.resolve({
messageId,
@@ -147,6 +149,21 @@ describe('PUT /:conversationId/:messageId/feedback', () => {
expect(sendFeedbackScore).not.toHaveBeenCalled();
});
+ it('gates the route on the shared feedback-enabled middleware', async () => {
+ requireFeedbackEnabled.mockImplementationOnce((req, res) =>
+ res.status(403).json({ error: 'Feedback is disabled' }),
+ );
+
+ const response = await request(app)
+ .put('/api/messages/conversation-1/message-1/feedback')
+ .send({ feedback: { rating: 'thumbsUp', tag: 'accurate_reliable' } });
+
+ expect(response.status).toBe(403);
+ expect(response.body).toEqual({ error: 'Feedback is disabled' });
+ expect(updateMessage).not.toHaveBeenCalled();
+ expect(sendFeedbackScore).not.toHaveBeenCalled();
+ });
+
it('preserves clearing feedback', async () => {
const response = await request(app)
.put('/api/messages/conversation-1/message-1/feedback')
diff --git a/api/server/routes/__tests__/messages-get-real-validation.spec.js b/api/server/routes/__tests__/messages-get-real-validation.spec.js
index 79ca934736..f8f3bcf7e1 100644
--- a/api/server/routes/__tests__/messages-get-real-validation.spec.js
+++ b/api/server/routes/__tests__/messages-get-real-validation.spec.js
@@ -34,6 +34,7 @@ jest.mock('@librechat/api', () => ({
isPendingActionStale: jest.fn(() => false),
CHILD_THREAD_READ_ONLY_ERROR: 'Child thread is view-only.',
isSubagentThreadWriteBlocked: jest.fn().mockResolvedValue(false),
+ requireFeedbackEnabled: (req, res, next) => next(),
}));
jest.mock('~/server/services/Endpoints/agents/subagentThreadStore', () => ({}));
diff --git a/api/server/routes/__tests__/messages-get.spec.js b/api/server/routes/__tests__/messages-get.spec.js
index 0c8ca9749a..669ed09ef2 100644
--- a/api/server/routes/__tests__/messages-get.spec.js
+++ b/api/server/routes/__tests__/messages-get.spec.js
@@ -13,6 +13,7 @@ jest.mock('@librechat/api', () => ({
traceIdForMessage: jest.fn((messageId) => `trace-${messageId}`),
CHILD_THREAD_READ_ONLY_ERROR: 'Child thread is view-only.',
isSubagentThreadWriteBlocked: jest.fn().mockResolvedValue(false),
+ requireFeedbackEnabled: (req, res, next) => next(),
}));
jest.mock('~/server/services/Endpoints/agents/subagentThreadStore', () => ({}));
diff --git a/api/server/routes/__tests__/messages-subagent-thread.spec.js b/api/server/routes/__tests__/messages-subagent-thread.spec.js
index 9d1560b278..9d8937ff35 100644
--- a/api/server/routes/__tests__/messages-subagent-thread.spec.js
+++ b/api/server/routes/__tests__/messages-subagent-thread.spec.js
@@ -13,6 +13,7 @@ jest.mock('@librechat/api', () => ({
mergeQuotedTextForCount: jest.fn((text) => text),
CHILD_THREAD_READ_ONLY_ERROR: 'This subagent thread is view-only.',
isSubagentThreadWriteBlocked: (...args) => mockIsSubagentThreadWriteBlocked(...args),
+ requireFeedbackEnabled: (req, res, next) => next(),
}));
jest.mock('@librechat/data-schemas', () => ({
diff --git a/api/server/routes/messages.js b/api/server/routes/messages.js
index 22d499bd41..cdda8baf8b 100644
--- a/api/server/routes/messages.js
+++ b/api/server/routes/messages.js
@@ -13,6 +13,7 @@ const {
sendFeedbackScore,
traceIdForMessage,
mergeQuotedTextForCount,
+ requireFeedbackEnabled,
CHILD_THREAD_READ_ONLY_ERROR,
isSubagentThreadWriteBlocked,
} = require('@librechat/api');
@@ -516,6 +517,7 @@ router.put(
'/:conversationId/:messageId/feedback',
validateMessageReq,
configMiddleware,
+ requireFeedbackEnabled,
async (req, res) => {
try {
const { conversationId, messageId } = req.params;
diff --git a/client/src/common/types.ts b/client/src/common/types.ts
index 5fae782858..a86ca07d70 100644
--- a/client/src/common/types.ts
+++ b/client/src/common/types.ts
@@ -409,6 +409,8 @@ export type TMessageChatContext = {
latestMessageId: string | undefined;
latestMessageDepth: number | undefined;
handleContinue: (e: React.MouseEvent<HTMLButtonElement>) => void;
+ /** Resolved once per chat from `interface.feedback`; false until the config loads */
+ feedbackEnabled: boolean;
/** Should be a getter backed by a ref — reads current value without triggering re-renders */
readonly isSubmitting: boolean;
};
diff --git a/client/src/components/Chat/Messages/__tests__/HoverButtons.spec.tsx b/client/src/components/Chat/Messages/__tests__/HoverButtons.spec.tsx
index 3657e0aed5..6c44d5f9c1 100644
--- a/client/src/components/Chat/Messages/__tests__/HoverButtons.spec.tsx
+++ b/client/src/components/Chat/Messages/__tests__/HoverButtons.spec.tsx
@@ -34,6 +34,7 @@ function renderHoverButtons({
isLast = false,
latestMessageId = 'assistant-1',
getCanCopy = () => hasCopyableText({ text: message.text, content: message.content }),
+ handleFeedback,
}: {
isSubmitting: boolean;
message?: TMessage;
@@ -41,6 +42,7 @@ function renderHoverButtons({
isLast?: boolean;
latestMessageId?: string;
getCanCopy?: () => boolean;
+ handleFeedback?: () => void;
}) {
const queryClient = new QueryClient({
defaultOptions: { queries: { retry: false } },
@@ -65,6 +67,7 @@ function renderHoverButtons({
copyToClipboard={jest.fn()}
getCanCopy={getCanCopy}
latestMessageId={latestMessageId}
+ handleFeedback={handleFeedback}
/>
</MemoryRouter>
</RecoilRoot>
@@ -212,3 +215,38 @@ describe('HoverButtons edit affordance', () => {
expect(screen.queryByTestId('continue-generation-button')).toBeNull();
});
});
+
+describe('HoverButtons feedback affordance', () => {
+ const assistantMessage = {
+ ...userMessage,
+ messageId: 'assistant-1',
+ isCreatedByUser: false,
+ text: 'Here is the answer',
+ } as TMessage;
+
+ const renderSettledResponse = (handleFeedback?: () => void) =>
+ renderHoverButtons({
+ isSubmitting: false,
+ message: assistantMessage,
+ isLast: true,
+ latestMessageId: 'assistant-2',
+ handleFeedback,
+ });
+
+ it('offers feedback on a settled response when a handler is supplied', () => {
+ renderSettledResponse(jest.fn());
+
+ expect(screen.getByTitle('Love this')).toBeInTheDocument();
+ expect(screen.getByTitle('Needs improvement')).toBeInTheDocument();
+ });
+
+ /** `useMessageActions` withholds the handler when `interface.feedback` is false, so
+ * this is how a deployment that disabled feedback reaches the action row. */
+ it('hides feedback when no handler is supplied', () => {
+ renderSettledResponse();
+
+ expect(screen.queryByTitle('Love this')).toBeNull();
+ expect(screen.queryByTitle('Needs improvement')).toBeNull();
+ expect(screen.getByTestId('copy-response-button')).toBeInTheDocument();
+ });
+});
diff --git a/client/src/hooks/Chat/__tests__/abort.spec.tsx b/client/src/hooks/Chat/__tests__/abort.spec.tsx
index 6a7a501430..76094b3e2e 100644
--- a/client/src/hooks/Chat/__tests__/abort.spec.tsx
+++ b/client/src/hooks/Chat/__tests__/abort.spec.tsx
@@ -13,6 +13,7 @@ const mockAbortMutateAsync = jest.fn();
const mockConvertSteersToQueued = jest.fn();
jest.mock('~/data-provider', () => ({
+ useGetStartupConfig: () => ({ data: undefined }),
useAbortStreamMutation: () => ({ mutateAsync: mockAbortMutateAsync }),
supportsGenerationProtocolV2: (value: unknown) =>
value != null &&
diff --git a/client/src/hooks/Chat/__tests__/feedback.spec.tsx b/client/src/hooks/Chat/__tests__/feedback.spec.tsx
new file mode 100644
index 0000000000..b9dc057133
--- /dev/null
+++ b/client/src/hooks/Chat/__tests__/feedback.spec.tsx
@@ -0,0 +1,76 @@
+import React from 'react';
+import { RecoilRoot } from 'recoil';
+import { renderHook } from '@testing-library/react';
+import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
+import type { TStartupConfig } from 'librechat-data-provider';
+import useChatHelpers from '../useChatHelpers';
+
+let mockStartupConfig: Partial<TStartupConfig> | undefined;
+
+jest.mock('~/data-provider', () => ({
+ useGetStartupConfig: () => ({ data: mockStartupConfig }),
+ useAbortStreamMutation: () => ({ mutateAsync: jest.fn() }),
+ supportsGenerationProtocolV2: () => false,
+}));
+
+jest.mock('~/hooks/Messages/useLatestMessage', () => ({
+ useLatestMessage: () => null,
+ useLatestMessageId: () => null,
+}));
+
+jest.mock('~/hooks/Chat/useChatFunctions', () => ({
+ __esModule: true,
+ default: () => ({ ask: jest.fn(), regenerate: jest.fn() }),
+}));
+
+jest.mock('~/hooks/useNewConvo', () => ({
+ __esModule: true,
+ default: () => ({ newConversation: jest.fn() }),
+}));
+
+jest.mock('~/hooks/Chat/useSteerConvert', () => ({
+ __esModule: true,
+ default: () => jest.fn(),
+}));
+
+function renderChatHelpers() {
+ const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });
+ const wrapper = ({ children }: { children: React.ReactNode }) => (
+ <QueryClientProvider client={queryClient}>
+ <RecoilRoot>{children}</RecoilRoot>
+ </QueryClientProvider>
+ );
+ return renderHook(() => useChatHelpers(0), { wrapper });
+}
+
+describe('useChatHelpers feedbackEnabled', () => {
+ afterEach(() => {
+ mockStartupConfig = undefined;
+ });
+
+ /** Fail closed while loading: a `feedback: false` deployment must never flash controls
+ * whose writes the server rejects with 403. */
+ it('withholds feedback until the startup config resolves', () => {
+ mockStartupConfig = undefined;
+
+ expect(renderChatHelpers().result.current.feedbackEnabled).toBe(false);
+ });
+
+ it('enables feedback when the interface leaves the flag unconfigured', () => {
+ mockStartupConfig = { interface: {} } as Partial<TStartupConfig>;
+
+ expect(renderChatHelpers().result.current.feedbackEnabled).toBe(true);
+ });
+
+ it('enables feedback when the interface explicitly enables it', () => {
+ mockStartupConfig = { interface: { feedback: true } } as Partial<TStartupConfig>;
+
+ expect(renderChatHelpers().result.current.feedbackEnabled).toBe(true);
+ });
+
+ it('disables feedback when the interface disables it', () => {
+ mockStartupConfig = { interface: { feedback: false } } as Partial<TStartupConfig>;
+
+ expect(renderChatHelpers().result.current.feedbackEnabled).toBe(false);
+ });
+});
diff --git a/client/src/hooks/Chat/useChatHelpers.ts b/client/src/hooks/Chat/useChatHelpers.ts
index 7402d1febc..e83f9eaa0f 100644
--- a/client/src/hooks/Chat/useChatHelpers.ts
+++ b/client/src/hooks/Chat/useChatHelpers.ts
@@ -3,8 +3,12 @@ import { useQueryClient } from '@tanstack/react-query';
import { Constants, QueryKeys, isAssistantsEndpoint } from 'librechat-data-provider';
import { useRecoilState, useRecoilValue, useSetRecoilState, useRecoilCallback } from 'recoil';
import type { TMessage } from 'librechat-data-provider';
+import {
+ useGetStartupConfig,
+ useAbortStreamMutation,
+ supportsGenerationProtocolV2,
+} from '~/data-provider';
import { useLatestMessage, useLatestMessageId } from '~/hooks/Messages/useLatestMessage';
-import { supportsGenerationProtocolV2, useAbortStreamMutation } from '~/data-provider';
import useChatFunctions from '~/hooks/Chat/useChatFunctions';
import useSteerConvert from '~/hooks/Chat/useSteerConvert';
import { resolveAbortSteerTarget } from '~/utils';
@@ -377,6 +381,13 @@ export default function useChatHelpers(index = 0, paramId?: string) {
const [abortScroll, setAbortScroll] = useRecoilState(store.abortScrollFamily(index));
const [optionSettings, setOptionSettings] = useRecoilState(store.optionSettingsFamily(index));
+ /** Read once per chat rather than per message row: message rows never unmount, so a
+ * per-row config observer would accumulate for the length of the conversation.
+ * Stays disabled until the config resolves, so a `feedback: false` deployment never
+ * flashes controls whose writes the server rejects. */
+ const { data: startupConfig } = useGetStartupConfig();
+ const feedbackEnabled = startupConfig != null && startupConfig.interface?.feedback !== false;
+
return useMemo(
() => ({
newConversation,
@@ -408,6 +419,7 @@ export default function useChatHelpers(index = 0, paramId?: string) {
setFiles,
filesLoading,
setFilesLoading,
+ feedbackEnabled,
}),
[
newConversation,
@@ -439,6 +451,7 @@ export default function useChatHelpers(index = 0, paramId?: string) {
setFiles,
filesLoading,
setFilesLoading,
+ feedbackEnabled,
],
);
}
diff --git a/client/src/hooks/Messages/useMemoizedChatContext.ts b/client/src/hooks/Messages/useMemoizedChatContext.ts
index aa35372a8e..94430e37ae 100644
--- a/client/src/hooks/Messages/useMemoizedChatContext.ts
+++ b/client/src/hooks/Messages/useMemoizedChatContext.ts
@@ -55,6 +55,7 @@ export default function useMemoizedChatContext(
latestMessageId: chatCtx.latestMessageId,
latestMessageDepth: chatCtx.latestMessageDepth,
handleContinue: chatCtx.handleContinue,
+ feedbackEnabled: chatCtx.feedbackEnabled,
get isSubmitting() {
return isSubmittingRef.current;
},
@@ -68,6 +69,7 @@ export default function useMemoizedChatContext(
chatCtx.latestMessageId,
chatCtx.latestMessageDepth,
chatCtx.handleContinue,
+ chatCtx.feedbackEnabled,
isSubmitting, // intentional: forces new reference on streaming start/end so HoverButtons re-renders
],
);
diff --git a/client/src/hooks/Messages/useMessageActions.tsx b/client/src/hooks/Messages/useMessageActions.tsx
index f042441526..a5b67b0468 100644
--- a/client/src/hooks/Messages/useMessageActions.tsx
+++ b/client/src/hooks/Messages/useMessageActions.tsx
@@ -47,6 +47,7 @@ export default function useMessageActions(props: TMessageActions) {
latestMessageId,
latestMessageDepth,
handleContinue,
+ feedbackEnabled,
// NOTE: isSubmitting is intentionally NOT destructured here.
// chatContext.isSubmitting is a getter backed by a ref — destructuring
// would capture a one-time snapshot. Always access via chatContext.isSubmitting.
@@ -183,7 +184,9 @@ export default function useMessageActions(props: TMessageActions) {
enterEdit,
conversation,
messageLabel,
- handleFeedback,
+ /** Withholding the handler removes the controls: `HoverButtons` renders feedback
+ * only when it has somewhere to send it. */
+ handleFeedback: feedbackEnabled ? handleFeedback : undefined,
handleContinue,
copyToClipboard,
latestMessageId,
diff --git a/librechat.example.yaml b/librechat.example.yaml
index 2b7a484e99..7b3b8c1e89 100644
--- a/librechat.example.yaml
+++ b/librechat.example.yaml
@@ -222,6 +222,8 @@ interface:
marketplace:
use: false
fileCitations: true
+ # Show the thumbs up/thumbs down feedback buttons on responses (default: true)
+ feedback: true
# Tools pinned to the prompt bar by default for all users.
# Only seeds the initial state — once a user pins/unpins a tool, their choice is kept.
# Valid tool keys: artifacts, execute_code, web_search, file_search, skills.
diff --git a/packages/api/src/middleware/feedback.spec.ts b/packages/api/src/middleware/feedback.spec.ts
new file mode 100644
index 0000000000..220345b8cb
--- /dev/null
+++ b/packages/api/src/middleware/feedback.spec.ts
@@ -0,0 +1,59 @@
+import type { NextFunction, Response } from 'express';
+import type { ServerRequest } from '~/types/http';
+import { requireFeedbackEnabled } from './feedback';
+
+function createResponse() {
+ const res = {
+ statusCode: undefined as number | undefined,
+ body: undefined as unknown,
+ status(code: number) {
+ res.statusCode = code;
+ return res;
+ },
+ json(payload: unknown) {
+ res.body = payload;
+ return res;
+ },
+ };
+ return res;
+}
+
+function run(req: Partial<ServerRequest>) {
+ const res = createResponse();
+ const next = jest.fn() as unknown as NextFunction;
+ requireFeedbackEnabled(req as ServerRequest, res as unknown as Response, next);
+ return { res, next };
+}
+
+describe('requireFeedbackEnabled', () => {
+ it('rejects the write when the interface disables feedback', () => {
+ const { res, next } = run({
+ config: { interfaceConfig: { feedback: false } },
+ } as Partial<ServerRequest>);
+
+ expect(res.statusCode).toBe(403);
+ expect(res.body).toEqual({ error: 'Feedback is disabled' });
+ expect(next).not.toHaveBeenCalled();
+ });
+
+ it('allows the write when the interface enables feedback', () => {
+ const { res, next } = run({
+ config: { interfaceConfig: { feedback: true } },
+ } as Partial<ServerRequest>);
+
+ expect(res.statusCode).toBeUndefined();
+ expect(next).toHaveBeenCalledTimes(1);
+ });
+
+ it('allows the write when the flag is unconfigured', () => {
+ const { next } = run({ config: { interfaceConfig: {} } } as Partial<ServerRequest>);
+
+ expect(next).toHaveBeenCalledTimes(1);
+ });
+
+ it('allows the write when no app config reached the request', () => {
+ const { next } = run({});
+
+ expect(next).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/packages/api/src/middleware/feedback.ts b/packages/api/src/middleware/feedback.ts
new file mode 100644
index 0000000000..d66664e9e5
--- /dev/null
+++ b/packages/api/src/middleware/feedback.ts
@@ -0,0 +1,19 @@
+import type { NextFunction, Response } from 'express';
+import type { ServerRequest } from '~/types/http';
+
+/**
+ * Rejects message feedback writes when the deployment set `interface.feedback: false`,
+ * so a deployment that hides the controls also stores no ratings. Requires the app
+ * config to already be resolved onto the request.
+ */
+export function requireFeedbackEnabled(
+ req: ServerRequest,
+ res: Response,
+ next: NextFunction,
+): void {
+ if (req.config?.interfaceConfig?.feedback === false) {
+ res.status(403).json({ error: 'Feedback is disabled' });
+ return;
+ }
+ next();
+}
diff --git a/packages/api/src/middleware/index.ts b/packages/api/src/middleware/index.ts
index 60ea6b028f..741c974a0a 100644
--- a/packages/api/src/middleware/index.ts
+++ b/packages/api/src/middleware/index.ts
@@ -20,3 +20,4 @@ export * from './remoteAgentAuth';
export * from './share';
export * from './messageFilterPii';
export * from './messageValidation';
+export * from './feedback';
diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.ts
index 5aa86d4039..966f479663 100644
--- a/packages/data-provider/src/config.ts
+++ b/packages/data-provider/src/config.ts
@@ -1509,6 +1509,7 @@ export const interfaceSchema = z
webSearch: z.boolean().optional(),
contextUsage: z.boolean().optional(),
contextCost: z.boolean().optional(),
+ feedback: z.boolean().optional(),
currency: z
.object({
code: z.string(),
@@ -1611,6 +1612,7 @@ export const interfaceSchema = z
webSearch: true,
contextUsage: true,
contextCost: false,
+ feedback: true,
peoplePicker: {
users: true,
groups: true,
diff --git a/packages/data-schemas/src/app/interface.spec.ts b/packages/data-schemas/src/app/interface.spec.ts
index 1a4f72c302..1242534871 100644
--- a/packages/data-schemas/src/app/interface.spec.ts
+++ b/packages/data-schemas/src/app/interface.spec.ts
@@ -66,6 +66,30 @@ describe('loadDefaultInterface', () => {
expect(interfaceConfig?.buildInfo).toBe(true);
});
+ it('enables response feedback by default', async () => {
+ const interfaceConfig = await loadDefaultInterface({
+ config: {},
+ configDefaults: getConfigDefaults(),
+ });
+
+ expect(interfaceConfig?.feedback).toBe(true);
+ });
+
+ it('preserves a disabled response feedback flag', async () => {
+ const config: Partial<TCustomConfig> = {
+ interface: {
+ feedback: false,
+ },
+ };
+
+ const interfaceConfig = await loadDefaultInterface({
+ config,
+ configDefaults: getConfigDefaults(),
+ });
+
+ expect(interfaceConfig?.feedback).toBe(false);
+ });
+
it('disables context cost by default', async () => {
const interfaceConfig = await loadDefaultInterface({
config: {},
diff --git a/packages/data-schemas/src/app/interface.ts b/packages/data-schemas/src/app/interface.ts
index ec26054139..6fb9967d9b 100644
--- a/packages/data-schemas/src/app/interface.ts
+++ b/packages/data-schemas/src/app/interface.ts
@@ -42,6 +42,7 @@ export async function loadDefaultInterface({
buildInfo: interfaceConfig?.buildInfo ?? defaults.buildInfo,
contextUsage: interfaceConfig?.contextUsage ?? defaults.contextUsage,
contextCost: interfaceConfig?.contextCost ?? defaults.contextCost,
+ feedback: interfaceConfig?.feedback ?? defaults.feedback,
currency: interfaceConfig?.currency ?? defaults.currency,
// Permissions and related settings - only include if explicitly configured