revert: restore free-tier lock emoji behavior in model selector (#1398)
This commit is contained in:
@@ -159,6 +159,7 @@ export function ModelSelector({
|
||||
() => getModelCategories(billingTier, isSelfHosted),
|
||||
[billingTier, isSelfHosted],
|
||||
);
|
||||
const isFreeTier = billingTier === "free";
|
||||
const defaultCategory = modelCategories[0] ?? "supported";
|
||||
|
||||
const [category, setCategory] = useState<ModelCategory>(defaultCategory);
|
||||
@@ -684,14 +685,18 @@ export function ModelSelector({
|
||||
return "All models currently available for this account";
|
||||
}
|
||||
if (cat === "supported") {
|
||||
return "Recommended Letta API models currently available for this account";
|
||||
return isFreeTier
|
||||
? "Upgrade your account to access more models"
|
||||
: "Recommended Letta API models currently available for this account";
|
||||
}
|
||||
if (cat === "byok")
|
||||
return "Recommended models via your connected API keys (use /connect to add more)";
|
||||
if (cat === "byok-all")
|
||||
return "All models via your connected API keys (use /connect to add more)";
|
||||
if (cat === "all") {
|
||||
return "All Letta API models currently available for this account";
|
||||
return isFreeTier
|
||||
? "Upgrade your account to access more models"
|
||||
: "All Letta API models currently available for this account";
|
||||
}
|
||||
return "All Letta API models currently available for this account";
|
||||
};
|
||||
@@ -783,6 +788,11 @@ export function ModelSelector({
|
||||
const actualIndex = startIndex + index;
|
||||
const isSelected = actualIndex === selectedIndex;
|
||||
const isCurrent = model.id === currentModelId;
|
||||
// Show lock for non-free models when on free tier (only for Letta API tabs)
|
||||
const showLock =
|
||||
isFreeTier &&
|
||||
!model.free &&
|
||||
(category === "supported" || category === "all");
|
||||
|
||||
return (
|
||||
<Box key={model.id} flexDirection="row">
|
||||
@@ -793,6 +803,7 @@ export function ModelSelector({
|
||||
>
|
||||
{isSelected ? "> " : " "}
|
||||
</Text>
|
||||
{showLock && <Text dimColor>🔒 </Text>}
|
||||
<Text
|
||||
bold={isSelected}
|
||||
color={
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
"handle": "letta/auto",
|
||||
"label": "Auto (Beta)",
|
||||
"description": "Automatically select the best model",
|
||||
"isFeatured": true
|
||||
"isFeatured": true,
|
||||
"free": true
|
||||
},
|
||||
{
|
||||
"id": "auto-fast",
|
||||
"handle": "letta/auto-fast",
|
||||
"label": "Auto Fast (Beta)",
|
||||
"description": "Automatically select the best fast model",
|
||||
"isFeatured": true
|
||||
"isFeatured": true,
|
||||
"free": true
|
||||
},
|
||||
{
|
||||
"id": "sonnet",
|
||||
|
||||
Reference in New Issue
Block a user