[PR #13804] fix(core): remove unnecessary per-message title LLM calls #14818

Closed
opened 2026-02-16 18:19:34 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13804

State: closed
Merged: Yes


What does this PR do?

Fixes #13802

summarizeMessage() in summary.ts makes a small-model (Haiku) call on every user message to generate a per-message summary.title. This field is only consumed as a fallback label in MessageNav (packages/ui/src/components/message-nav.tsx) — and only when getLabel is not provided. The main app always provides getLabel (raw prompt text), and the TUI never displays it. The only place it's actually reached is the enterprise share page tooltip.

The session-level title from ensureTitle() (one Haiku call per session) is unaffected.

This removes the LLM call and unused imports from summarizeMessage(), keeping the diff computation intact. Net effect: eliminates N small-model calls per session (one per user message).

How did you verify your code works?

Typecheck passes (same pre-existing errors on dev in provider.ts and app.tsx). The removed code path has no callers beyond summarizeMessage() itself, and the only consumer of summary.title falls through to an i18n fallback string.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13804 **State:** closed **Merged:** Yes --- ### What does this PR do? Fixes #13802 `summarizeMessage()` in `summary.ts` makes a small-model (Haiku) call on every user message to generate a per-message `summary.title`. This field is only consumed as a fallback label in `MessageNav` (`packages/ui/src/components/message-nav.tsx`) — and only when `getLabel` is not provided. The main app always provides `getLabel` (raw prompt text), and the TUI never displays it. The only place it's actually reached is the enterprise share page tooltip. The session-level title from `ensureTitle()` (one Haiku call per session) is unaffected. This removes the LLM call and unused imports from `summarizeMessage()`, keeping the diff computation intact. Net effect: eliminates N small-model calls per session (one per user message). ### How did you verify your code works? Typecheck passes (same pre-existing errors on `dev` in `provider.ts` and `app.tsx`). The removed code path has no callers beyond `summarizeMessage()` itself, and the only consumer of `summary.title` falls through to an i18n fallback string.
yindo added the pull-request label 2026-02-16 18:19:34 -05:00
yindo closed this issue 2026-02-16 18:19:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14818