@@ -34,6 +34,13 @@ describe("opencode-go registry", () => {
3434 "deepseek-v4-pro" ,
3535 "deepseek-v4-flash" ,
3636 ]
37+ const responsesFormatModels = [
38+ "gpt-5.6-luna" ,
39+ "grok-4.5" ,
40+ "grok-4.6" ,
41+ "muse-spark-1.3-contributor" ,
42+ "muse-spark-1.2-contributor" ,
43+ ]
3744
3845 describe ( "isOpencodeGoAnthropicFormatModel" , ( ) => {
3946 it ( "classifies Qwen and MiniMax models as Anthropic-format" , ( ) => {
@@ -134,11 +141,13 @@ describe("opencode-go registry", () => {
134141
135142 describe ( "OPENCODE_GO_RESPONSES_FORMAT_MODELS" , ( ) => {
136143 it ( "contains exactly the Responses-only models" , ( ) => {
137- expect ( [ ...OPENCODE_GO_RESPONSES_FORMAT_MODELS ] . sort ( ) ) . toEqual ( [ "gpt-5.6-luna" ] )
144+ expect ( [ ...OPENCODE_GO_RESPONSES_FORMAT_MODELS ] . sort ( ) ) . toEqual ( [ ... responsesFormatModels ] . sort ( ) )
138145 } )
139146
140- it ( "classifies gpt-5.6-luna as Responses-format" , ( ) => {
141- expect ( isOpencodeGoResponsesFormatModel ( "gpt-5.6-luna" ) ) . toBe ( true )
147+ it ( "classifies every Responses-only model as Responses-format" , ( ) => {
148+ for ( const id of responsesFormatModels ) {
149+ expect ( isOpencodeGoResponsesFormatModel ( id ) ) . toBe ( true )
150+ }
142151 } )
143152
144153 it ( "classifies Anthropic-format and OpenAI-compatible models as non-Responses-format" , ( ) => {
@@ -157,6 +166,7 @@ describe("opencode-go registry", () => {
157166
158167 it ( "curates gpt-5.6-luna with its Go Responses capabilities" , ( ) => {
159168 expect ( getOpencodeGoModelInfo ( "gpt-5.6-luna" ) ) . toMatchObject ( {
169+ supportsMaxTokens : true ,
160170 maxTokens : 128_000 ,
161171 contextWindow : 1_050_000 ,
162172 supportsImages : true ,
@@ -185,6 +195,195 @@ describe("opencode-go registry", () => {
185195 } )
186196
187197 describe ( "opencodeGoModels registry invariants" , ( ) => {
198+ it . each ( [
199+ {
200+ id : "glm-5.3-flash" ,
201+ expected : {
202+ maxTokens : 131_072 ,
203+ contextWindow : 1_000_000 ,
204+ supportsImages : true ,
205+ supportsPromptCache : true ,
206+ supportsMaxTokens : true ,
207+ supportsReasoningEffort : [ "low" , "high" , "max" ] ,
208+ inputPrice : 0.075 ,
209+ outputPrice : 0.25 ,
210+ cacheReadsPrice : 0.015 ,
211+ } ,
212+ } ,
213+ {
214+ id : "kimi-k2.7-code" ,
215+ expected : {
216+ maxTokens : 262_144 ,
217+ contextWindow : 262_144 ,
218+ supportsImages : true ,
219+ supportsPromptCache : true ,
220+ supportsMaxTokens : true ,
221+ inputPrice : 0.95 ,
222+ outputPrice : 4 ,
223+ cacheReadsPrice : 0.19 ,
224+ } ,
225+ } ,
226+ {
227+ id : "longcat-2.0" ,
228+ expected : {
229+ maxTokens : 131_072 ,
230+ contextWindow : 1_000_000 ,
231+ supportsImages : false ,
232+ supportsReasoningBinary : true ,
233+ inputPrice : 0.3 ,
234+ outputPrice : 1.2 ,
235+ cacheReadsPrice : 0.006 ,
236+ } ,
237+ } ,
238+ {
239+ id : "mimo-v2-pro" ,
240+ expected : {
241+ maxTokens : 128_000 ,
242+ contextWindow : 1_048_576 ,
243+ supportsImages : false ,
244+ supportsPromptCache : false ,
245+ inputPrice : 1 ,
246+ outputPrice : 3 ,
247+ cacheReadsPrice : 0.2 ,
248+ longContextPricing : {
249+ thresholdTokens : 256_000 ,
250+ inputPriceMultiplier : 2 ,
251+ outputPriceMultiplier : 2 ,
252+ cacheReadsPriceMultiplier : 2 ,
253+ } ,
254+ } ,
255+ } ,
256+ {
257+ id : "mimo-v2-omni" ,
258+ expected : {
259+ maxTokens : 128_000 ,
260+ contextWindow : 262_144 ,
261+ supportsImages : true ,
262+ supportsPromptCache : false ,
263+ inputPrice : 0.4 ,
264+ outputPrice : 2 ,
265+ cacheReadsPrice : 0.08 ,
266+ } ,
267+ } ,
268+ {
269+ id : "qwen3.5-plus" ,
270+ expected : {
271+ maxTokens : 65_536 ,
272+ contextWindow : 262_144 ,
273+ supportsImages : true ,
274+ supportsReasoningBudget : true ,
275+ supportsReasoningBinary : true ,
276+ inputPrice : 0.2 ,
277+ outputPrice : 1.2 ,
278+ cacheReadsPrice : 0.02 ,
279+ cacheWritesPrice : 0.25 ,
280+ } ,
281+ } ,
282+ {
283+ id : "qwen3.8-flash" ,
284+ expected : {
285+ maxTokens : 131_072 ,
286+ contextWindow : 1_000_000 ,
287+ supportsImages : true ,
288+ supportsMaxTokens : true ,
289+ supportsReasoningBudget : true ,
290+ supportsReasoningBinary : true ,
291+ inputPrice : 0.15 ,
292+ outputPrice : 0.47 ,
293+ cacheReadsPrice : 0.016 ,
294+ cacheWritesPrice : 0.2 ,
295+ } ,
296+ } ,
297+ {
298+ id : "deepseek-v4-flash-vision-exp" ,
299+ expected : {
300+ maxTokens : 384_000 ,
301+ contextWindow : 1_000_000 ,
302+ supportsImages : true ,
303+ supportsReasoningEffort : [ "disable" , "low" , "high" , "max" ] ,
304+ inputPrice : 0.22 ,
305+ outputPrice : 0.66 ,
306+ cacheReadsPrice : 0.007 ,
307+ } ,
308+ } ,
309+ {
310+ id : "hy4-preview" ,
311+ expected : {
312+ maxTokens : 64_000 ,
313+ contextWindow : 1_024_000 ,
314+ supportsImages : false ,
315+ supportsReasoningEffort : [ "disable" , "high" ] ,
316+ inputPrice : 0.834 ,
317+ outputPrice : 2.501 ,
318+ cacheReadsPrice : 0.042 ,
319+ } ,
320+ } ,
321+ ...( [ "hy3" , "hy3-preview" ] as const ) . map ( ( id ) => ( {
322+ id,
323+ expected : {
324+ maxTokens : 64_000 ,
325+ contextWindow : 256_000 ,
326+ supportsImages : false ,
327+ supportsReasoningEffort : [ "disable" , "low" , "high" ] ,
328+ inputPrice : 0.0175 ,
329+ outputPrice : 0.0725 ,
330+ cacheReadsPrice : 0.004375 ,
331+ } ,
332+ } ) ) ,
333+ {
334+ id : "grok-4.5" ,
335+ expected : {
336+ maxTokens : 500_000 ,
337+ contextWindow : 500_000 ,
338+ supportsImages : true ,
339+ supportsReasoningEffort : [ "low" , "medium" , "high" ] ,
340+ inputPrice : 2 ,
341+ outputPrice : 6 ,
342+ cacheReadsPrice : 0.3 ,
343+ longContextPricing : {
344+ thresholdTokens : 200_000 ,
345+ inputPriceMultiplier : 2 ,
346+ outputPriceMultiplier : 2 ,
347+ cacheReadsPriceMultiplier : 2 ,
348+ } ,
349+ } ,
350+ } ,
351+ {
352+ id : "grok-4.6" ,
353+ expected : {
354+ maxTokens : 500_000 ,
355+ contextWindow : 500_000 ,
356+ supportsImages : true ,
357+ supportsReasoningEffort : [ "low" , "medium" , "high" , "xhigh" ] ,
358+ inputPrice : 2 ,
359+ outputPrice : 6 ,
360+ cacheReadsPrice : 0.5 ,
361+ longContextPricing : {
362+ thresholdTokens : 200_000 ,
363+ inputPriceMultiplier : 2 ,
364+ outputPriceMultiplier : 2 ,
365+ cacheReadsPriceMultiplier : 2 ,
366+ } ,
367+ } ,
368+ } ,
369+ ...( [ "muse-spark-1.3-contributor" , "muse-spark-1.2-contributor" ] as const ) . map ( ( id ) => ( {
370+ id,
371+ expected : {
372+ maxTokens : 131_072 ,
373+ contextWindow : 1_048_576 ,
374+ supportsImages : true ,
375+ supportsPromptCache : true ,
376+ supportsMaxTokens : true ,
377+ supportsReasoningEffort : [ "minimal" , "low" , "medium" , "high" , "xhigh" ] ,
378+ inputPrice : 0.1 ,
379+ outputPrice : 0.2 ,
380+ cacheReadsPrice : 0.002 ,
381+ } ,
382+ } ) ) ,
383+ ] ) ( "keeps independently asserted metadata for $id" , ( { id, expected } ) => {
384+ expect ( getOpencodeGoModelInfo ( id ) ) . toMatchObject ( expected )
385+ } )
386+
188387 it ( "every entry has a positive maxTokens and contextWindow" , ( ) => {
189388 for ( const [ id , info ] of Object . entries ( opencodeGoModels ) ) {
190389 expect ( info . maxTokens ) . toBeGreaterThan ( 0 )
0 commit comments