Add thinking support for Claude 4.1 Opus and 4.5 Sonnet via OpenRouter

This commit is contained in:
Sam Jones
2025-10-02 11:30:39 +01:00
parent 6b5984deac
commit 3f6bd90f64
@@ -97,7 +97,13 @@ export function openRouterInjectVariants(models: ModelDescriptionSchema[], model
models.push(model);
// inject thinking variants for Anthropic thinking models
const antThinkingModels = ['anthropic/claude-opus-4', 'anthropic/claude-sonnet-4', 'anthropic/claude-3-7-sonnet'];
const antThinkingModels = [
'anthropic/claude-opus-4.1',
'anthropic/claude-opus-4',
'anthropic/claude-sonnet-4.5',
'anthropic/claude-sonnet-4',
'anthropic/claude-3-7-sonnet'
];
if (antThinkingModels.includes(model.id)) {
// create a thinking variant for the model, by setting 'idVariant' and modifying the label/description