feat: add cost policy support and refresh model catalog for GitHub AI Credits billing
Summary
This PR proposes adding cost policy support and a refreshed model catalog to align with GitHub Copilot's AI Credits billing transition.
What changes
-
New model catalog (packages/squad-sdk/src/config/models.ts): Updated to current active GitHub models across three categories — Lightweight, Versatile, and Powerful — with accurate pricing and included: true flags for zero-credit models (gpt-4.1, gpt-5-mini).
-
Cost policy configuration (packages/squad-sdk/src/config/schema.ts): New costPolicy field on ModelSelectionConfig with maxCategory (hard ceiling) and preferIncluded (zero-credit preference) options.
-
Two-phase model selection (packages/squad-sdk/src/agents/model-selector.ts): Post-resolution policy veto step that:
- Warn-and-allows explicit user overrides above the ceiling (Layer 0/1)
- Automatically downgrades implicit selections (Layer 2/3/4) to the best in-ceiling model
- Prunes fallback chains to respect the active ceiling
-
Updated coordinator governance (all squad.agent.md templates): New model catalog, decision tree documentation, and cost policy conversation phrases.
-
New test coverage: est/cost-policy.test.ts removed (broken stub), est/model-selector-policy.test.ts covers the two-phase resolution logic.
-
Changeset: @bradygaster/squad-sdk minor bump, @bradygaster/squad-cli patch bump.
Motivation
GitHub Copilot is transitioning to AI Credits billing. Teams need a way to:
- Set a cost ceiling to prevent runaway spend on Powerful models
- Prefer zero-credit included models when acceptable for the task
- Get transparent warnings when explicit overrides exceed the ceiling
Testing
215 test files / 6099 tests passing. Build and lint clean.
feat: add cost policy support and refresh model catalog for GitHub AI Credits billing
Summary
This PR proposes adding cost policy support and a refreshed model catalog to align with GitHub Copilot's AI Credits billing transition.
What changes
New model catalog (packages/squad-sdk/src/config/models.ts): Updated to current active GitHub models across three categories — Lightweight, Versatile, and Powerful — with accurate pricing and included: true flags for zero-credit models (gpt-4.1, gpt-5-mini).
Cost policy configuration (packages/squad-sdk/src/config/schema.ts): New costPolicy field on ModelSelectionConfig with maxCategory (hard ceiling) and preferIncluded (zero-credit preference) options.
Two-phase model selection (packages/squad-sdk/src/agents/model-selector.ts): Post-resolution policy veto step that:
Updated coordinator governance (all squad.agent.md templates): New model catalog, decision tree documentation, and cost policy conversation phrases.
New test coverage: est/cost-policy.test.ts removed (broken stub), est/model-selector-policy.test.ts covers the two-phase resolution logic.
Changeset: @bradygaster/squad-sdk minor bump, @bradygaster/squad-cli patch bump.
Motivation
GitHub Copilot is transitioning to AI Credits billing. Teams need a way to:
Testing
215 test files / 6099 tests passing. Build and lint clean.