feat(ai): fetch the Claude model list and offer Latest choices (#46) #52
No reviewers
Labels
No labels
bug
docs
duplicate
enhancement
help wanted
invalid
nice-to-have
pre-1.0
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/lamplighter!52
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/46-models"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #46.
Two parts, as decided:
GET /v1/modelswith the saved Claude API key, newest first, kept for a day (retried after an hour when it fails). The fetch runs in the background, so pages never wait on it. Until it's fetched, or with no Claude API key saved, a built-in list is used. That list now includes Claude Haiku 5.5 and Claude Fable 5.2. Saving a new Claude API key fetches the list again. Claude Code uses the same list and never sends its subscription token to the API.latest:<family>and resolved on each request. The Claude API asks for the family's newest model in the list. Claude Code gets its ownopus/sonnet/haiku/fablealias. Each label shows what the choice points to now, like "Latest Opus (Claude Opus 5.5)". Latest Opus is the default for a new provider. Saved settings are left as they are.The chat's model picker uses the same list, so it gets the Latest choices too.
New code is in
lib/lamplighter/ai/providers/claude_models.ex. There are no new settings, env vars or dependencies (tests turn the background fetch off with thefetch_models: falseapp config).mix precommitpasses (827 tests).Screenshots (example data, built-in list)
ai-settings-desktop

ai-models-desktop

ai-settings-390

ai-models-390
