Re-tune onboarding model recommendations for the base-model tiers#505
Conversation
The recommender's warning copy and memory thresholds were sized for the old ~3-5 GB instruct models. The base-model tiers are much smaller (quick 0.8 GB, everyday 1.4 GB, powerful 2.6 GB), so the Powerful disable floor of 10 GB wrongly excluded stock 8 GB Macs that can comfortably run a 2.6 GB model. Lower the Powerful disable floor to 8 GB (only sub-8 GB, effectively pre-Apple-Silicon, Macs are now excluded) and derive the '~X GB' sizes in the warning copy from the model catalog via approximateSizeLabel, so the copy stays accurate as the catalog changes instead of repeating stale hardcoded numbers. Warn ceilings are unchanged.
| warning = "Needs more memory than this Mac has (uses a \(modelSizeLabel(for: template)) model)." | ||
| } else if gigabytes < powerfulWarnBelowGigabytes { | ||
| warning = "Uses a ~5 GB model; may run slowly with less than 16 GB of memory." | ||
| warning = "Uses a \(modelSizeLabel(for: template)) model; may run slowly with less than 16 GB of memory." |
There was a problem hiding this comment.
The model size is now derived from the catalog, but the memory ceiling "16 GB" is still hardcoded in this warning string. The PR description claims "no hardcoded sizes remain in the recommender," yet this literal can drift if
powerfulWarnBelowGigabytes is ever adjusted. Deriving it from the constant keeps the copy and the logic in sync.
| warning = "Uses a \(modelSizeLabel(for: template)) model; may run slowly with less than 16 GB of memory." | |
| warning = "Uses a \(modelSizeLabel(for: template)) model; may run slowly with less than \(Int(powerfulWarnBelowGigabytes)) GB of memory." |
| /// in sync with the actual model instead of a hardcoded number. Falls back to a generic phrase if | ||
| /// the filename is missing from the catalog. | ||
| private static func modelSizeLabel(for template: OnboardingTemplate) -> String { | ||
| downloadableModel(filename: template.openSourceModelFilename)?.approximateSizeLabel ?? "local" |
There was a problem hiding this comment.
The fallback string
"local" produces grammatically awkward warning copy — e.g. "Uses a local model, which may run slowly…" — if a template's openSourceModelFilename is absent from the catalog. A phrase that completes the sentence naturally would be less confusing to users who might see this in edge cases.
| downloadableModel(filename: template.openSourceModelFilename)?.approximateSizeLabel ?? "local" | |
| downloadableModel(filename: template.openSourceModelFilename)?.approximateSizeLabel ?? "large" |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
The onboarding recommender's warning copy and memory thresholds were sized for the old ~3–5 GB instruct models. The base-model tiers are much smaller — quick 0.8 GB, everyday 1.4 GB, powerful 2.6 GB — so the Powerful disable floor of 10 GB wrongly excluded stock 8 GB Macs that can comfortably run a 2.6 GB model. This lowers that floor to 8 GB and derives the "~X GB" sizes in the copy from the catalog so they can't drift.
Validation
OnboardingTemplateRecommenderTestsupdated to pin the new boundary: Powerful is disabled below 8 GB (tested at 6 GB) and allowed-but-warned at exactly 8 GB. Other cases (12/16/32 GB, Apple Intelligence, Quick, recommendation defaults) are unchanged.Linked issues
None.
Risk / rollout notes
DownloadableRuntimeModel.approximateSizeLabel, so they track the catalog automatically; no hardcoded sizes remain in the recommender.Greptile Summary
This PR lowers the Powerful-tier memory disable floor from 10 GB to 8 GB (matching the new ~2.6 GB base-model GGUF vs. the old ~5 GB instruct model), and replaces hardcoded model-size strings in warning copy with a live catalog lookup via
modelSizeLabel(for:).Confidence Score: 4/5
Safe to merge; the change is narrowly scoped to onboarding display logic with no data-persistence or auth surface touched.
The threshold change and catalog-driven copy are both straightforward, and the updated tests correctly pin the new 8 GB boundary. The one residual hardcoded value ("16 GB" in the warn-path string) could drift from
powerfulWarnBelowGigabytesif that constant is later adjusted, and the "local" fallback inmodelSizeLabelproduces awkward copy — neither is a functional regression on the current code path.The warn-path string in
OnboardingTemplateRecommender.swiftline 76 still contains a literal "16 GB" that the PR description implied was removed.Important Files Changed
powerfulDisableBelowGigabytesfrom 10 to 8, allowing 8 GB Macs to use the Powerful tier with a warning; replaces hardcoded model size strings withmodelSizeLabel(for:)reading from the catalog. One hardcoded memory value ("16 GB") remains in the warn-path copy and can drift from thepowerfulWarnBelowGigabytesconstant.Reviews (1): Last reviewed commit: "Re-tune onboarding model recommendations..." | Re-trigger Greptile