feat(config): user-level model tier mapping override (02o)#283
Merged
Conversation
Add ~/.apra-fleet/data/config.json for per-provider tier-to-model overrides. Precedence: update_member > user config > hardcoded default. - New src/services/user-config.ts: loadUserConfig() + getModelOverride() - Thread tier from execute-prompt into PromptOptions so agy no longer reverse-looks-up the resolved model ID to find the display name - agy buildPromptCommand/wrapWindowsPrompt use getModelOverride() with AGY_MODEL_FOR_TIER as fallback - execute-prompt tier resolution: agent override > user config > provider default for all providers - 12 new tests covering loader, getter, and agy integration - Docs in install.md and provider-guide.md
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.
Summary
~/.apra-fleet/data/config.jsonas user-level config for overriding per-provider tier-to-model mappingsupdate_member --model-*) > user config > hardcoded provider defaultPromptOptionsinstead of reverse-looking-up the resolved model IDexecute-prompt.tsChanges
src/services/user-config.ts--loadUserConfig()reads and caches config;getModelOverride(provider, tier)returns the override or undefinedsrc/providers/provider.ts-- addedtierfield toPromptOptionsandwrapWindowsPromptsignaturesrc/tools/execute-prompt.ts-- resolves tier, applies user-config in precedence chain, passes tier to prompt optssrc/providers/agy.ts-- usesopts.tierandgetModelOverride()instead of reverse-lookup + hardcoded mapsrc/os/windows.ts-- passesopts.tierthrough towrapWindowsPromptdocs/install.mdnew section,docs/provider-guide.mdcross-linktests/user-config.test.tsCloses apra-fleet-projects-02o.
Test plan
npm run buildcleannpm testpasses (1310 tests, 79 files)