mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix OpenRouter caching at depth with null model selection
This commit is contained in:
@@ -891,7 +891,7 @@ router.post('/generate', jsonParser, function (request, response) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let cachingAtDepth = getConfigValue('claude.cachingAtDepth', -1);
|
let cachingAtDepth = getConfigValue('claude.cachingAtDepth', -1);
|
||||||
if (Number.isInteger(cachingAtDepth) && cachingAtDepth >= 0 && request.body.model.startsWith('anthropic/claude-3')) {
|
if (Number.isInteger(cachingAtDepth) && cachingAtDepth >= 0 && request.body.model?.startsWith('anthropic/claude-3')) {
|
||||||
cachingAtDepthForOpenRouterClaude(request.body.messages, cachingAtDepth);
|
cachingAtDepthForOpenRouterClaude(request.body.messages, cachingAtDepth);
|
||||||
}
|
}
|
||||||
} else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.CUSTOM) {
|
} else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.CUSTOM) {
|
||||||
|
Reference in New Issue
Block a user