Skip to content

generateTitle silently fails with reasoning models (gpt-5-mini, o1, o3) due to hardcoded temperature: 0 #1233

@lzj960515

Description

@lzj960515

Summary

generateTitle silently falls back to "Conversation" when the agent model (or the generateTitle.model override) is a reasoning model such as gpt-5-mini, o1-mini, or o3-mini. The failure is swallowed by a try/catch with only a DEBUG-level log, making it very hard to diagnose.

Root Cause

createConversationTitleGenerator in agent.ts calls generateText with temperature: 0 unconditionally:

const result = await context.traceContext.withSpan(llmSpan, () =>
  generateText({
    model: resolvedModel,
    messages,
    temperature: 0, // reasoning models reject this parameter
    maxOutputTokens,
  }),
);

Reasoning models (OpenAI o-series, gpt-5-mini, etc.) do not accept the temperature parameter. The AI SDK emits a warning and the call either errors or returns no usable output. The surrounding try/catch catches this silently:

} catch (error) {
  context.logger.debug("[Memory] Failed to generate conversation title", {
    error: safeStringify(error),
  });
}
return fallbackTitle; // always "Conversation"

Steps to Reproduce

  1. Create an agent with a reasoning model, e.g. model: "openai/gpt-5-mini"
  2. Configure generateTitle: true on the Memory instance
  3. Start a new conversation
  4. Observe: conversation title is "Conversation" instead of an AI-generated title
  5. In logs: AI SDK Warning: The feature "temperature" is not supported for reasoning models

Expected Behavior

  • generateTitle should detect reasoning models and omit unsupported parameters (temperature)
  • Or the error should be surfaced at warn level so users know why title generation failed
  • The docs should note that reasoning models are not supported for generateTitle

Workaround

Explicitly override the model in generateTitle config to use a non-reasoning model:

new Memory({
  storage: adapter,
  generateTitle: {
    enabled: true,
    model: "openai/gpt-4o-mini", // must be a non-reasoning model
    systemPrompt: "Generate a short title (max 6 words).",
    maxLength: 60,
    maxOutputTokens: 24,
  },
});

Environment

  • @voltagent/core latest
  • OpenAI provider, model gpt-5-mini (reasoning model)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions