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
12 changes: 12 additions & 0 deletions src/ai-providers/model-semantics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,18 @@ export const MODEL_SEMANTICS_BY_VENDOR: Registry = {
},
},
},
'atlas-cloud': {
'deepseek-ai/deepseek-v4-pro': {
contextWindow: 1_000_000,
maxOutputTokens: 384_000,
reasoning: {
mode: 'optional',
efforts: ['high', 'max'],
defaultEffort: 'high',
interleaved: true,
},
},
},
longcat: {
'LongCat-2.0': {
maxOutputTokens: 131_072,
Expand Down
18 changes: 18 additions & 0 deletions src/ai-providers/preset-catalog.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { describe, expect, it } from 'vitest';

import {
ATLAS_CLOUD,
CLAUDE_API,
CLAUDE_OAUTH,
CODEX_API,
Expand Down Expand Up @@ -28,6 +29,21 @@ describe('LONGCAT preset', () => {
});
});

describe('ATLAS_CLOUD preset', () => {
it('uses the versioned OpenAI-compatible endpoint and nested model id', () => {
expect(ATLAS_CLOUD.regions?.[0]?.wires['openai-chat']).toBe('https://api.atlascloud.ai/v1');
const parsed = ATLAS_CLOUD.zodSchema.parse({
backend: 'vercel-ai-sdk',
provider: 'openai-compatible',
apiKey: 'test-key',
}) as { baseUrl?: string; model?: string };
expect(parsed).toMatchObject({
baseUrl: 'https://api.atlascloud.ai/v1',
model: 'deepseek-ai/deepseek-v4-pro',
});
});
});

describe('credential form catalog', () => {
it('uses native Claude Code aliases for subscription profiles', () => {
expect(CLAUDE_OAUTH.models?.map((model) => model.id)).toEqual([
Expand Down Expand Up @@ -160,6 +176,7 @@ describe('credential form catalog', () => {
kimi: 'kimi-k3',
deepseek: 'deepseek-v4-pro',
longcat: 'LongCat-2.0',
'atlas-cloud': 'deepseek-ai/deepseek-v4-pro',
// Runtime-direct provider: `auto` is Cursor routing, not a model API id.
cursor: 'auto',
});
Expand Down Expand Up @@ -213,6 +230,7 @@ describe('credential form catalog', () => {
kimi: 'kimi',
deepseek: 'deepseek',
longcat: 'longcat',
'atlas-cloud': 'atlas-cloud',
};

for (const [presetId, vendor] of Object.entries(vendorByPreset)) {
Expand Down
34 changes: 34 additions & 0 deletions src/ai-providers/preset-catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,38 @@ export const LONGCAT: PresetDef = {
writeOnlyFields: ['apiKey'],
}

// ==================== Third-party: Atlas Cloud ====================

export const ATLAS_CLOUD: PresetDef = {
id: 'atlas-cloud',
label: 'Atlas Cloud',
description: 'Atlas Cloud models via its OpenAI-compatible API',
category: 'third-party',
defaultName: 'Atlas Cloud',
hint: 'Uses Atlas Cloud\'s OpenAI-compatible Chat Completions endpoint. This credential can drive OpenCode and Pi.',
zodSchema: z.object({
backend: z.literal('vercel-ai-sdk'),
provider: z.literal('openai-compatible'),
baseUrl: z.string().default('https://api.atlascloud.ai/v1').describe('API endpoint'),
model: z.string().default('deepseek-ai/deepseek-v4-pro').describe('Model'),
apiKey: z.string().min(1).describe('Atlas Cloud API key'),
}),
regions: [{
id: 'default',
label: 'Atlas Cloud (api.atlascloud.ai)',
wires: { 'openai-chat': 'https://api.atlascloud.ai/v1' },
}],
models: withModelSemantics('atlas-cloud', [
{ id: 'deepseek-ai/deepseek-v4-pro', label: 'DeepSeek V4 Pro' },
]),
setup: {
apiKeyLabel: 'Atlas Cloud API key',
apiKeyHelp: 'Use an API key from the Atlas Cloud console.',
modelHelp: 'Choose a model available to the key, or paste another exact Atlas Cloud model ID.',
},
writeOnlyFields: ['apiKey'],
}

// ==================== Runtime-direct: Cursor ====================

export const CURSOR_DASHBOARD: PresetDef = {
Expand Down Expand Up @@ -560,6 +592,7 @@ export const PRESET_CATALOG: PresetDef[] = [
KIMI,
DEEPSEEK,
LONGCAT,
ATLAS_CLOUD,
GEMINI,
CURSOR_DASHBOARD,
CUSTOM,
Expand All @@ -584,5 +617,6 @@ export const DEFAULT_MODEL_BY_VENDOR: Record<string, string> = {
kimi: 'kimi-k3',
deepseek: 'deepseek-v4-pro',
longcat: 'LongCat-2.0',
'atlas-cloud': 'deepseek-ai/deepseek-v4-pro',
cursor: 'auto',
}