mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
fix: expand Codex model routing to cover ALL Codex models
- Update isCursorModel to exclude ALL Codex models from Cursor routing - Check against CODEX_MODEL_CONFIG_MAP for comprehensive exclusion - Includes: gpt-5.2-codex, gpt-5.1-codex-max, gpt-5.1-codex-mini, gpt-5.2, gpt-5.1 - Also excludes overlapping models like gpt-5.2 and gpt-5.1 that exist in both maps - Update test to expect CodexProvider for gpt-5.2 (correct behavior) This ensures ALL Codex CLI models route to Codex provider, not Cursor. Previously only gpt-5.1-codex-* and gpt-5.2-codex-* were excluded.
This commit is contained in:
@@ -129,10 +129,11 @@ describe('provider-factory.ts', () => {
|
||||
});
|
||||
|
||||
describe('Cursor models via model ID lookup', () => {
|
||||
it('should return CursorProvider for gpt-5.2 (valid Cursor model)', () => {
|
||||
// gpt-5.2 is in CURSOR_MODEL_MAP
|
||||
it('should return CodexProvider for gpt-5.2 (Codex model, not Cursor)', () => {
|
||||
// gpt-5.2 is in both CURSOR_MODEL_MAP and CODEX_MODEL_CONFIG_MAP
|
||||
// It should route to Codex since Codex models take priority
|
||||
const provider = ProviderFactory.getProviderForModel('gpt-5.2');
|
||||
expect(provider).toBeInstanceOf(CursorProvider);
|
||||
expect(provider).toBeInstanceOf(CodexProvider);
|
||||
});
|
||||
|
||||
it('should return CursorProvider for grok (valid Cursor model)', () => {
|
||||
|
||||
Reference in New Issue
Block a user