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
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🎹 feat: Add Claude Opus 5.5 Support (#16215)
Danny Avila6500e2202672
diff --git a/client/src/components/Endpoints/Settings/Anthropic.tsx b/client/src/components/Endpoints/Settings/Anthropic.tsxindex 51deb4e39f..a3cc2fda1e 100644--- a/client/src/components/Endpoints/Settings/Anthropic.tsx+++ b/client/src/components/Endpoints/Settings/Anthropic.tsx@@ -1,6 +1,5 @@import { useMemo } from 'react';-import { presetSettings } from 'librechat-data-provider';-import { getSettingsKeys } from 'librechat-data-provider';+import { presetSettings, getSettingsKeys, applyModelAwareDefaults } from 'librechat-data-provider';import type { SettingDefinition } from 'librechat-data-provider';import type { TModelSelectProps } from '~/common';import { componentMapping } from '~/components/SidePanel/Parameters/components';@@ -16,7 +15,14 @@ export default function AnthropicSettings({conversation?.endpointType ?? conversation?.endpoint ?? '',conversation?.model ?? '',);- return presetSettings[combinedKey] ?? presetSettings[endpointKey];+ const settings = presetSettings[combinedKey] ?? presetSettings[endpointKey];+ if (!settings) {+ return undefined;+ }+ return {+ col1: applyModelAwareDefaults(settings.col1, endpointKey, conversation?.model ?? undefined),+ col2: applyModelAwareDefaults(settings.col2, endpointKey, conversation?.model ?? undefined),+ };}, [conversation]);if (!parameters) {@@ -34,7 +40,6 @@ export default function AnthropicSettings({const { key, default: defaultValue, ...rest } = setting;const props = {- key,settingKey: key,defaultValue,...rest,@@ -44,10 +49,10 @@ export default function AnthropicSettings({};if (key === 'model') {- return <Component {...props} options={models} />;+ return <Component key={key} {...props} options={models} />;}- return <Component {...props} />;+ return <Component key={key} {...props} />;};return (diff --git a/client/src/components/Endpoints/Settings/Bedrock.tsx b/client/src/components/Endpoints/Settings/Bedrock.tsxindex 95bf325b2c..b6db6f9af2 100644--- a/client/src/components/Endpoints/Settings/Bedrock.tsx+++ b/client/src/components/Endpoints/Settings/Bedrock.tsx@@ -1,9 +1,8 @@import { useMemo } from 'react';-import { getSettingsKeys } from 'librechat-data-provider';+import { presetSettings, getSettingsKeys, applyModelAwareDefaults } from 'librechat-data-provider';import type { SettingDefinition } from 'librechat-data-provider';import type { TModelSelectProps } from '~/common';import { componentMapping } from '~/components/SidePanel/Parameters/components';-import { presetSettings } from 'librechat-data-provider';export default function BedrockSettings({conversation,@@ -16,7 +15,14 @@ export default function BedrockSettings({conversation?.endpointType ?? conversation?.endpoint ?? '',conversation?.model ?? '',);- return presetSettings[combinedKey] ?? presetSettings[endpointKey];+ const settings = presetSettings[combinedKey] ?? presetSettings[endpointKey];+ if (!settings) {+ return undefined;+ }+ return {+ col1: applyModelAwareDefaults(settings.col1, endpointKey, conversation?.model ?? undefined),+ col2: applyModelAwareDefaults(settings.col2, endpointKey, conversation?.model ?? undefined),+ };}, [conversation]);if (!parameters) {@@ -34,7 +40,6 @@ export default function BedrockSettings({const { key, default: defaultValue, ...rest } = setting;const props = {- key,settingKey: key,defaultValue,...rest,@@ -44,10 +49,10 @@ export default function BedrockSettings({};if (key === 'model') {- return <Component {...props} options={models} />;+ return <Component key={key} {...props} options={models} />;}- return <Component {...props} />;+ return <Component key={key} {...props} />;};return (diff --git a/client/src/components/Endpoints/Settings/__tests__/Anthropic.spec.tsx b/client/src/components/Endpoints/Settings/__tests__/Anthropic.spec.tsxnew file mode 100644index 0000000000..6c0f3b086f--- /dev/null+++ b/client/src/components/Endpoints/Settings/__tests__/Anthropic.spec.tsx@@ -0,0 +1,55 @@+import React from 'react';+import { EModelEndpoint } from 'librechat-data-provider';+import type { TSetOption } from 'librechat-data-provider';+import type { TModelSelectProps } from '~/common';+import { render, screen, fireEvent, waitFor } from 'test/layout-test-utils';+import AnthropicSettings from '../Anthropic';+import { ChatContext } from '~/Providers';+import BedrockSettings from '../Bedrock';++type ChatContextValue = React.ContextType<typeof ChatContext>;++const chatContextValue = { preset: null } as ChatContextValue;++describe.each([+ [EModelEndpoint.anthropic, AnthropicSettings, 'claude-opus-'],+ [EModelEndpoint.bedrock, BedrockSettings, 'global.anthropic.claude-opus-'],+] as const)('%s settings', (endpoint, Settings, prefix) => {+ it('hides unsupported controls on Opus 5.5 and restores them when switching back', async () => {+ const commit = jest.fn();+ const setOption: TSetOption = jest.fn(() => commit);+ const conversation = {+ endpoint,+ model: `${prefix}5`,+ thinking: false,+ temperature: 0.7,+ } as TModelSelectProps['conversation'];+ const view = (model: string) => (+ <ChatContext.Provider value={chatContextValue}>+ <Settings+ conversation={{ ...conversation, model } as TModelSelectProps['conversation']}+ setOption={setOption}+ models={[`${prefix}5`, `${prefix}5-5`]}+ />+ </ChatContext.Provider>+ );+ const { rerender } = render(view(`${prefix}5`));+ expect(screen.getByRole('switch', { name: 'Thinking' })).toBeInTheDocument();+ const unsupported = ['Thinking Budget', 'Temperature', 'Top P', 'Top K'];+ unsupported.forEach((name) => expect(screen.getAllByLabelText(name).length).toBeGreaterThan(0));++ rerender(view(`${prefix}5-5`));+ expect(screen.queryByRole('switch', { name: 'Thinking' })).not.toBeInTheDocument();+ unsupported.forEach((name) => expect(screen.queryAllByLabelText(name)).toHaveLength(0));+ expect(screen.getByText('Effort')).toBeInTheDocument();+ expect(screen.getByText('Thought Visibility')).toBeInTheDocument();+ fireEvent.keyDown(screen.getByRole('slider', { name: 'Effort' }), { key: 'End' });+ await waitFor(() => expect(commit).toHaveBeenLastCalledWith('max'));+ expect(setOption).toHaveBeenCalledWith('effort');+ expect(conversation?.thinking).toBe(false);+ expect(conversation?.temperature).toBe(0.7);++ rerender(view(`${prefix}5`));+ expect(screen.getByRole('switch', { name: 'Thinking' })).not.toBeChecked();+ });+});diff --git a/client/src/components/SidePanel/Agents/ModelPanel.test.tsx b/client/src/components/SidePanel/Agents/ModelPanel.test.tsxindex b94a3901e9..ddf506b4de 100644--- a/client/src/components/SidePanel/Agents/ModelPanel.test.tsx+++ b/client/src/components/SidePanel/Agents/ModelPanel.test.tsx@@ -276,6 +276,43 @@ describe('ModelPanel', () => {expect(container.querySelector('#model')).not.toBeNull();});+ it.each([+ [EModelEndpoint.anthropic, 'claude-opus-5'],+ [EModelEndpoint.bedrock, 'global.anthropic.claude-opus-5'],+ ])(+ 'preserves saved %s settings through model switches and a restored form',+ (provider, previousModel) => {+ const saved = {+ thinking: false,+ thinkingBudget: 4096,+ temperature: 0.7,+ topP: 0.9,+ topK: 40,+ };+ const formRef: React.MutableRefObject<UseFormReturn<AgentForm> | null> = { current: null };+ const renderForm = (model: string, parameters = saved) => (+ <TestForm+ defaultProvider={provider}+ defaultModel={model}+ defaultModelParameters={parameters}+ formRef={formRef}+ models={{ [provider]: [previousModel, `${previousModel}-5`] }}+ modelsReady={true}+ />+ );+ const { getByTestId, unmount } = render(renderForm(previousModel));+ fireEvent.click(getByTestId(`com_ui_model-${previousModel}-5`));+ expect(formRef.current?.getValues('model_parameters')).toEqual(saved);+ fireEvent.click(getByTestId(`com_ui_model-${previousModel}`));+ expect(formRef.current?.getValues('model_parameters')).toEqual(saved);+ fireEvent.click(getByTestId(`com_ui_model-${previousModel}-5`));+ const restored = JSON.parse(JSON.stringify(formRef.current?.getValues('model_parameters')));+ unmount();+ render(renderForm(`${previousModel}-5`, restored));+ expect(formRef.current?.getValues('model_parameters')).toEqual(saved);+ },+ );+it('prunes a saved model_parameters value once its endpoint drops the matching param', async () => {mockStartupConfig.mockReturnValue({endpointsDropParamsMap: { [EModelEndpoint.openAI]: ['topP'] },diff --git a/client/src/components/SidePanel/Agents/__tests__/AgentPanel.helpers.spec.ts b/client/src/components/SidePanel/Agents/__tests__/AgentPanel.helpers.spec.tsindex c2937d6345..b88dc7bb4f 100644--- a/client/src/components/SidePanel/Agents/__tests__/AgentPanel.helpers.spec.ts+++ b/client/src/components/SidePanel/Agents/__tests__/AgentPanel.helpers.spec.ts@@ -222,6 +222,38 @@ describe('composeAgentUpdatePayload', () => {expect(payload.skill_authoring_enabled).toBe(true);});+ it.each([+ [EModelEndpoint.anthropic, 'claude-opus-5-5'],+ [EModelEndpoint.bedrock, 'global.anthropic.claude-opus-5-5'],+ ])(+ 'preserves model-hidden %s settings when saving without opening the model panel',+ (provider, model) => {+ const form = createForm();+ form.provider = provider;+ form.model = model;+ const stored = {+ maxContextTokens: null,+ max_context_tokens: null,+ max_output_tokens: null,+ top_p: null,+ frequency_penalty: null,+ presence_penalty: null,+ thinking: false,+ thinkingBudget: 4096,+ temperature: 0.7,+ topP: 0.9,+ topK: 40,+ };+ form.model_parameters = stored;+ const { payload } = composeAgentUpdatePayload(form, 'agent_123', {+ endpointsConfig: {},+ startupConfig: {},+ });+ expect(payload.model_parameters).toEqual(form.model_parameters);+ expect(JSON.parse(JSON.stringify(payload)).model_parameters).toEqual(form.model_parameters);+ },+ );+it('prunes dropped model parameters during submission', () => {const form = createForm();form.provider = EModelEndpoint.openAI;diff --git a/client/src/components/SidePanel/Agents/__tests__/parameters.spec.ts b/client/src/components/SidePanel/Agents/__tests__/parameters.spec.tsindex 8f7d63db1d..6752fe47f4 100644--- a/client/src/components/SidePanel/Agents/__tests__/parameters.spec.ts+++ b/client/src/components/SidePanel/Agents/__tests__/parameters.spec.ts@@ -1,3 +1,5 @@+import { agentParamSettings, EModelEndpoint } from 'librechat-data-provider';+import type { AgentModelParameters } from 'librechat-data-provider';import { pruneAgentModelParameters, resolveAgentParameterSettings } from '../parameters';/**@@ -75,3 +77,84 @@ describe('resolveAgentParameterSettings — denied parameters survive pruning',expect(pruneAgentModelParameters(stored, denied)).not.toHaveProperty('not_a_real_param');});});++const defaults: AgentModelParameters = {+ temperature: null,+ maxContextTokens: null,+ max_context_tokens: null,+ max_output_tokens: null,+ top_p: null,+ frequency_penalty: null,+ presence_penalty: null,+};++describe.each([+ ['anthropic', 'claude-opus-5-5'],+ ['bedrock', 'global.anthropic.claude-opus-5-5'],+])('%s model-hidden parameters', (provider, model) => {+ const hidden = {+ thinking: false,+ thinkingBudget: 4096,+ temperature: 0.7,+ topP: 0.9,+ topK: 40,+ };+ const stored = { ...defaults, ...hidden };++ it('keeps hidden parameters recognized without exposing controls or bypassing role gating', () => {+ const settings = resolveAgentParameterSettings({ provider, model, webSearchAllowed: false });+ expect(settings.parameters.map(({ key }) => key)).toEqual(+ expect.arrayContaining(Object.keys(hidden)),+ );+ for (const key of [...Object.keys(hidden), 'web_search']) {+ expect(settings.visibleParameters.map((param) => param.key)).not.toContain(key);+ }+ expect(pruneAgentModelParameters(stored, settings)).toBe(stored);+ });++ it('continues pruning explicitly dropped parameters and unknown keys', () => {+ const settings = resolveAgentParameterSettings({+ provider,+ model,+ webSearchAllowed: true,+ startupConfig: { endpointsDropParamsMap: { [provider]: { [model]: ['temperature'] } } },+ });+ const result = pruneAgentModelParameters(+ { ...stored, not_a_parameter: true } as AgentModelParameters,+ settings,+ );+ expect(result).not.toHaveProperty('temperature');+ expect(result).not.toHaveProperty('not_a_parameter');+ expect(result).toMatchObject({ thinking: false, thinkingBudget: 4096, topP: 0.9, topK: 40 });+ expect(stored.temperature).toBe(0.7);+ });+});++it('preserves custom Anthropic settings while applying overrides only to visible controls', () => {+ const definitions = agentParamSettings.anthropic ?? [];+ const effort = definitions.find(({ key }) => key === 'effort')!;+ const temperature = definitions.find(({ key }) => key === 'temperature')!;+ const settings = resolveAgentParameterSettings({+ provider: 'custom-anthropic',+ model: 'claude-opus-5-5',+ webSearchAllowed: false,+ endpointsConfig: {+ 'custom-anthropic': {+ order: 0,+ type: EModelEndpoint.custom,+ customParams: {+ defaultParamsEndpoint: 'anthropic',+ paramDefinitions: [+ { ...effort, default: 'low' },+ { ...temperature, default: 0.3 },+ ],+ },+ },+ },+ });+ expect(settings.visibleParameters.find(({ key }) => key === 'effort')?.default).toBe('low');+ expect(settings.visibleParameters.some(({ key }) => key === 'temperature')).toBe(false);+ expect(settings.visibleParameters.some(({ key }) => key === 'web_search')).toBe(false);+ const stored = { ...defaults, temperature: 0.7, thinking: false, web_search: true };+ expect(pruneAgentModelParameters(stored, settings)).toBe(stored);+});diff --git a/client/src/components/SidePanel/Agents/parameters.ts b/client/src/components/SidePanel/Agents/parameters.tsindex 7340e78845..10dde09445 100644--- a/client/src/components/SidePanel/Agents/parameters.ts+++ b/client/src/components/SidePanel/Agents/parameters.ts@@ -21,13 +21,13 @@ export type AgentParameterConfig = {export type ResolvedAgentParameterSettings = {/**- * Every parameter the endpoint schema defines for this model. Pruning reads- * this, so a value the role may not *see* is still recognised and preserved:+ * Every parameter the endpoint schema defines after administrator drops. Pruning reads+ * this, so a value hidden by the model or role is still recognised and preserved:* dropping it here would delete another user's configuration on an unrelated* save by someone without the permission.*/parameters: SettingDefinition[];- /** The subset that gets a control. Role-gated parameters are absent. */+ /** The subset that gets a control. Model-hidden and role-gated parameters are absent. */visibleParameters: SettingDefinition[];schemaResolved: boolean;};@@ -67,19 +67,22 @@ export function resolveAgentParameterSettings({agentParamSettings[combinedKey] ?? agentParamSettings[overriddenEndpointKey];const overriddenParams = customParams?.paramDefinitions;const overriddenParamsMap = keyBy(overriddenParams ?? [], 'key');- const modelAwareParams = applyModelAwareDefaults(- (defaultParams ?? []).filter((param) => param != null && !dropParamsSet.has(param.key)),- overriddenEndpointKey,- model,- );- const parameters = modelAwareParams.map(- (param) => (overriddenParamsMap[param.key] as SettingDefinition) ?? param,+ /** Keep endpoint-recognized keys independent of model visibility. Only explicit+ * administrator drops remove keys from the schema used by both save paths. */+ const endpointParams = (defaultParams ?? []).filter(+ (param) => param != null && !dropParamsSet.has(param.key),);+ const applyOverride = (param: SettingDefinition) =>+ (overriddenParamsMap[param.key] as SettingDefinition) ?? param;+ const parameters = endpointParams.map(applyOverride);+ const visibleParameters = applyModelAwareDefaults(endpointParams, overriddenEndpointKey, model)+ .map(applyOverride)+ .filter((param) => param.key !== 'web_search' || webSearchAllowed);return {schemaResolved: defaultParams != null || overriddenParams != null,parameters,- visibleParameters: parameters.filter((param) => param.key !== 'web_search' || webSearchAllowed),+ visibleParameters,};}diff --git a/client/src/components/SidePanel/Parameters/Panel.tsx b/client/src/components/SidePanel/Parameters/Panel.tsxindex 6bceb74ee8..f35155c127 100644--- a/client/src/components/SidePanel/Parameters/Panel.tsx+++ b/client/src/components/SidePanel/Parameters/Panel.tsx@@ -46,7 +46,7 @@ export default function Parameters() {[conversation?.endpoint, endpointsConfig],);- const parameters = useMemo((): SettingDefinition[] => {+ const { parameters, visibleParameters } = useMemo(() => {const customParams = endpointsConfig[provider]?.customParams ?? {};const [combinedKey, endpointKey] = getSettingsKeys(endpointType ?? provider, model);const overriddenEndpointKey = customParams.defaultParamsEndpoint ?? endpointKey;@@ -63,14 +63,15 @@ export default function Parameters() {const defaultParams = paramSettings[combinedKey] ?? paramSettings[overriddenEndpointKey] ?? [];const overriddenParams = endpointsConfig[provider]?.customParams?.paramDefinitions ?? [];const overriddenParamsMap = keyBy(overriddenParams, 'key');- const modelAwareParams = applyModelAwareDefaults(- defaultParams.filter((param) => param != null && !dropParamsSet.has(param.key)),- overriddenEndpointKey,- model,+ /** Model visibility must not determine which stored settings survive pruning.+ * Explicit administrator drops still remove a key from both sets. */+ const parameters = defaultParams.filter(+ (param) => param != null && !dropParamsSet.has(param.key),);- return modelAwareParams.map(+ const visibleParameters = applyModelAwareDefaults(parameters, overriddenEndpointKey, model).map((param) => (overriddenParamsMap[param.key] as SettingDefinition) ?? param,);+ return { parameters, visibleParameters };}, [endpointType, endpointsConfig, model, provider, startupConfig]);useEffect(() => {@@ -178,7 +179,7 @@ export default function Parameters() {{' '}{/* This is the parent element containing all settings */}{/* Below is an example of an applied dynamic setting, each be contained by a div with the column span specified */}- {parameters.map((setting) => {+ {visibleParameters.map((setting) => {const Component = componentMapping[setting.component];if (!Component) {return null;diff --git a/client/src/components/SidePanel/Parameters/__tests__/Panel.spec.tsx b/client/src/components/SidePanel/Parameters/__tests__/Panel.spec.tsxnew file mode 100644index 0000000000..76da8d6f0a--- /dev/null+++ b/client/src/components/SidePanel/Parameters/__tests__/Panel.spec.tsx@@ -0,0 +1,127 @@+import React, { useState } from 'react';+import { QueryClient, QueryClientProvider } from '@tanstack/react-query';+import { QueryKeys, EModelEndpoint, tConvoUpdateSchema } from 'librechat-data-provider';+import type { TConversation, TStartupConfig, TEndpointsConfig } from 'librechat-data-provider';+import { render, screen, fireEvent, waitFor } from 'test/layout-test-utils';+import { startupConfigKey } from '~/data-provider/Endpoints/queries';+import AnnouncerContext from '~/Providers/AnnouncerContext';+import { ChatContext } from '~/Providers';+import Parameters from '../Panel';++const saved = { thinking: false, thinkingBudget: 4096, temperature: 0.7, topP: 0.9, topK: 40 };++function setup(+ endpoint: string,+ model: string,+ startupConfig: Partial<TStartupConfig> = {},+ restored?: TConversation,+) {+ const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });+ const endpoints: TEndpointsConfig = {+ 'custom-anthropic': {+ order: 0,+ type: EModelEndpoint.custom,+ customParams: { defaultParamsEndpoint: EModelEndpoint.anthropic },+ },+ };+ queryClient.setQueryData([QueryKeys.endpoints], endpoints);+ queryClient.setQueryData(startupConfigKey(false), startupConfig);++ function Conversation() {+ const [conversation, setConversation] = useState<TConversation | null>(+ restored ??+ ({+ ...saved,+ endpoint,+ model,+ conversationId: 'saved-conversation',+ } as TConversation),+ );+ const value = { conversation, setConversation, preset: null } as React.ContextType<+ typeof ChatContext+ >;+ return (+ <QueryClientProvider client={queryClient}>+ <ChatContext.Provider value={value}>+ <button+ onClick={() =>+ setConversation((prev) => ({ ...prev, model: `${model}-5` }) as TConversation)+ }+ >+ {'Select Opus 5.5'}+ </button>+ <button onClick={() => setConversation((prev) => ({ ...prev, model }) as TConversation)}>+ {'Select Opus 5'}+ </button>+ <output data-testid="conversation">{JSON.stringify(conversation)}</output>+ <AnnouncerContext.Provider+ value={{ announcePolite: jest.fn(), announceAssertive: jest.fn() }}+ >+ <Parameters />+ </AnnouncerContext.Provider>+ </ChatContext.Provider>+ </QueryClientProvider>+ );+ }+ return render(<Conversation />);+}++const readConversation = (): TConversation =>+ JSON.parse(screen.getByTestId('conversation').textContent ?? '{}');++describe.each([+ [EModelEndpoint.anthropic, 'claude-opus-5'],+ [EModelEndpoint.bedrock, 'global.anthropic.claude-opus-5'],+ ['custom-anthropic', 'claude-opus-5'],+])('%s conversation parameters', (endpoint, model) => {+ it('preserves hidden settings through the pruning effect and preset serialization', async () => {+ const { unmount } = setup(endpoint, model);+ expect(screen.getByRole('switch', { name: 'Thinking' })).not.toBeChecked();+ fireEvent.click(screen.getByRole('button', { name: 'Select Opus 5.5' }));+ expect(screen.queryByRole('switch', { name: 'Thinking' })).not.toBeInTheDocument();+ for (const label of ['Thinking Budget', 'Temperature', 'Top P', 'Top K']) {+ expect(screen.queryAllByLabelText(label)).toHaveLength(0);+ }+ await waitFor(() => expect(readConversation()).toMatchObject(saved));+ const restored = tConvoUpdateSchema.parse(+ JSON.parse(JSON.stringify(readConversation())),+ ) as TConversation;+ expect(restored).toMatchObject(saved);+ unmount();+ setup(endpoint, model, {}, restored);+ expect(screen.queryByRole('switch', { name: 'Thinking' })).not.toBeInTheDocument();+ expect(readConversation()).toMatchObject(saved);++ fireEvent.click(screen.getByRole('button', { name: 'Select Opus 5' }));+ expect(screen.getByRole('switch', { name: 'Thinking' })).not.toBeChecked();+ expect(screen.getByRole('slider', { name: 'Temperature' })).toHaveAttribute(+ 'aria-valuenow',+ '0.7',+ );+ expect(readConversation()).toMatchObject(saved);+ });++ it('still clears hidden values on an explicit reset', () => {+ setup(endpoint, model);+ fireEvent.click(screen.getByRole('button', { name: 'Select Opus 5.5' }));+ fireEvent.click(screen.getByRole('button', { name: /Reset Model Parameters/i }));+ for (const key of Object.keys(saved)) {+ expect(readConversation()).not.toHaveProperty(key);+ }+ expect(readConversation()).toMatchObject({ endpoint, model: `${model}-5` });+ });++ it('still removes a hidden setting explicitly dropped by the administrator', async () => {+ setup(endpoint, model, {+ endpointsDropParamsMap: { [endpoint]: { [`${model}-5`]: ['temperature'] } },+ });+ fireEvent.click(screen.getByRole('button', { name: 'Select Opus 5.5' }));+ await waitFor(() => expect(readConversation()).not.toHaveProperty('temperature'));+ expect(readConversation()).toMatchObject({+ thinking: false,+ thinkingBudget: 4096,+ topP: 0.9,+ topK: 40,+ });+ });+});diff --git a/packages/api/src/endpoints/anthropic/helpers.ts b/packages/api/src/endpoints/anthropic/helpers.tsindex 6f2692e0e1..e31f3e0add 100644--- a/packages/api/src/endpoints/anthropic/helpers.ts+++ b/packages/api/src/endpoints/anthropic/helpers.ts@@ -1,6 +1,8 @@import { logger } from '@librechat/data-schemas';import { AnthropicClientOptions } from '@librechat/agents';import {+ isOpus55Model,+ OPUS_55_BLOCK_BINDING,ThinkingDisplay,AnthropicEffort,anthropicSettings,@@ -94,7 +96,11 @@ function configureReasoning(return updatedOptions;}- if (extendedOptions.thinking && modelName && supportsAdaptiveThinking(modelName)) {+ if (+ (extendedOptions.thinking || isOpus55Model(modelName)) &&+ modelName &&+ supportsAdaptiveThinking(modelName)+ ) {/*** For Opus 4.7+, Anthropic omits thinking content from responses by* default. Resolver returns `'summarized'` for those models (so the@@ -104,9 +110,11 @@ function configureReasoning(* https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-7#thinking-content-omitted-by-default*/const display = resolveThinkingDisplay(modelName, extendedOptions.thinkingDisplay);- const adaptive = display- ? { type: 'adaptive' as const, display }- : { type: 'adaptive' as const };+ const adaptive = {+ type: 'adaptive' as const,+ ...(display ? { display } : {}),+ ...(isOpus55Model(modelName) ? { block_binding: { ...OPUS_55_BLOCK_BINDING } } : {}),+ };/*** TODO: Remove the cast once `@librechat/agents` updates its* `ChatAnthropicMessages['thinking']` type to include the `display` fielddiff --git a/packages/api/src/endpoints/anthropic/llm.spec.ts b/packages/api/src/endpoints/anthropic/llm.spec.tsindex b3321f6075..7e343a0c0c 100644--- a/packages/api/src/endpoints/anthropic/llm.spec.ts+++ b/packages/api/src/endpoints/anthropic/llm.spec.ts@@ -1,4 +1,5 @@-import { AnthropicEffort, ThinkingDisplay } from 'librechat-data-provider';+import { Providers, getChatModelClass } from '@librechat/agents';+import { AuthKeys, AnthropicEffort, ThinkingDisplay } from 'librechat-data-provider';import type * as t from '~/types';import { FINE_GRAINED_TOOL_STREAMING_BETA } from './helpers';import { getLLMConfig } from './llm';@@ -1274,6 +1275,98 @@ describe('getLLMConfig', () => {expect((result.llmConfig.thinking as unknown as { type: string }).type).toBe('disabled');});+ it('should keep adaptive thinking enabled and bind prior blocks for Opus 5.5', () => {+ const result = getLLMConfig('test-key', {+ modelOptions: {+ model: 'claude-opus-5-5',+ thinking: false,+ temperature: 0.7,+ topP: 0.9,+ topK: 40,+ },+ });++ expect(result.llmConfig.thinking).toMatchObject({+ type: 'adaptive',+ block_binding: { prefix_mismatch_behavior: 'drop_block' },+ });+ expect(result.llmConfig).not.toHaveProperty('temperature');+ expect(result.llmConfig).not.toHaveProperty('topP');+ expect(result.llmConfig).not.toHaveProperty('topK');+ expect(+ (result.llmConfig.clientOptions?.defaultHeaders as Record<string, string>)[+ 'anthropic-beta'+ ],+ ).toContain('thinking-binding-controls-2026-08-01');+ });++ it.each([+ ['claude-opus-5-5', false, AnthropicEffort.max],+ ['claude-opus-5-5', true, AnthropicEffort.low],+ ['claude-opus-5', false, AnthropicEffort.high],+ ['claude-opus-4-6', true, AnthropicEffort.medium],+ ] as const)('serializes effort for %s with thinking %s', (model, thinking, effort) => {+ const { llmConfig } = getLLMConfig('test-key', {+ modelOptions: { model, thinking, effort },+ });+ const Anthropic = getChatModelClass(Providers.ANTHROPIC);+ const payload = new Anthropic(llmConfig).invocationParams();++ expect(payload.output_config).toEqual({ effort });+ expect(payload.thinking).toEqual(llmConfig.thinking);+ expect(payload).not.toHaveProperty('outputConfig');+ });++ it('uses the resolved Vertex deployment for the Opus 5.5 contract', () => {+ const { llmConfig } = getLLMConfig(+ {+ [AuthKeys.GOOGLE_SERVICE_KEY]: {+ project_id: 'test-project',+ client_email: '[email protected]',+ private_key: 'test-private-key',+ },+ },+ {+ modelOptions: {+ model: 'team-model',+ thinking: false,+ effort: AnthropicEffort.max,+ temperature: 0.7,+ },+ vertexConfig: {+ region: 'global',+ models: { 'team-model': { deploymentName: 'claude-opus-5-5' } },+ },+ vertexOptions: { region: 'global' },+ },+ );+ const Anthropic = getChatModelClass(Providers.ANTHROPIC);+ const payload = new Anthropic(llmConfig).invocationParams();++ expect(payload.model).toBe('claude-opus-5-5');+ expect(payload.thinking).toMatchObject({+ type: 'adaptive',+ display: 'summarized',+ block_binding: { prefix_mismatch_behavior: 'drop_block' },+ });+ expect(payload.output_config).toEqual({ effort: AnthropicEffort.max });+ expect(payload.temperature).toBeUndefined();+ expect(llmConfig.clientOptions?.defaultHeaders).toMatchObject({+ 'anthropic-beta': 'thinking-binding-controls-2026-08-01',+ });+ expect(llmConfig.createClient?.({})).toMatchObject({ region: 'global' });+ });++ it('does not send beta-only block binding when client options are dropped', () => {+ const result = getLLMConfig('test-key', {+ modelOptions: { model: 'claude-opus-5-5', thinking: false },+ dropParams: ['clientOptions'],+ });++ expect(result.llmConfig).not.toHaveProperty('clientOptions');+ expect(result.llmConfig.thinking).toEqual({ type: 'adaptive', display: 'summarized' });+ });+it('should omit sampling parameters for Opus 5', () => {const result = getLLMConfig('test-key', {modelOptions: {diff --git a/packages/api/src/endpoints/anthropic/llm.ts b/packages/api/src/endpoints/anthropic/llm.tsindex 98c71f6fe3..05f09b238f 100644--- a/packages/api/src/endpoints/anthropic/llm.ts+++ b/packages/api/src/endpoints/anthropic/llm.ts@@ -2,6 +2,8 @@ import { Agent } from 'undici';import { logger } from '@librechat/data-schemas';import { AnthropicClientOptions } from '@librechat/agents';import {+ isOpus55Model,+ THINKING_BINDING_BETA,clampOutputConfigEffort,omitsSamplingParameters,isThinkingDisabled,@@ -370,6 +372,25 @@ function getLLMConfig(}}+ /** The SDK reads outputConfig, not invocationKwargs.output_config. Keep the+ * legacy field for persisted configs and OpenAI-compatible transforms. */+ if (+ requestOptions.invocationKwargs?.output_config &&+ !options.dropParams?.includes('outputConfig')+ ) {+ requestOptions.outputConfig = requestOptions.invocationKwargs.output_config;+ }++ /** block_binding is invalid without its beta header. Honor an administrator+ * dropping clientOptions without leaving a beta-only field in the body. */+ if (+ shouldDropClientOptions &&+ requestOptions.thinking &&+ 'block_binding' in requestOptions.thinking+ ) {+ delete requestOptions.thinking.block_binding;+ }+if (shouldOmitSamplingParameters) {delete requestOptions.temperature;delete requestOptions.topP;@@ -402,7 +423,7 @@ function getLLMConfig(}requestOptions.clientOptions.defaultHeaders = appendAnthropicBetaHeader(requestOptions.clientOptions.defaultHeaders as Record<string, string> | undefined,- FINE_GRAINED_TOOL_STREAMING_BETA,+ isOpus55Model(resolvedModel) ? THINKING_BINDING_BETA : FINE_GRAINED_TOOL_STREAMING_BETA,);}diff --git a/packages/api/src/endpoints/openai/config.anthropic.spec.ts b/packages/api/src/endpoints/openai/config.anthropic.spec.tsindex 18448d36e6..1fbf3a443c 100644--- a/packages/api/src/endpoints/openai/config.anthropic.spec.ts+++ b/packages/api/src/endpoints/openai/config.anthropic.spec.ts@@ -1,8 +1,23 @@-import { getOpenAIConfig } from './config';+import { AnthropicEffort } from 'librechat-data-provider';import { FINE_GRAINED_TOOL_STREAMING_BETA } from '../anthropic/helpers';+import { getOpenAIConfig } from './config';describe('getOpenAIConfig - Anthropic Compatibility', () => {describe('Anthropic via LiteLLM', () => {+ it('keeps Opus 5.5 effort in output_config without leaking the native SDK field', () => {+ const result = getOpenAIConfig('test-key', {+ modelOptions: { model: 'claude-opus-5-5', thinking: false, effort: AnthropicEffort.max },+ customParams: { defaultParamsEndpoint: 'anthropic' },+ });++ expect(result.llmConfig.modelKwargs?.output_config).toEqual({ effort: 'max' });+ expect(result.llmConfig.modelKwargs).not.toHaveProperty('outputConfig');+ expect(result.llmConfig.modelKwargs?.thinking).toMatchObject({+ type: 'adaptive',+ block_binding: { prefix_mismatch_behavior: 'drop_block' },+ });+ });+it('should handle basic Anthropic configuration with defaultParamsEndpoint', () => {const apiKey = 'sk-xxxx';const endpoint = 'Anthropic (via LiteLLM)';diff --git a/packages/api/src/endpoints/openai/transform.ts b/packages/api/src/endpoints/openai/transform.tsindex bc602358d1..5d09dc724d 100644--- a/packages/api/src/endpoints/openai/transform.ts+++ b/packages/api/src/endpoints/openai/transform.ts@@ -4,7 +4,7 @@ import type { ClientOptions } from '@librechat/agents';import type * as t from '~/types';import { knownOpenAIParams } from './llm';-const anthropicExcludeParams = new Set(['anthropicApiUrl']);+const anthropicExcludeParams = new Set(['anthropicApiUrl', 'outputConfig']);const googleExcludeParams = new Set(['safetySettings','location',diff --git a/packages/api/src/utils/tokens.spec.ts b/packages/api/src/utils/tokens.spec.tsindex 5842401258..b1a50d72c7 100644--- a/packages/api/src/utils/tokens.spec.ts+++ b/packages/api/src/utils/tokens.spec.ts@@ -234,3 +234,15 @@ describe('Grok 4.7 context window', () => {expect(getModelMaxTokens('grok-4.6', EModelEndpoint.custom)).toBe(500000);});});++describe('Opus 5.5 token limits', () => {+ it.each([+ 'claude-opus-5-5',+ 'claude-opus-5.5',+ 'anthropic/claude-opus-5-5',+ 'global.anthropic.claude-opus-5-5',+ ])('resolves %s to the existing modern Claude profile', (model) => {+ expect(getModelMaxTokens(model)).toBe(1000000);+ expect(getModelMaxOutputTokens(model)).toBe(128000);+ });+});diff --git a/packages/api/src/utils/tokens.ts b/packages/api/src/utils/tokens.tsindex c759bddf9d..3b80b2c4ae 100644--- a/packages/api/src/utils/tokens.ts+++ b/packages/api/src/utils/tokens.ts@@ -1,5 +1,5 @@import z from 'zod';-import { EModelEndpoint, supportsContext1m } from 'librechat-data-provider';+import { EModelEndpoint, isOpus55Model, supportsContext1m } from 'librechat-data-provider';import type { EndpointTokenConfig, TokenConfig } from '~/types';/**@@ -182,6 +182,8 @@ const anthropicModels = {'claude-opus-4-6': 1000000,'claude-opus-4-7': 1000000,'claude-opus-4-8': 1000000,+ 'claude-opus-5-5': 1000000,+ 'claude-opus-5.5': 1000000,'claude-opus-5': 1000000,'claude-fable-5': 1000000,'claude-mythos-5': 1000000,@@ -190,6 +192,7 @@ const anthropicModels = {};const ANTHROPIC_CONTEXT_1M = 1000000;+const ANTHROPIC_OPUS_55_OUTPUT = 128000;const ANTHROPIC_SONNET_4_6_PLUS_OUTPUT = 128000;const ANTHROPIC_SONNET_4_6_PLUS_PATTERN =/(?:claude-sonnet[-.]?4[-.]?(?:[6-9]|\d{2})|claude[-.]?4[-.]?(?:[6-9]|\d{2})[-.]?sonnet)(?=$|[^0-9])/;@@ -221,6 +224,13 @@ function getAnthropicSonnet46PlusOutput(return ANTHROPIC_SONNET_4_6_PLUS_OUTPUT;}+function getAnthropicOpus55Output(modelName: string, endpoint: EModelEndpoint): number | undefined {+ if (!usesAnthropicContextMap(endpoint) || !isOpus55Model(modelName)) {+ return undefined;+ }+ return ANTHROPIC_OPUS_55_OUTPUT;+}+const deepseekModels = {deepseek: 128000,'deepseek-chat': 128000,@@ -543,6 +553,8 @@ const anthropicMaxOutputs = {'claude-opus-4-6': 128000,'claude-opus-4-7': 128000,'claude-opus-4-8': 128000,+ 'claude-opus-5-5': 128000,+ 'claude-opus-5.5': 128000,'claude-opus-5': 128000,'claude-fable-5': 128000,'claude-mythos-5': 128000,@@ -719,6 +731,10 @@ export function getModelMaxOutputTokens(return overrideValue;}}+ const opus55Value = getAnthropicOpus55Output(modelName, endpoint);+ if (opus55Value != null) {+ return opus55Value;+ }const sonnet46PlusValue = getAnthropicSonnet46PlusOutput(modelName, endpoint);if (sonnet46PlusValue != null) {return sonnet46PlusValue;diff --git a/packages/data-provider/specs/bedrock.spec.ts b/packages/data-provider/specs/bedrock.spec.tsindex 317972315e..4b4bfc2971 100644--- a/packages/data-provider/specs/bedrock.spec.ts+++ b/packages/data-provider/specs/bedrock.spec.ts@@ -500,6 +500,63 @@ describe('resolveThinkingDisplay', () => {});describe('bedrockInputParser', () => {+ test('keeps Opus 5.5 adaptive thinking enabled and binds prior blocks', () => {+ const result = bedrockInputParser.parse({+ model: 'anthropic.claude-opus-5-5',+ thinking: false,+ }) as Record<string, unknown>;+ const additionalFields = result.additionalModelRequestFields as Record<string, unknown>;++ expect(additionalFields.thinking).toEqual({+ type: 'adaptive',+ display: 'summarized',+ block_binding: { prefix_mismatch_behavior: 'drop_block' },+ });+ expect(additionalFields.anthropic_beta).toEqual(['thinking-binding-controls-2026-08-01']);+ });++ test('restores Opus 5.5 settings and removes its generated binding on a model switch', () => {+ const first = bedrockOutputParser(+ bedrockInputParser.parse({+ model: 'global.anthropic.claude-opus-5-5',+ additionalModelRequestFields: {+ thinking: { type: 'disabled', display: 'omitted' },+ output_config: { effort: 'max' },+ top_k: 40,+ anthropic_beta: ['custom-beta', BEDROCK_OUTPUT_128K_BETA],+ },+ }),+ );+ const fields = structuredClone(first.additionalModelRequestFields);+ expect(fields).toMatchObject({+ thinking: {+ type: 'adaptive',+ display: 'omitted',+ block_binding: { prefix_mismatch_behavior: 'drop_block' },+ },+ output_config: { effort: 'max' },+ anthropic_beta: ['custom-beta', 'thinking-binding-controls-2026-08-01'],+ });+ expect(fields).not.toHaveProperty('top_k');+ expect(first.maxTokens).toBe(128000);+ expect(bedrockOutputParser(bedrockInputParser.parse(first))).toEqual(first);++ const switched = bedrockOutputParser(+ bedrockInputParser.parse({+ ...first,+ model: 'global.anthropic.claude-opus-5',+ thinking: false,+ }),+ );+ expect(switched.additionalModelRequestFields).toMatchObject({+ thinking: { type: 'disabled' },+ output_config: { effort: 'high' },+ anthropic_beta: ['custom-beta', ...BEDROCK_CLAUDE_4_BETAS],+ });+ expect(switched.additionalModelRequestFields).not.toHaveProperty('thinking.block_binding');+ expect(first.additionalModelRequestFields).toEqual(fields);+ });+describe('Model Matching for Reasoning Configuration', () => {test('should match anthropic.claude-3-7-sonnet model', () => {const input = {diff --git a/packages/data-provider/src/bedrock.ts b/packages/data-provider/src/bedrock.tsindex 114cec9164..ef88313ac2 100644--- a/packages/data-provider/src/bedrock.ts+++ b/packages/data-provider/src/bedrock.ts@@ -1,6 +1,8 @@import { z } from 'zod';import * as s from './schemas';+export const THINKING_BINDING_BETA = 'thinking-binding-controls-2026-08-01';+const DEFAULT_THINKING_BUDGET = 2000;const BEDROCK_CLAUDE_SONNET_4_6_MAX_OUTPUT = 64000;export const BEDROCK_OUTPUT_128K_BETA = 'output-128k-2025-02-19';@@ -11,13 +13,18 @@ export const BEDROCK_FINE_GRAINED_TOOL_STREAMING_BETA = 'fine-grained-tool-streaconst GENERATED_BEDROCK_BETAS = new Set<string>([BEDROCK_OUTPUT_128K_BETA,BEDROCK_FINE_GRAINED_TOOL_STREAMING_BETA,+ THINKING_BINDING_BETA,]);const bedrockReasoningConfigValues = new Set<string>(Object.values(s.BedrockReasoningConfig));type ThinkingConfig =| { type: 'enabled'; budget_tokens: number }- | { type: 'adaptive'; display?: s.ThinkingDisplayWireValue }+ | {+ type: 'adaptive';+ display?: s.ThinkingDisplayWireValue;+ block_binding?: typeof OPUS_55_BLOCK_BINDING;+ }| { type: 'disabled' };/**@@ -93,6 +100,17 @@ function parseOpusVersion(model: string): { major: number; minor: number } | nulreturn null;}+/** Opus 5.5 has an always-on, conversation-bound thinking contract unlike Opus 5. */+export function isOpus55Model(model: string): boolean {+ const opus = parseOpusVersion(model);+ return opus?.major === 5 && opus.minor === 5;+}++/** LibreChat permits edits and compaction of earlier turns; drop only invalidated blocks. */+export const OPUS_55_BLOCK_BINDING = {+ prefix_mismatch_behavior: 'drop_block',+} as const;+/** Extracts sonnet major/minor version from both naming formats.* Uses bounded minor capture to avoid matching date suffixes (e.g., -20250514). */function parseSonnetVersion(model: string): { major: number; minor: number } | null {@@ -188,6 +206,9 @@ export function omitsSamplingParameters(model: string): boolean {* See https://platform.claude.com/docs/en/about-claude/models/migration-guide#migrating-to-claude-sonnet-5*/export function requiresExplicitThinkingDisabled(model: string): boolean {+ if (isOpus55Model(model)) {+ return false;+ }const sonnet = parseSonnetVersion(model);if (sonnet != null && sonnet.major >= 5) {return true;@@ -212,6 +233,9 @@ const EFFORTS_REJECTED_WHEN_THINKING_DISABLED = new Set<string>([* off, so the cap is Opus 5+ only.*/export function capsEffortWhenThinkingDisabled(model: string): boolean {+ if (isOpus55Model(model)) {+ return false;+ }const opus = parseOpusVersion(model);return opus != null && opus.major >= 5;}@@ -321,6 +345,9 @@ function isBedrockClaudeModel(model: string): boolean {* @returns Array of beta header strings, or empty array if not applicable*/function getBedrockAnthropicBetaHeaders(model: string): string[] {+ if (isOpus55Model(model)) {+ return [THINKING_BINDING_BETA];+ }const betaHeaders: string[] = [];/** Mythos-class (Fable/Mythos) is intentionally not matched: these betas are built-in/no-op for the@@ -547,7 +574,8 @@ export const bedrockInputParser = s.tConversationSchemaconst persistedAmrf = typedData.additionalModelRequestFields as| Record<string, unknown>| undefined;- const thinkingDisabled = additionalFields.thinking === false;+ const thinkingDisabled =+ additionalFields.thinking === false && !isOpus55Model(typedData.model as string);const effort = additionalFields.effort;if (typeof effort === 'string' && effort !== '') {additionalFields.output_config = { effort };@@ -571,7 +599,7 @@ export const bedrockInputParser = s.tConversationSchema);}- if (additionalFields.thinking === false) {+ if (thinkingDisabled) {delete additionalFields.thinkingBudget;delete additionalFields.thinkingDisplay;if (requiresExplicitThinkingDisabled(typedData.model as string)) {@@ -600,6 +628,9 @@ export const bedrockInputParser = s.tConversationSchema| undefined;const persistedDisplay = extractPersistedDisplay(typedData.additionalModelRequestFields);const thinkingConfig: ThinkingConfig = { type: 'adaptive' };+ if (isOpus55Model(typedData.model as string)) {+ thinkingConfig.block_binding = { ...OPUS_55_BLOCK_BINDING };+ }const display = resolveThinkingDisplay(typedData.model as string,topLevelDisplay ?? persistedDisplay,diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.tsindex 71fff4c12c..4eae516f8b 100644--- a/packages/data-provider/src/config.ts+++ b/packages/data-provider/src/config.ts@@ -3209,6 +3209,7 @@ const sharedOpenAIModels = [const sharedAnthropicModels = ['claude-fable-5-1','claude-fable-5',+ 'claude-opus-5-5','claude-opus-5','claude-opus-4-8','claude-opus-4-7',@@ -3245,6 +3246,7 @@ const sharedAnthropicModels = [export const bedrockModels = ['global.anthropic.claude-fable-5-1','global.anthropic.claude-fable-5',+ 'global.anthropic.claude-opus-5-5','global.anthropic.claude-opus-5','global.anthropic.claude-opus-4-8','global.anthropic.claude-opus-4-7',diff --git a/packages/data-provider/src/parameterSettings.spec.ts b/packages/data-provider/src/parameterSettings.spec.tsindex eb191f749d..35c6f01e0b 100644--- a/packages/data-provider/src/parameterSettings.spec.ts+++ b/packages/data-provider/src/parameterSettings.spec.ts@@ -64,6 +64,21 @@ describe('applyModelAwareDefaults', () => {expect(hasSetting(result, 'temperature')).toBe(true);});+ it('hides unsupported thinking and sampling controls for Opus 5.5', () => {+ const result = applyModelAwareDefaults(+ anthropicParams,+ EModelEndpoint.anthropic,+ 'claude-opus-5-5',+ );++ expect(hasSetting(result, 'thinking')).toBe(false);+ expect(hasSetting(result, 'thinkingBudget')).toBe(false);+ expect(hasSetting(result, 'temperature')).toBe(false);+ expect(hasSetting(result, 'topP')).toBe(false);+ expect(hasSetting(result, 'topK')).toBe(false);+ expect(hasSetting(result, 'effort')).toBe(true);+ });+it('returns settings unchanged when no model is provided', () => {expect(applyModelAwareDefaults(googleParams, EModelEndpoint.google, '')).toBe(googleParams);});diff --git a/packages/data-provider/src/parameterSettings.ts b/packages/data-provider/src/parameterSettings.tsindex 6a51de5f7f..58067190fb 100644--- a/packages/data-provider/src/parameterSettings.ts+++ b/packages/data-provider/src/parameterSettings.ts@@ -17,7 +17,7 @@ import {anthropicSettings,} from './types';import { SettingDefinition, SettingsConfiguration } from './generate';-import { supportsPromptCache } from './bedrock';+import { isOpus55Model, supportsPromptCache } from './bedrock';// Base definitionsconst baseDefinitions: Record<string, SettingDefinition> = {@@ -1335,6 +1335,12 @@ export function applyModelAwareDefaults(: setting,);}+ if (isOpus55Model(model)) {+ return settings.filter(+ (setting) =>+ !['thinking', 'thinkingBudget', 'temperature', 'topP', 'topK'].includes(setting.key),+ );+ }const modelAwareSettings =endpoint === EModelEndpoint.google? settings.map((setting) => {diff --git a/packages/data-schemas/src/app/vertex.spec.ts b/packages/data-schemas/src/app/vertex.spec.tsindex 8178fd6c34..f4e289e7e6 100644--- a/packages/data-schemas/src/app/vertex.spec.ts+++ b/packages/data-schemas/src/app/vertex.spec.ts@@ -12,6 +12,7 @@ describe('defaultVertexModels', () => {expect(defaultVertexModels).toEqual(expect.arrayContaining(['claude-opus-5',+ 'claude-opus-5-5','claude-opus-4-8','claude-opus-4-7','claude-opus-4-6',@@ -45,7 +46,13 @@ describe('validateVertexConfig region gating', () => {* Specific regional endpoints serve Sonnet 4.6 and earlier only. Publishing* the modern defaults there would advertise models that 404 on first use.*/- const modern = ['claude-opus-5', 'claude-opus-4-8', 'claude-opus-4-7', 'claude-sonnet-5'];+ const modern = [+ 'claude-opus-5-5',+ 'claude-opus-5',+ 'claude-opus-4-8',+ 'claude-opus-4-7',+ 'claude-sonnet-5',+ ];const legacy = ['claude-sonnet-4-6', 'claude-3-7-sonnet-20250219', 'claude-3-opus@20240229'];it('drops multi-region-only defaults on a specific regional endpoint', () => {diff --git a/packages/data-schemas/src/app/vertex.ts b/packages/data-schemas/src/app/vertex.tsindex 191c759aca..81f5821fba 100644--- a/packages/data-schemas/src/app/vertex.ts+++ b/packages/data-schemas/src/app/vertex.ts@@ -19,6 +19,7 @@ import logger from '~/config/winston';*/export const defaultVertexModels: string[] = ['claude-opus-5',+ 'claude-opus-5-5','claude-opus-4-8','claude-opus-4-7','claude-opus-4-6',diff --git a/packages/data-schemas/src/methods/tx.spec.ts b/packages/data-schemas/src/methods/tx.spec.tsindex 1e22c0cd0f..8f081e6a3c 100644--- a/packages/data-schemas/src/methods/tx.spec.ts+++ b/packages/data-schemas/src/methods/tx.spec.ts@@ -3192,3 +3192,30 @@ describe('Grok 4.7 pricing', () => {).toBe(endpointTokenConfig[model].read);});});++describe('Opus 5.5 pricing', () => {+ it.each([+ 'claude-opus-5-5',+ 'claude-opus-5.5',+ 'anthropic/claude-opus-5-5',+ 'global.anthropic.claude-opus-5-5',+ ])('prices %s independently of Opus 5, without a long-context surcharge', (model) => {+ const key = model.includes('5.5') ? 'claude-opus-5.5' : 'claude-opus-5-5';+ for (const inputTokenCount of [1000, 200000, 1000000]) {+ expect(getMultiplier({ model, tokenType: 'prompt', inputTokenCount })).toBe(+ tokenValues[key].prompt,+ );+ expect(getMultiplier({ model, tokenType: 'completion', inputTokenCount })).toBe(+ tokenValues[key].completion,+ );+ expect(getCacheMultiplier({ model, cacheType: 'write', inputTokenCount })).toBe(+ cacheTokenValues[key].write,+ );+ expect(getCacheMultiplier({ model, cacheType: 'read', inputTokenCount })).toBe(+ cacheTokenValues[key].read,+ );+ }+ expect(tokenValues[key].prompt).toBeLessThan(tokenValues['claude-opus-5'].prompt);+ expect(cacheTokenValues[key].read).toBeLessThan(cacheTokenValues['claude-opus-5'].read);+ });+});diff --git a/packages/data-schemas/src/methods/tx.ts b/packages/data-schemas/src/methods/tx.tsindex 7661677b4c..01a2d01a00 100644--- a/packages/data-schemas/src/methods/tx.ts+++ b/packages/data-schemas/src/methods/tx.ts@@ -185,6 +185,8 @@ export const tokenValues: Record<string, { prompt: number; completion: number }>'claude-opus-4-7': { prompt: 5, completion: 25 },'claude-opus-4-8': { prompt: 5, completion: 25 },'claude-opus-5': { prompt: 5, completion: 25 },+ 'claude-opus-5-5': { prompt: 4, completion: 20 },+ 'claude-opus-5.5': { prompt: 4, completion: 20 },'claude-fable-5': { prompt: 10, completion: 50 },'claude-mythos-5': { prompt: 10, completion: 50 },'claude-fable-5-1': { prompt: 10, completion: 50 },@@ -371,6 +373,8 @@ export const cacheTokenValues: Record<string, { write: number; read: number }> ='claude-opus-4-7': { write: 6.25, read: 0.5 },'claude-opus-4-8': { write: 6.25, read: 0.5 },'claude-opus-5': { write: 6.25, read: 0.5 },+ 'claude-opus-5-5': { write: 5, read: 0.2 },+ 'claude-opus-5.5': { write: 5, read: 0.2 },'claude-fable-5': { write: 12.5, read: 1 },'claude-mythos-5': { write: 12.5, read: 1 },// Fable/Mythos 5.1 cache reads are 0.025x base input, not the usual 0.1x.