fix: title generation + ai sdk upgrade (#1392)

This commit is contained in:
josh 2026-01-15 16:06:42 +00:00 committed by GitHub
parent f19d3d4071
commit 9d5d8a3ea7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1422 additions and 2360 deletions

View file

@ -123,10 +123,17 @@ export const updateDocumentPrompt = (
${currentContent}`;
};
export const titlePrompt = `Generate a very short chat title (2-5 words max) based on the user's message.
Rules:
- Maximum 30 characters
- No quotes, colons, hashtags, or markdown
- Just the topic/intent, not a full sentence
- If the message is a greeting like "hi" or "hello", respond with just "New conversation"
- Be concise: "Weather in NYC" not "User asking about the weather in New York City"`;
export const titlePrompt = `Generate a short chat title (2-5 words) summarizing the user's message.
Output ONLY the title text. No prefixes, no formatting.
Examples:
- "what's the weather in nyc" Weather in NYC
- "help me write an essay about space" Space Essay Help
- "hi" New Conversation
- "debug my python code" Python Debugging
Bad outputs (never do this):
- "# Space Essay" (no hashtags)
- "Title: Weather" (no prefixes)
- ""NYC Weather"" (no quotes)`;

View file

@ -51,7 +51,7 @@ export function getTitleModel() {
if (isTestEnvironment && myProvider) {
return myProvider.languageModel("title-model");
}
return gateway.languageModel("anthropic/claude-haiku-4.5");
return gateway.languageModel("google/gemini-2.5-flash-lite");
}
export function getArtifactModel() {