File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
src/api/providers/fetchers Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,29 @@ describe("OpenRouter API", () => {
276276 expect ( result . contextWindow ) . toBe ( 128000 )
277277 } )
278278
279+ it ( "sets horizon-beta model to 32k max tokens" , ( ) => {
280+ const mockModel = {
281+ name : "Horizon Beta" ,
282+ description : "Test model" ,
283+ context_length : 128000 ,
284+ max_completion_tokens : 128000 ,
285+ pricing : {
286+ prompt : "0.000003" ,
287+ completion : "0.000015" ,
288+ } ,
289+ }
290+
291+ const result = parseOpenRouterModel ( {
292+ id : "openrouter/horizon-beta" ,
293+ model : mockModel ,
294+ modality : "text" ,
295+ maxTokens : 128000 ,
296+ } )
297+
298+ expect ( result . maxTokens ) . toBe ( 32768 )
299+ expect ( result . contextWindow ) . toBe ( 128000 )
300+ } )
301+
279302 it ( "does not override max tokens for other models" , ( ) => {
280303 const mockModel = {
281304 name : "Other Model" ,
Original file line number Diff line number Diff line change @@ -237,5 +237,10 @@ export const parseOpenRouterModel = ({
237237 modelInfo . maxTokens = 32768
238238 }
239239
240+ // Set horizon-beta model to 32k max tokens
241+ if ( id === "openrouter/horizon-beta" ) {
242+ modelInfo . maxTokens = 32768
243+ }
244+
240245 return modelInfo
241246}
You can’t perform that action at this time.
0 commit comments