test(opengateway): add Macaron regression coverage + picker expectation

Adds macaron.test.ts (descriptor capabilities/limits, gateway catalog
apiName/modelDescriptorId wiring, runtime limits — tencent.test.ts
pattern) and includes mindai/macaron-v1-tall in the /model picker's
expected opengateway option list.
This commit is contained in:
OpenClaude
2026-07-30 11:39:37 +08:00
parent 6826e806d3
commit a519fea340
2 changed files with 48 additions and 0 deletions
+1
View File
@@ -1448,6 +1448,7 @@ test('/model applies auto provider surface for single-model static descriptor pr
'z-ai/glm-5.2',
'nvidia/nemotron-3-ultra-550b-a55b:free',
'inclusionai/ling-3.0-flash:free',
'mindai/macaron-v1-tall',
'tencent/hy3',
])
} finally {
+47
View File
@@ -0,0 +1,47 @@
import { describe, expect, test } from 'bun:test'
import {
getCatalogEntriesForRoute,
getModel,
getModelsForBrand,
} from './index.js'
import { resolveModelRuntimeLimits } from './runtimeMetadata.js'
describe('Macaron V1 Tall descriptor', () => {
test('exposes the verified Macaron capabilities and limits to gateway catalogs', () => {
const model = getModel('mindai/macaron-v1-tall')
expect(model).toBeDefined()
expect(model).toMatchObject({
id: 'mindai/macaron-v1-tall',
brandId: 'macaron',
classification: ['chat', 'reasoning', 'coding'],
contextWindow: 262_144,
maxOutputTokens: 32_768,
capabilities: {
supportsVision: false,
supportsStreaming: true,
supportsFunctionCalling: true,
supportsJsonMode: false,
supportsReasoning: true,
},
})
expect(getModelsForBrand('macaron').map(m => m.id)).toContain(
'mindai/macaron-v1-tall',
)
const catalogEntry = getCatalogEntriesForRoute('gitlawb-opengateway').find(
entry => entry.apiName === 'mindai/macaron-v1-tall',
)
expect(catalogEntry?.id).toBe('opengateway-macaron-v1-tall')
expect(catalogEntry?.modelDescriptorId).toBe(model?.id)
expect(
resolveModelRuntimeLimits({
model: 'mindai/macaron-v1-tall',
baseUrl: 'https://opengateway.gitlawb.com/v1',
processEnv: {},
}),
).toEqual({ contextWindow: 262_144, maxOutputTokens: 32_768 })
})
})