File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,30 @@ describe("xAI OAuth provider projection", () => {
4040 expect ( models . filter ( ( m ) => m === "grok-4.7" ) ) . toHaveLength ( 1 ) ;
4141 } ) ;
4242
43+ test ( "skips grok-4.7 insert when the vendor list starts with it" , ( ) => {
44+ const vendor = [
45+ "grok-4.7" ,
46+ "grok-4.5" ,
47+ "grok-4.6" ,
48+ "grok-composer-2.5-fast" ,
49+ ] as const ;
50+ const models = extendVendorXaiDefaultModels ( vendor ) ;
51+ expect ( models ) . toEqual ( vendor ) ;
52+ expect ( models . filter ( ( m ) => m === "grok-4.7" ) ) . toHaveLength ( 1 ) ;
53+ } ) ;
54+
55+ test ( "skips grok-4.7 insert when the vendor list ends with it" , ( ) => {
56+ const vendor = [
57+ "grok-4.5" ,
58+ "grok-4.6" ,
59+ "grok-composer-2.5-fast" ,
60+ "grok-4.7" ,
61+ ] as const ;
62+ const models = extendVendorXaiDefaultModels ( vendor ) ;
63+ expect ( models ) . toEqual ( vendor ) ;
64+ expect ( models . filter ( ( m ) => m === "grok-4.7" ) ) . toHaveLength ( 1 ) ;
65+ } ) ;
66+
4367 test ( "inserts grok-4.7 after the second vendor model when absent" , ( ) => {
4468 expect (
4569 extendVendorXaiDefaultModels ( [
You can’t perform that action at this time.
0 commit comments