@@ -27,15 +27,23 @@ describe("OpenRouter API", () => {
2727 . filter ( ( [ _ , model ] ) => model . supportsPromptCache )
2828 . map ( ( [ id , _ ] ) => id )
2929
30- const ourCachingModels = Array . from ( OPEN_ROUTER_PROMPT_CACHING_MODELS )
30+ // Define models that are intentionally excluded
31+ const excludedModels = new Set ( [
32+ "google/gemini-2.5-pro-preview" , // Excluded due to lag issue (#4487)
33+ "google/gemini-2.5-flash" , // OpenRouter doesn't report this as supporting prompt caching
34+ "google/gemini-2.5-flash-lite-preview-06-17" , // OpenRouter doesn't report this as supporting prompt caching
35+ ] )
36+
37+ const ourCachingModels = Array . from ( OPEN_ROUTER_PROMPT_CACHING_MODELS ) . filter (
38+ ( id ) => ! excludedModels . has ( id ) ,
39+ )
3140
3241 // Verify all our caching models are actually supported by OpenRouter
3342 for ( const modelId of ourCachingModels ) {
3443 expect ( openRouterSupportedCaching ) . toContain ( modelId )
3544 }
3645
3746 // Verify we have all supported models except intentionally excluded ones
38- const excludedModels = new Set ( [ "google/gemini-2.5-pro-preview" ] ) // Excluded due to lag issue (#4487)
3947 const expectedCachingModels = openRouterSupportedCaching . filter ( ( id ) => ! excludedModels . has ( id ) ) . sort ( )
4048
4149 expect ( ourCachingModels . sort ( ) ) . toEqual ( expectedCachingModels )
@@ -109,20 +117,36 @@ describe("OpenRouter API", () => {
109117 "tngtech/deepseek-r1t-chimera:free" ,
110118 "x-ai/grok-3-mini-beta" ,
111119 ] )
120+ // OpenRouter is taking a while to update their models, so we exclude some known models
121+ const excludedReasoningBudgetModels = new Set ( [
122+ "google/gemini-2.5-flash" ,
123+ "google/gemini-2.5-flash-lite-preview-06-17" ,
124+ "google/gemini-2.5-pro" ,
125+ ] )
126+
127+ const expectedReasoningBudgetModels = Array . from ( OPEN_ROUTER_REASONING_BUDGET_MODELS )
128+ . filter ( ( id ) => ! excludedReasoningBudgetModels . has ( id ) )
129+ . sort ( )
112130
113131 expect (
114132 Object . entries ( models )
115133 . filter ( ( [ _ , model ] ) => model . supportsReasoningBudget )
116134 . map ( ( [ id , _ ] ) => id )
117135 . sort ( ) ,
118- ) . toEqual ( Array . from ( OPEN_ROUTER_REASONING_BUDGET_MODELS ) . sort ( ) )
136+ ) . toEqual ( expectedReasoningBudgetModels )
137+
138+ const excludedRequiredReasoningBudgetModels = new Set ( [ "google/gemini-2.5-pro" ] )
139+
140+ const expectedRequiredReasoningBudgetModels = Array . from ( OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS )
141+ . filter ( ( id ) => ! excludedRequiredReasoningBudgetModels . has ( id ) )
142+ . sort ( )
119143
120144 expect (
121145 Object . entries ( models )
122146 . filter ( ( [ _ , model ] ) => model . requiredReasoningBudget )
123147 . map ( ( [ id , _ ] ) => id )
124148 . sort ( ) ,
125- ) . toEqual ( Array . from ( OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS ) . sort ( ) )
149+ ) . toEqual ( expectedRequiredReasoningBudgetModels )
126150
127151 expect ( models [ "anthropic/claude-3.7-sonnet" ] ) . toEqual ( {
128152 maxTokens : 8192 ,
0 commit comments