diff --git a/src/ai-providers/model-semantics.ts b/src/ai-providers/model-semantics.ts index bdfc2991c..34334e35a 100644 --- a/src/ai-providers/model-semantics.ts +++ b/src/ai-providers/model-semantics.ts @@ -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, diff --git a/src/ai-providers/preset-catalog.spec.ts b/src/ai-providers/preset-catalog.spec.ts index 8a7cec647..ce8c94976 100644 --- a/src/ai-providers/preset-catalog.spec.ts +++ b/src/ai-providers/preset-catalog.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest'; import { + ATLAS_CLOUD, CLAUDE_API, CLAUDE_OAUTH, CODEX_API, @@ -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([ @@ -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', }); @@ -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)) { diff --git a/src/ai-providers/preset-catalog.ts b/src/ai-providers/preset-catalog.ts index 1ca395090..a8feb4ef5 100644 --- a/src/ai-providers/preset-catalog.ts +++ b/src/ai-providers/preset-catalog.ts @@ -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 = { @@ -560,6 +592,7 @@ export const PRESET_CATALOG: PresetDef[] = [ KIMI, DEEPSEEK, LONGCAT, + ATLAS_CLOUD, GEMINI, CURSOR_DASHBOARD, CUSTOM, @@ -584,5 +617,6 @@ export const DEFAULT_MODEL_BY_VENDOR: Record = { kimi: 'kimi-k3', deepseek: 'deepseek-v4-pro', longcat: 'LongCat-2.0', + 'atlas-cloud': 'deepseek-ai/deepseek-v4-pro', cursor: 'auto', }