Laravel AI: Disable LLM-Generated Conversation Titles via Config
@sumaiazaman merged PR #474 into laravel/ai, adding a config flag to opt out of automatic LLM-generated conversation titles. The change fixes issue #369.
The Problem
Every new conversation in Laravel AI fires a hidden API call to generate a short title, typically three to five words, using the configured LLM. For apps using a provider like Claude Haiku, this shows up as an unexpected request that has nothing to do with the actual conversation content. Users debugging API usage logs were regularly surprised by it.
The New Config Option
The ai.conversations.title key controls the behaviour. It reads from the AI_CONVERSATION_TITLE environment variable and defaults to true, so existing projects see no change.
Set it to false in your .env to skip the LLM call entirely:
AI_CONVERSATION_TITLE=false
Or set it directly in config/ai.php:
'conversations' => [
'title' => false,
],
When disabled, the package uses a truncated version of the first prompt as the conversation title, which is the same behaviour that already existed as a fallback when title generation failed. No new fallback logic was introduced.
Who Should Care
Any app that stores conversations and wants predictable, auditable API usage should set AI_CONVERSATION_TITLE=false. This is especially relevant when billing per token or per request, where a silent background call adds cost and noise. Projects that prefer the generated titles can leave the default in place and nothing changes.