feat(llms): add Claude Opus 4.8 support

Strip temperature for claude-opus-4-8, add tests, list model on website.
This commit is contained in:
Simon
2026-06-08 22:23:56 +08:00
parent 0ba3bbd67f
commit 2f343bcc56
3 changed files with 20 additions and 2 deletions
+7 -2
View File
@@ -56,8 +56,13 @@ export function modelPatch(body: Record<string, any>) {
// TODO: Claude naming pattern has changed
// needs proper handling
if (modelName.startsWith('claude-opus-4-7') || modelName.startsWith('claude-opus-47')) {
debug('Applying Claude-4.7 patch: remove temperature')
if (
modelName.startsWith('claude-opus-4-7') ||
modelName.startsWith('claude-opus-47') ||
modelName.startsWith('claude-opus-4-8') ||
modelName.startsWith('claude-opus-48')
) {
debug('Applying Claude-4.7/4.8 patch: remove temperature')
delete body.temperature
}
}