fix: omit temperature for claude fable 5 (#9540)

This commit is contained in:
centdix
2026-06-12 00:21:40 +02:00
committed by GitHub
parent f86d0d79fc
commit bd00beeac5
2 changed files with 14 additions and 0 deletions
@@ -21,6 +21,13 @@ type AssistantMessageWithReasoning = ChatCompletionMessageParam & {
}
describe('modelConfig', () => {
it('flags Fable 5 model IDs via includes matching', () => {
expect(modelDisallowsSamplingParams('claude-fable-5')).toBe(true)
expect(modelDisallowsSamplingParams('claude-fable-5@20260611')).toBe(true)
expect(modelDisallowsSamplingParams('claude-fable-5/thinking')).toBe(true)
expect(modelDisallowsSamplingParams('anthropic/claude-fable-5')).toBe(true)
})
it('flags Opus 4.7 model IDs via includes matching', () => {
expect(modelDisallowsSamplingParams('claude-opus-4-7')).toBe(true)
expect(modelDisallowsSamplingParams('claude-opus-4-7@20260416')).toBe(true)
@@ -41,6 +48,12 @@ describe('modelConfig', () => {
).toBeUndefined()
})
it('omits deterministic temperature for Anthropic Fable 5 chat requests', () => {
expect(
getDefaultChatTemperature({ provider: 'anthropic', model: 'claude-fable-5' })
).toBeUndefined()
})
it('omits deterministic temperature for non-anthropic providers carrying Opus 4.7 models', () => {
expect(
getDefaultChatTemperature({ provider: 'openrouter', model: 'anthropic/claude-opus-4-7' })
@@ -11,6 +11,7 @@ export function modelDisallowsSamplingParams(model: string) {
// The o-series match requires a digit after the "o" (o1/o3/o4-mini) so it
// does not catch unrelated ids like Mistral's "open-mistral-*" or "optimus-*".
return (
normalizedModel.includes('claude-fable-5') ||
normalizedModel.includes('claude-opus-4-7') ||
normalizedModel.includes('claude-opus-4-8') ||
baseModel.startsWith('gpt-5') ||