@@ -50,8 +50,10 @@ describe('getValueKey', () => {
50
50
} ) ;
51
51
52
52
it ( 'should return "gpt-4o" for model type of "gpt-4o"' , ( ) => {
53
- expect ( getValueKey ( 'gpt-4o-2024-05-13' ) ) . toBe ( 'gpt-4o' ) ;
53
+ expect ( getValueKey ( 'gpt-4o-2024-08-06' ) ) . toBe ( 'gpt-4o' ) ;
54
+ expect ( getValueKey ( 'gpt-4o-2024-08-06-0718' ) ) . toBe ( 'gpt-4o' ) ;
54
55
expect ( getValueKey ( 'openai/gpt-4o' ) ) . toBe ( 'gpt-4o' ) ;
56
+ expect ( getValueKey ( 'openai/gpt-4o-2024-08-06' ) ) . toBe ( 'gpt-4o' ) ;
55
57
expect ( getValueKey ( 'gpt-4o-turbo' ) ) . toBe ( 'gpt-4o' ) ;
56
58
expect ( getValueKey ( 'gpt-4o-0125' ) ) . toBe ( 'gpt-4o' ) ;
57
59
} ) ;
@@ -60,14 +62,14 @@ describe('getValueKey', () => {
60
62
expect ( getValueKey ( 'gpt-4o-mini-2024-07-18' ) ) . toBe ( 'gpt-4o-mini' ) ;
61
63
expect ( getValueKey ( 'openai/gpt-4o-mini' ) ) . toBe ( 'gpt-4o-mini' ) ;
62
64
expect ( getValueKey ( 'gpt-4o-mini-0718' ) ) . toBe ( 'gpt-4o-mini' ) ;
63
- expect ( getValueKey ( 'gpt-4o-2024-08-06-0718' ) ) . not . toBe ( 'gpt-4o' ) ;
65
+ expect ( getValueKey ( 'gpt-4o-2024-08-06-0718' ) ) . not . toBe ( 'gpt-4o-mini ' ) ;
64
66
} ) ;
65
67
66
- it ( 'should return "gpt-4o-2024-08-06 " for model type of "gpt-4o-2024-08-06 "' , ( ) => {
67
- expect ( getValueKey ( 'gpt-4o-2024-08-06-2024-07-18 ' ) ) . toBe ( 'gpt-4o-2024-08-06 ' ) ;
68
- expect ( getValueKey ( 'openai/gpt-4o-2024-08-06 ' ) ) . toBe ( 'gpt-4o-2024-08-06 ' ) ;
69
- expect ( getValueKey ( 'gpt-4o-2024-08-06 -0718' ) ) . toBe ( 'gpt-4o-2024-08-06 ' ) ;
70
- expect ( getValueKey ( 'gpt-4o-2024-08-06 -0718' ) ) . not . toBe ( 'gpt-4o' ) ;
68
+ it ( 'should return "gpt-4o-2024-05-13 " for model type of "gpt-4o-2024-05-13 "' , ( ) => {
69
+ expect ( getValueKey ( 'gpt-4o-2024-05-13 ' ) ) . toBe ( 'gpt-4o-2024-05-13 ' ) ;
70
+ expect ( getValueKey ( 'openai/gpt-4o-2024-05-13 ' ) ) . toBe ( 'gpt-4o-2024-05-13 ' ) ;
71
+ expect ( getValueKey ( 'gpt-4o-2024-05-13 -0718' ) ) . toBe ( 'gpt-4o-2024-05-13 ' ) ;
72
+ expect ( getValueKey ( 'gpt-4o-2024-05-13 -0718' ) ) . not . toBe ( 'gpt-4o' ) ;
71
73
} ) ;
72
74
73
75
it ( 'should return "gpt-4o" for model type of "chatgpt-4o"' , ( ) => {
@@ -134,7 +136,7 @@ describe('getMultiplier', () => {
134
136
} ) ;
135
137
136
138
it ( 'should return the correct multiplier for gpt-4o' , ( ) => {
137
- const valueKey = getValueKey ( 'gpt-4o-2024-05-13 ' ) ;
139
+ const valueKey = getValueKey ( 'gpt-4o-2024-08-06 ' ) ;
138
140
expect ( getMultiplier ( { valueKey, tokenType : 'prompt' } ) ) . toBe ( tokenValues [ 'gpt-4o' ] . prompt ) ;
139
141
expect ( getMultiplier ( { valueKey, tokenType : 'completion' } ) ) . toBe (
140
142
tokenValues [ 'gpt-4o' ] . completion ,
0 commit comments