Merge pull request #839 from sam0jones0/add-claude-4.1-4.5-thinking-support

Add thinking support for Claude 4.1 Opus and 4.5 Sonnet via OpenRouter
This commit is contained in:
Enrico Ros
2025-10-05 09:44:57 -07:00
committed by GitHub
@@ -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