@@ -105,36 +105,40 @@ describe("Ollama bridge routes", () => {
105105 expect ( body . models [ 0 ] . digest ) . toMatch ( / ^ [ a - f 0 - 9 ] { 64 } $ / ) ;
106106 } ) ;
107107
108- it ( "returns model show metadata and can suppress vision capability" , async ( ) => {
109- fetchMock . mockResolvedValueOnce ( json ( {
110- id : "gpt-5.4-mini" ,
111- displayName : "GPT 5.4 mini" ,
112- inputModalities : [ "text" , "image" ] ,
113- supportedReasoningEfforts : [ { reasoningEffort : "medium" } ] ,
114- defaultReasoningEffort : "medium" ,
115- } ) ) ;
116- const app = createApp ( true ) ;
117-
118- const res = await app . request ( "/api/show" , {
119- method : "POST" ,
120- headers : { "Content-Type" : "application/json" } ,
121- body : JSON . stringify ( { model : "gpt-5.4-mini" } ) ,
122- } ) ;
123-
124- expect ( res . status ) . toBe ( 200 ) ;
125- expect ( fetchMock ) . toHaveBeenCalledWith (
126- "http://upstream.test/v1/models/gpt-5.4-mini/info" ,
127- expect . any ( Object ) ,
128- ) ;
129- const body = await res . json ( ) as Record < string , unknown > ;
130- expect ( body . capabilities ) . toEqual ( [ "completion" , "tools" , "thinking" ] ) ;
131- expect ( body . parameters ) . toBe ( "num_ctx 272000\nreasoning medium" ) ;
132- expect ( body . model_info ) . toMatchObject ( {
133- "gpt-5.4.context_length" : 272000 ,
134- upstream_id : "gpt-5.4-mini" ,
135- input_modalities : [ "text" , "image" ] ,
108+ it . each ( [ "gpt-5.5" , "gpt-5.4-mini" ] ) (
109+ "returns 400k context metadata for %s and can suppress vision capability" ,
110+ async ( model ) => {
111+ fetchMock . mockResolvedValueOnce ( json ( {
112+ id : model ,
113+ displayName : model ,
114+ inputModalities : [ "text" , "image" ] ,
115+ supportedReasoningEfforts : [ { reasoningEffort : "medium" } ] ,
116+ defaultReasoningEffort : "medium" ,
117+ } ) ) ;
118+ const app = createApp ( true ) ;
119+
120+ const res = await app . request ( "/api/show" , {
121+ method : "POST" ,
122+ headers : { "Content-Type" : "application/json" } ,
123+ body : JSON . stringify ( { model } ) ,
124+ } ) ;
125+
126+ expect ( res . status ) . toBe ( 200 ) ;
127+ expect ( fetchMock ) . toHaveBeenCalledWith (
128+ `http://upstream.test/v1/models/${ model } /info` ,
129+ expect . any ( Object ) ,
130+ ) ;
131+ const body = await res . json ( ) as Record < string , unknown > ;
132+ expect ( body . capabilities ) . toEqual ( [ "completion" , "tools" , "thinking" ] ) ;
133+ expect ( body . parameters ) . toBe ( "num_ctx 400000\nreasoning medium" ) ;
134+ const architecture = model . startsWith ( "gpt-5.4" ) ? "gpt-5.4" : model ;
135+ expect ( body . model_info ) . toMatchObject ( {
136+ [ `${ architecture } .context_length` ] : 400000 ,
137+ context_length : 400000 ,
138+ upstream_id : model ,
139+ input_modalities : [ "text" , "image" ] ,
140+ } ) ;
136141 } ) ;
137- } ) ;
138142
139143 it ( "converts non-streaming Ollama chat requests and responses" , async ( ) => {
140144 fetchMock . mockResolvedValueOnce ( json ( {
0 commit comments