Skip to content

feat: display model information in session list#21129

Open
mohitmishra786 wants to merge 4 commits intoanomalyco:devfrom
mohitmishra786:feat/session-model-info
Open

feat: display model information in session list#21129
mohitmishra786 wants to merge 4 commits intoanomalyco:devfrom
mohitmishra786:feat/session-model-info

Conversation

@mohitmishra786
Copy link
Copy Markdown

@mohitmishra786 mohitmishra786 commented Apr 5, 2026

Issue for this PR

Closes #21128

Type of change

  • New feature

What does this PR do?

Session list only showed ID, title, and time. Hard to tell sessions apart when you use different models. Added model name to the display so you can quickly spot which session used which model.

  • Added model column to SessionTable with migration
  • Added model field to Session.Info schema
  • Added setModel service method
  • CLI table shows Model column, JSON output includes model
  • TUI footer shows model name next to timestamp
  • Falls back to first message model if session column is empty (handles TUI sessions)
  • 4 unit tests

Known behavior: Model only appears after the first message is sent. Empty sessions (no messages yet) won't show a model since there's nothing to fetch from. Sessions created during the current dev session may not show the model until the server restarts, since the model is fetched from the first message in the database.

How did you verify your code works?

  • 1840 tests pass, 4 new tests added
  • Typecheck passes across all 19 packages
  • SDK regenerated

Screenshots

CLI One
Screenshot 2026-04-06 at 3 22 59 AM

CLI before:

Session ID              Title                      Updated
─────────────────────────────────────────────────────────────
abc123                  Refactor auth module       2 hours ago
def456                  Add user endpoint          Yesterday

CLI after:

Session ID              Title                      Model              Updated
─────────────────────────────────────────────────────────────────────────────
abc123                  Refactor auth module       claude-sonnet-4    2 hours ago
def456                  Add user endpoint          gemini-2.5-flash   Yesterday

TUI session list footer:
Screenshot 2026-04-06 at 3 15 52 AM

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Add model field to sessions so users can identify which model was used
when browsing their session history.

Changes:
- Add model column to SessionTable with migration
- Add model field to Session.Info schema
- Add setModel service method and integrate with initialize
- Update CLI table and JSON output to show model
- Update TUI session list footer to show model name
- Update projectors for snake_case conversion
- Add 4 unit tests for model CRUD

Closes anomalyco#21128
Session.initialize only fires via REST API, not TUI chat flow.
Fetch model from first message when session model column is NULL
so all sessions show model regardless of how they were created.
Guideline violation: no any type.
@mohitmishra786
Copy link
Copy Markdown
Author

@thdxr @Brendonovich can you please help with the review?

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.

[FEATURE]: Display model information in session list

1 participant