Add Quick mode (nova-lite/Bedrock) as 3rd tier for timeline tool

Timeline now offers Quick/Standard/Deep: nova_lite routes to Amazon
Bedrock nova-lite via LiteLLM (1 credit, ~2s faster), azure_mini stays
gpt-4o-mini (1 credit), azure_full stays gpt-4o (2 credits, Pro only).
ToolModels tier rules: free→nova_lite only, plus→quick/standard,
pro→all three.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 10:26:07 +02:00
parent 1d1bbeb69f
commit f00d3d68e5
6 changed files with 24 additions and 16 deletions
+6 -2
View File
@@ -13,13 +13,17 @@ final class ToolModels
{
public static function engineForUser(int $userId, string $requestedEngine): string
{
$valid = ['azure_mini', 'azure_full', 'gpu', 'regex'];
$valid = ['nova_lite', 'azure_mini', 'azure_full', 'gpu', 'regex'];
$requestedEngine = in_array($requestedEngine, $valid, true) ? $requestedEngine : 'azure_mini';
if ($userId <= 0) {
return $requestedEngine;
}
return FreeTier::tier($userId) === 'pro' ? 'azure_full' : 'azure_mini';
return match (FreeTier::tier($userId)) {
'pro' => $requestedEngine,
'plus' => $requestedEngine === 'azure_full' ? 'azure_mini' : $requestedEngine,
default => in_array($requestedEngine, ['nova_lite', 'regex'], true) ? $requestedEngine : 'nova_lite',
};
}
}