Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(tests): give the OpenRouter free-model fixture a real runner-up again

nirholas9fd8705a864f
diff --git a/tests/api/openrouter-free-models.test.js b/tests/api/openrouter-free-models.test.js
index 285475b84..9cd4c0019 100644
--- a/tests/api/openrouter-free-models.test.js
+++ b/tests/api/openrouter-free-models.test.js
@@ -23,7 +23,12 @@ const LIVE = {
{ id: 'paid/model', context_length: 999999, supported_parameters: ['tools'] },
{ id: 'zz/no-tools:free', context_length: 900000, supported_parameters: [] },
{ id: 'google/gemma-4-31b-it:free', context_length: 262144, supported_parameters: ['tools'] },
- { id: 'google/gemma-4-31b-it:free', context_length: 131072, supported_parameters: ['tools'] },
+ // A second, distinct tool-capable id (live on OpenRouter as of
+ // 2026-09-07) so the exclusion and ranking cases have a runner-up to
+ // land on. The 2026-09-04 retirement sweep had replaced the retired
+ // gpt-oss row with a duplicate of the gemma row above, which left
+ // "skip the excluded id" expecting the very id it excluded.
+ { id: 'google/gemma-4-26b-a4b-it:free', context_length: 131072, supported_parameters: ['tools'] },
],
};
@@ -60,14 +65,16 @@ describe('rankFreeModels', () => {
expect(ranked[ranked.length - 1].id).toBe('zz/no-tools:free');
});
- it('prefers the gpt-oss family, then gemma, among tool-capable models', () => {
+ it('prefers the gemma family over a larger-context nemotron, then context within a family', () => {
const ranked = rankFreeModels([
+ { id: 'nvidia/nemotron-3-super-120b-a12b:free', context_length: 1000000, supported_parameters: ['tools'] },
+ { id: 'google/gemma-4-26b-a4b-it:free', context_length: 131072, supported_parameters: ['tools'] },
{ id: 'google/gemma-4-31b-it:free', context_length: 262144, supported_parameters: ['tools'] },
- { id: 'google/gemma-4-31b-it:free', context_length: 131072, supported_parameters: ['tools'] },
]);
expect(ranked.map((m) => m.id)).toEqual([
'google/gemma-4-31b-it:free',
- 'google/gemma-4-31b-it:free',
+ 'google/gemma-4-26b-a4b-it:free',
+ 'nvidia/nemotron-3-super-120b-a12b:free',
]);
});
@@ -156,7 +163,7 @@ describe('pickDefaultFreeModel', () => {
it('skips excluded ids so a failed model is not retried', async () => {
vi.stubGlobal('fetch', mockFetch(LIVE));
expect(await pickDefaultFreeModel({ exclude: ['google/gemma-4-31b-it:free'] })).toBe(
- 'google/gemma-4-31b-it:free',
+ 'google/gemma-4-26b-a4b-it:free',
);
});