Skip to content

feat(rust-server): Gemini 3.5 title model + head/tail trim for long first messages - #682

Merged
danshapiro merged 5 commits into
mainfrom
the-usual/title-gemini-35-trim
Aug 24, 2026
Merged

feat(rust-server): Gemini 3.5 title model + head/tail trim for long first messages#682
danshapiro merged 5 commits into
mainfrom
the-usual/title-gemini-35-trim

Conversation

@danshapiro

Copy link
Copy Markdown
Owner

What

Two changes to the Rust server's AI session titling in crates/freshell-server/src/ai_title.rs:

  1. Model bump gemini-2.5-flash-litegemini-3.5-flash-lite. Evidence: identical prompt + identical production first-messages, 2.5 drew Agent Design / Agent Status style failures (and reproduced them on replay), 3.5 produced topic-first titles 5/5 and honest low-signal titles 3/3.
  2. Prompt input windowing: a first user message over 2000 chars now contributes first 1000 chars + \n...[trimmed]...\n + last 1000 chars (char-counted, multibyte-safe) instead of a blind first-2000 prefix.

Node server/ is obsolete and deliberately untouched; e2e fake-Gemini pin (auto-title-rust.spec.ts) follows the new model path.

Evidence

  • TDD red→green per task (route-404 red → const green; missing-marker red → helper green)
  • npm run check (typecheck + coordinated full suite) green at HEAD 875e036
  • e2e: auto-title-rust.spec.ts 5/5 on Cloud Run at commit-tagged image; also 5/5 local
  • Independent reviews: plan PASSED (1 round, 2 doc nits fixed), whole-branch + final delta BOTH PASSED 1 round, zero findings
  • Load-bearing pre-flight: falsified + corrected two plan assumptions (vacuous spec typecheck; cold e2e pre-warm requirement)

Refs: worktree .worktrees/title-gemini-35-trim, run records under .worktrees/.the-usual-logs/title-gemini-35-trim/

@danshapiro
danshapiro merged commit da8700c into main Aug 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant