Skip to content

Simplify Model Resolution from 4-Level to 2-Level Priority#300

Merged
JeremyDev87 merged 1 commit intomasterfrom
feat/299
Feb 3, 2026
Merged

Simplify Model Resolution from 4-Level to 2-Level Priority#300
JeremyDev87 merged 1 commit intomasterfrom
feat/299

Conversation

@JeremyDev87
Copy link
Owner

Simplify Model Resolution from 4-Level to 2-Level Priority

Summary

This PR implements v4.0.0 breaking change that simplifies the model resolution priority system from 4 levels (Agent > Mode > Global > System) to 2 levels (Global > System).

Deprecation Notice

The following exports are deprecated and will be removed in v5.0.0:

Export Location Migration
ModelConfig model.types.ts Use global config in codingbuddy.config.js
isModelConfig() model.types.ts No longer needed
SYSTEM_DEFAULT_MODEL model.resolver.ts Use DEFAULT_MODEL from model.constants.ts

Testing

# All tests pass
yarn workspace codingbuddy test --run

# Results
✓ 100 test files passed
✓ 2678 tests passed
✓ 2 tests skipped

Checklist

  • All 2678 tests pass
  • No TypeScript errors
  • No hardcoded secrets
  • Deprecated code has clear v5.0.0 removal timeline
  • Migration documentation provided
  • Breaking changes documented
  • Code review approved

Related Issues

close #299

BREAKING CHANGE: Model resolution now uses only global config and system default.
Agent-level and mode-level model configurations are no longer supported.

Changes:
- Simplify ModelResolverService from 3 methods to 1 (resolve())
- Update ModelSource type to 'global' | 'system' only
- Remove model field from all 30 agent JSON files
- Deprecate ModelConfig interface (removal in v5.0.0)
- Deprecate isModelConfig function (removal in v5.0.0)
- Deprecate SYSTEM_DEFAULT_MODEL export (use DEFAULT_MODEL)
- Fix tsconfig.json fixture causing test failure
- Add explicit test for modelResolverService.resolve() call

Migration:
- Replace resolveForMode()/resolveForAgent() with resolve()
- Move model preferences to codingbuddy.config.js
- Replace SYSTEM_DEFAULT_MODEL with DEFAULT_MODEL

close #299
@JeremyDev87 JeremyDev87 self-assigned this Feb 3, 2026
@JeremyDev87 JeremyDev87 marked this pull request as ready for review February 3, 2026 10:01
@JeremyDev87 JeremyDev87 merged commit bd6ae41 into master Feb 3, 2026
16 checks passed
@JeremyDev87 JeremyDev87 deleted the feat/299 branch February 3, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify Model Resolution Priority System

1 participant