fix(models): preserve implicit vision models

This commit is contained in:
Peter Steinberger
2026-01-12 19:08:53 +00:00
parent bb7397c636
commit a0a7e74a62
2 changed files with 65 additions and 6 deletions

View File

@@ -487,9 +487,14 @@ describe("models config", () => {
const modelPath = path.join(resolveClawdbotAgentDir(), "models.json");
const raw = await fs.readFile(modelPath, "utf8");
const parsed = JSON.parse(raw) as {
providers: Record<string, { apiKey?: string }>;
providers: Record<
string,
{ apiKey?: string; models?: Array<{ id: string }> }
>;
};
expect(parsed.providers.minimax?.apiKey).toBe("MINIMAX_API_KEY");
const ids = parsed.providers.minimax?.models?.map((model) => model.id);
expect(ids).toContain("MiniMax-VL-01");
} finally {
if (prevKey === undefined) delete process.env.MINIMAX_API_KEY;
else process.env.MINIMAX_API_KEY = prevKey;