Remove redundant conversation length handler, simplify "prompt too large" response.

This commit is contained in:
Chad Curtis committed 2026-01-30 21:22:15 +00:00
1 parent 5c7cf54d67
commit e74d423e7a
1 file changed
+2 -23
+2 -23
View File
@@ -146,21 +146,6 @@ function QuillyContent({ error, onDismiss, onNewChat, onOpenModelSelector, onTry
}],
};
// Check for prompt length errors (413 or 400 with specific message)
case (error.status === 413 || error.status === 400) &&
(error.message?.toLowerCase().includes('prompt is too long') ||
error.message?.toLowerCase().includes('prompt') && error.message?.toLowerCase().includes('too long')):
return {
message: 'Your conversation has grown too long for this model. Try starting a new chat or switching to a model with a larger context window.',
actions: [{
label: 'New chat',
onClick: onNewChat,
}, {
label: 'Change model',
onClick: onOpenModelSelector,
}],
};
case error.status === 403:
return {
message: `It seems your API key has been used up. Check your API provider's settings, or try a different API key or different provider/model combo:`,
@@ -175,14 +160,8 @@ function QuillyContent({ error, onDismiss, onNewChat, onOpenModelSelector, onTry
case error.status === 413:
return {
message: 'Your request is too large for the AI provider. Try starting a new chat to reduce the conversation size.',
actions: [{
label: 'New chat',
onClick: onNewChat,
}, {
label: 'Change model',
onClick: onOpenModelSelector,
}],
message: 'Your request is too large for the AI provider. Try sending a shorter message.',
actions: [],
};
case error.status === 400: