Repository navigation
feat: per-provider default model - #7
Merged
Merged
Conversation
A provider may declare at most one model with fleetify.default = true. Zero defaults stays valid (the app falls back to the first model); two or more now aggregate into the existing Validation failed error via the errors[] path, alongside the duplicate-id checks. The per-file JSON Schema cannot express this one-true-across-N-sibling-files invariant, so it lives as a cross-entry check in the pipeline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dorukozgen
marked this pull request as ready for review
June 22, 2026 18:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a first-class default model per provider to the catalog. Each provider declares exactly one model with
[fleetify].default = true; the build enforces "at most one default per provider"; the flag flows intodist/.Why
The Fleetify app needs an authoritative per-provider default so it can self-heal a session's / Fleet's selected model when the chosen model is removed (e.g. Opus 4.8 → Opus 4.9). Previously the catalog had no default concept (ordering was alphabetical), so the app fell back to "first model".
Changes
schema/model.schema.json): new optionalfleetify.defaultboolean (additionalProperties:false, so it had to be declared).scripts/lib/types.ts,scripts/lib/defaults.ts): carrydefaultinto thePickerModeldist projection (absent ⇒false).scripts/lib/pipeline.ts): error if a provider has >1defaultmodel (alongside the existing duplicate-id checks).default = trueper provider across all 18 providers (mirror providers —claude/kimi/openrouter— flag the mirror file).claude-code→claude-opus-4-8.Tests / gates
tests/defaults.test.ts(flag flows through; defaults false),tests/pipeline.test.ts(rejects >1 default).bun run validate✓ (18 providers, 132 models),bun run build✓,bun test✓ (31/31).defaultper provider indist/models.json.Merge order
Merge this before the app PR (
fleetifydev/fleetifyfeat/provider-default-model) — the app consumes the published catalog (jsDelivr@main/ serving API), so the field must ship here first.Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
🤖 Generated with Claude Code