LibreChat/packages/data-provider/specs/fable.spec.ts
lia-by-librechat[bot] 2f55f1b942
🦊 feat: Add Claude Fable 5.2 Support (#18015)
* 🦊 feat: Add Claude Fable 5.2 Support

* fix: Preserve Snapshot Version Boundaries in Model Matching

* test: Measure the Snapshot-Safe Token Matcher Search

---------

Co-authored-by: Lia <lia@librechat.ai>
2026-11-10 12:54:39 -05:00

33 lines
1.3 KiB
TypeScript

import { defaultModels } from '../src/config';
import { EModelEndpoint, anthropicSettings } from '../src/schemas';
import {
supportsContext1m,
supportsPromptCache,
hasAlwaysOnThinking,
bindsThinkingBlocks,
omitsSamplingParameters,
supportsAdaptiveThinking,
resolveThinkingDisplay,
} from '../src/bedrock';
describe('Claude Fable 5.2', () => {
it('offers the new release without removing Fable 5.1', () => {
expect(defaultModels[EModelEndpoint.anthropic]).toContain('claude-fable-5-2');
expect(defaultModels[EModelEndpoint.anthropic]).toContain('claude-fable-5-1');
});
it.each(['claude-fable-5-2', 'anthropic/claude-fable-5-2'])(
'uses the modern Claude capability profile for %s',
(model) => {
expect(supportsContext1m(model)).toBe(true);
expect(supportsPromptCache(model)).toBe(true);
expect(hasAlwaysOnThinking(model)).toBe(true);
expect(bindsThinkingBlocks(model)).toBe(true);
expect(supportsAdaptiveThinking(model)).toBe(true);
expect(omitsSamplingParameters(model)).toBe(true);
expect(resolveThinkingDisplay(model)).toBe('summarized');
expect(anthropicSettings.maxOutputTokens.reset(model)).toBe(128000);
expect(anthropicSettings.maxOutputTokens.set(200000, model)).toBe(128000);
},
);
});