May 7th, 2026

Laravel AI: Disable LLM-Generated Conversation Titles via Config

Laravel AI: Disable LLM-Generated Conversation Titles via Config
Sponsored by
Table of Contents

@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:

1AI_CONVERSATION_TITLE=false

Or set it directly in config/ai.php:

1'conversations' => [
2 'title' => false,
3],

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.

If you enjoyed this article, please consider supporting our work for as low as $5 / month.

Sponsor
Marian Pop

Written by

Marian Pop

Writing and maintaining @LaravelMagazine. Host of "The Laravel Magazine Podcast". Pronouns: vi/vim.

Comments

Stay Updated

Subscribe to our newsletter

Get latest news, tutorials, community articles and podcast episodes delivered to your inbox.

Weekly articles
We send a new issue of the newsletter every week on Friday.
No spam
We'll never share your email address and you can opt out at any time.