fix(source-control): reach users Orca already pinned to Pi's Copilot default

Orca seeded selectedModelByAgent.pi = github-copilot/gpt-5.4-mini the first
time a user picked Pi on a pre-fix build, and pi --list-models still lists
that id, so the resolution chain honoured it and STA-4249 kept reproducing
for every upgrading user. Every prior test started from an empty selection.
This commit is contained in:
Brennan Benson
2026-08-20 16:52:26 -07:00
parent e8384d6d89
commit afa37dd61e
3 changed files with 51 additions and 3 deletions
+8
View File
@@ -109,6 +109,14 @@ const CLAUDE_THINKING_LEVELS: ThinkingLevel[] = [
const PI_DEFAULT_MODEL_ID = 'default'
/**
* The model id Orca used to persist for Pi before `Pi default` existed. Orca itself
* seeded this into `selectedModelByAgent.pi` the first time a user picked Pi, so a
* pre-upgrade user carries it even though they never chose a Copilot model. Treated
* as "no selection" on read so the fix reaches them (STA-4249).
*/
export const PI_RETIRED_COPILOT_DEFAULT_MODEL_ID = 'github-copilot/gpt-5.4-mini'
function uniqueModels(models: CommitMessageModel[]): CommitMessageModel[] {
const seen = new Set<string>()
return models.filter((model) => {