From a519fea3407fa1ce3a55f9fcc7e72ecc1a6ca1b2 Mon Sep 17 00:00:00 2001 From: OpenClaude Date: Thu, 30 Jul 2026 11:39:37 +0800 Subject: [PATCH] test(opengateway): add Macaron regression coverage + picker expectation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/commands/model/model.test.tsx | 1 + src/integrations/macaron.test.ts | 47 +++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 src/integrations/macaron.test.ts diff --git a/src/commands/model/model.test.tsx b/src/commands/model/model.test.tsx index b1fa69040..58c4513a6 100644 --- a/src/commands/model/model.test.tsx +++ b/src/commands/model/model.test.tsx @@ -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 { diff --git a/src/integrations/macaron.test.ts b/src/integrations/macaron.test.ts new file mode 100644 index 000000000..cbb16127d --- /dev/null +++ b/src/integrations/macaron.test.ts @@ -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 }) + }) +})