Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/setup/gateways.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ export const KNOWN_GATEWAYS: Record<string, GatewaySpec> = {
suggestedToolCalls: true,
note: 'Very fast. Free tier has generous but real rate limits.',
},
atlascloud: {
name: 'atlascloud',
title: 'Atlas Cloud',
baseUrl: 'https://api.atlascloud.ai/v1',
apiKeyEnv: 'ATLASCLOUD_API_KEY',
keyHint: 'Get a key at https://www.atlascloud.ai/console/api-keys.',
suggestedModel: 'qwen/qwen3.5-flash',
suggestedContextWindow: 1000000,
suggestedToolCalls: true,
note: 'OpenAI-compatible LLM endpoint. Atlas Cloud media generation uses a separate API and is not configured by this LLM gateway.',
},
mistral: {
name: 'mistral',
title: 'Mistral',
Expand Down
8 changes: 7 additions & 1 deletion test/gateways.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ console.log('— normalizeBaseUrl (strip pasted endpoint paths) —');

console.log('— registry —');
{
check('has openrouter, gemini, groq', !!findGateway('openrouter') && !!findGateway('gemini') && !!findGateway('groq'));
check('has openrouter, gemini, groq, atlascloud', !!findGateway('openrouter') && !!findGateway('gemini') && !!findGateway('groq') && !!findGateway('atlascloud'));
check('lookup is case-insensitive', findGateway('OpenRouter')?.name === 'openrouter');
check('unknown returns undefined', findGateway('nope') === undefined);
check('lists several gateways', listGatewayIds().length >= 8);
Expand All @@ -38,6 +38,8 @@ console.log('— registry —');
if (!g.name || !g.baseUrl || !g.apiKeyEnv || !/^https?:\/\//.test(g.baseUrl)) allValid = false;
}
check('every gateway has name/baseUrl/apiKeyEnv with valid URL', allValid);
check('atlascloud uses the Atlas OpenAI-compatible LLM endpoint', findGateway('atlascloud')?.baseUrl === 'https://api.atlascloud.ai/v1');
check('atlascloud uses ATLASCLOUD_API_KEY', findGateway('atlascloud')?.apiKeyEnv === 'ATLASCLOUD_API_KEY');
}

console.log('— buildCustomEntry —');
Expand All @@ -47,6 +49,10 @@ console.log('— buildCustomEntry —');
check('pins suggested model', !!e.models && e.models[0].id.includes('llama'));
check('model has tool calls on', e.models![0].supportsToolCalls === true);

const atlas = buildCustomEntry({ spec: findGateway('atlascloud')! });
check('builds Atlas Cloud from spec', atlas.name === 'atlascloud' && atlas.baseUrl === 'https://api.atlascloud.ai/v1');
check('pins Atlas Cloud suggested model', atlas.models?.[0].id === 'qwen/qwen3.5-flash');

// explicit override for an unlisted gateway
const c = buildCustomEntry({ name: 'mygw', baseUrl: 'https://x.example/v1', apiKeyEnv: 'MYGW_KEY' });
check('builds from explicit fields', c.name === 'mygw' && c.apiKeyEnv === 'MYGW_KEY');
Expand Down