feat: add Atlas Cloud as LLM provider for agents#2430
Conversation
Atlas Cloud offers 59 frontier models (DeepSeek-V4, Qwen3, Kimi K2, GPT-5, Gemini 2.5 Pro, Claude, Grok-4, and more) via a single OpenAI-compatible endpoint. This commit registers Atlas Cloud as an agent provider in Emdash, letting users configure any OpenAI-compatible CLI agent (e.g. opencode) to route through Atlas Cloud's API. - Add 'atlascloud' to AGENT_PROVIDER_IDS and AGENT_PROVIDERS registry - Wire atlas.png icon in the renderer provider meta map - Add Atlas Cloud sponsor/info block at the top of README
Greptile SummaryThis PR registers Atlas Cloud as a new LLM provider by adding an
Confidence Score: 2/5Not safe to merge as-is — selecting this provider delivers a regular opencode session rather than an Atlas Cloud-backed one, and it pollutes the provider list by making both opencode and atlascloud appear installed at the same time. The atlascloud entry is functionally identical to the existing opencode entry: same binary, same install command, same flags. Nothing in the registration routes traffic to Atlas Cloud's API, so the provider does not do what it advertises. The duplicate-command detection issue will also surface immediately for any user who already has opencode installed. apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.ts needs the most attention — the duplicate command conflict, missing API configuration, and missing hook support flag are all concentrated there.
|
| Filename | Overview |
|---|---|
| apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.ts | Adds atlascloud provider backed by the same opencode CLI binary — duplicate command detection will mark both providers as available simultaneously, there is no mechanism to configure opencode to use Atlas Cloud's API endpoint, and supportsHooks: true is missing. |
| apps/emdash-desktop/src/renderer/lib/providers/meta.ts | Adds atlas.png icon import and maps it in the ICONS record; straightforward and consistent with how other PNG providers are registered. |
| README.md | Inserts a large Atlas Cloud sponsor/promotional block (76 lines with UTM-tracked links and a 59-model table) at the very top of the README, above all existing project content. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User selects Atlas Cloud provider] --> B[emdash runs installCommand\nnpm install -g opencode-ai]
B --> C[opencode binary on PATH]
C --> D{DependencyManager probeAll}
D --> E[Probes 'opencode' provider\ncommands: opencode]
D --> F[Probes 'atlascloud' provider\ncommands: opencode]
E --> G[Both resolve same binary\nopencode available]
F --> G
G --> H[Both 'opencode' AND 'atlascloud'\nshow as available in UI]
C --> I[User starts Atlas Cloud session]
I --> J[opencode CLI launched\nwith default config]
J --> K{API endpoint?}
K -->|No env vars / flags configured| L[opencode default backend\nNOT Atlas Cloud API]
K -->|Expected| M[Atlas Cloud API endpoint]
style L fill:#f88,stroke:#c00
style M fill:#8f8,stroke:#080
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 3
apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.ts:662-680
**Duplicate command detection with existing `opencode` provider**
Both `atlascloud` and the existing `opencode` provider set `commands: ['opencode']` and `installCommand: 'npm install -g opencode-ai'`. The `buildAgentDependencies()` function in `registry.ts` creates an independent `DependencyDescriptor` per provider, so both descriptors resolve the same binary. This means any user who has `opencode` on their `PATH` will see *both* "Atlas Cloud" and "OpenCode" reported as `available` simultaneously — even though they have only one binary installed. This is likely to confuse users browsing the provider list.
### Issue 2 of 3
apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.ts:676-681
**Missing `supportsHooks: true`**
The `opencode` provider sets `supportsHooks: true`, which enables emdash hooks (e.g. the `SessionStart` hook that captures the rollout session ID for reliable conversation resumption). The `atlascloud` entry uses the exact same CLI (`opencode`) but omits this flag, so hooks will silently not fire during Atlas Cloud sessions even though the underlying binary fully supports them.
```suggestion
resumeWithoutSessionFlag: '--continue',
icon: 'atlas.png',
alt: 'Atlas Cloud',
terminalOnly: true,
supportsHooks: true,
},
];
```
### Issue 3 of 3
apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.ts:662-680
**No actual API endpoint configuration for Atlas Cloud**
The `atlascloud` entry installs and invokes the stock `opencode-ai` CLI, which by default points at opencode's own inference backend — not Atlas Cloud's API. There is no mechanism here (no env var injection, no config file write, no extra CLI flags) to redirect the CLI to Atlas Cloud's endpoint. The description even acknowledges this gap ("Configure any OpenAI-compatible agent CLI to use Atlas Cloud as the LLM backend"), but the provider registration provides no guidance or automation for that step. Without configuration, a user who picks this provider will get a plain opencode session backed by opencode's default models, indistinguishable from choosing the `opencode` provider.
Reviews (1): Last reviewed commit: "feat: add Atlas Cloud as LLM provider fo..." | Re-trigger Greptile
| id: 'atlascloud', | ||
| name: 'Atlas Cloud', | ||
| description: | ||
| 'Atlas Cloud provides 59 frontier models (DeepSeek-V4, Qwen3, Kimi K2, GPT-5, Gemini 2.5 Pro, Claude, Grok-4…) via a single OpenAI-compatible endpoint. Configure any OpenAI-compatible agent CLI to use Atlas Cloud as the LLM backend.', | ||
| docUrl: 'https://www.atlascloud.ai/docs', | ||
| installCommand: 'npm install -g opencode-ai', | ||
| commands: ['opencode'], | ||
| versionArgs: ['--version'], | ||
| cli: 'opencode', | ||
| autoApproveViaEnv: true, | ||
| initialPromptFlag: '--prompt', | ||
| resumeFlag: '--session', | ||
| sessionIdFlag: '--session', | ||
| sessionIdOnResumeOnly: true, | ||
| resumeWithoutSessionFlag: '--continue', | ||
| icon: 'atlas.png', | ||
| alt: 'Atlas Cloud', | ||
| terminalOnly: true, | ||
| }, |
There was a problem hiding this comment.
Duplicate command detection with existing
opencode provider
Both atlascloud and the existing opencode provider set commands: ['opencode'] and installCommand: 'npm install -g opencode-ai'. The buildAgentDependencies() function in registry.ts creates an independent DependencyDescriptor per provider, so both descriptors resolve the same binary. This means any user who has opencode on their PATH will see both "Atlas Cloud" and "OpenCode" reported as available simultaneously — even though they have only one binary installed. This is likely to confuse users browsing the provider list.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.ts
Line: 662-680
Comment:
**Duplicate command detection with existing `opencode` provider**
Both `atlascloud` and the existing `opencode` provider set `commands: ['opencode']` and `installCommand: 'npm install -g opencode-ai'`. The `buildAgentDependencies()` function in `registry.ts` creates an independent `DependencyDescriptor` per provider, so both descriptors resolve the same binary. This means any user who has `opencode` on their `PATH` will see *both* "Atlas Cloud" and "OpenCode" reported as `available` simultaneously — even though they have only one binary installed. This is likely to confuse users browsing the provider list.
How can I resolve this? If you propose a fix, please make it concise.| resumeWithoutSessionFlag: '--continue', | ||
| icon: 'atlas.png', | ||
| alt: 'Atlas Cloud', | ||
| terminalOnly: true, | ||
| }, | ||
| ]; |
There was a problem hiding this comment.
The opencode provider sets supportsHooks: true, which enables emdash hooks (e.g. the SessionStart hook that captures the rollout session ID for reliable conversation resumption). The atlascloud entry uses the exact same CLI (opencode) but omits this flag, so hooks will silently not fire during Atlas Cloud sessions even though the underlying binary fully supports them.
| resumeWithoutSessionFlag: '--continue', | |
| icon: 'atlas.png', | |
| alt: 'Atlas Cloud', | |
| terminalOnly: true, | |
| }, | |
| ]; | |
| resumeWithoutSessionFlag: '--continue', | |
| icon: 'atlas.png', | |
| alt: 'Atlas Cloud', | |
| terminalOnly: true, | |
| supportsHooks: true, | |
| }, | |
| ]; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.ts
Line: 676-681
Comment:
**Missing `supportsHooks: true`**
The `opencode` provider sets `supportsHooks: true`, which enables emdash hooks (e.g. the `SessionStart` hook that captures the rollout session ID for reliable conversation resumption). The `atlascloud` entry uses the exact same CLI (`opencode`) but omits this flag, so hooks will silently not fire during Atlas Cloud sessions even though the underlying binary fully supports them.
```suggestion
resumeWithoutSessionFlag: '--continue',
icon: 'atlas.png',
alt: 'Atlas Cloud',
terminalOnly: true,
supportsHooks: true,
},
];
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| id: 'atlascloud', | ||
| name: 'Atlas Cloud', | ||
| description: | ||
| 'Atlas Cloud provides 59 frontier models (DeepSeek-V4, Qwen3, Kimi K2, GPT-5, Gemini 2.5 Pro, Claude, Grok-4…) via a single OpenAI-compatible endpoint. Configure any OpenAI-compatible agent CLI to use Atlas Cloud as the LLM backend.', | ||
| docUrl: 'https://www.atlascloud.ai/docs', | ||
| installCommand: 'npm install -g opencode-ai', | ||
| commands: ['opencode'], | ||
| versionArgs: ['--version'], | ||
| cli: 'opencode', | ||
| autoApproveViaEnv: true, | ||
| initialPromptFlag: '--prompt', | ||
| resumeFlag: '--session', | ||
| sessionIdFlag: '--session', | ||
| sessionIdOnResumeOnly: true, | ||
| resumeWithoutSessionFlag: '--continue', | ||
| icon: 'atlas.png', | ||
| alt: 'Atlas Cloud', | ||
| terminalOnly: true, | ||
| }, |
There was a problem hiding this comment.
No actual API endpoint configuration for Atlas Cloud
The atlascloud entry installs and invokes the stock opencode-ai CLI, which by default points at opencode's own inference backend — not Atlas Cloud's API. There is no mechanism here (no env var injection, no config file write, no extra CLI flags) to redirect the CLI to Atlas Cloud's endpoint. The description even acknowledges this gap ("Configure any OpenAI-compatible agent CLI to use Atlas Cloud as the LLM backend"), but the provider registration provides no guidance or automation for that step. Without configuration, a user who picks this provider will get a plain opencode session backed by opencode's default models, indistinguishable from choosing the opencode provider.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.ts
Line: 662-680
Comment:
**No actual API endpoint configuration for Atlas Cloud**
The `atlascloud` entry installs and invokes the stock `opencode-ai` CLI, which by default points at opencode's own inference backend — not Atlas Cloud's API. There is no mechanism here (no env var injection, no config file write, no extra CLI flags) to redirect the CLI to Atlas Cloud's endpoint. The description even acknowledges this gap ("Configure any OpenAI-compatible agent CLI to use Atlas Cloud as the LLM backend"), but the provider registration provides no guidance or automation for that step. Without configuration, a user who picks this provider will get a plain opencode session backed by opencode's default models, indistinguishable from choosing the `opencode` provider.
How can I resolve this? If you propose a fix, please make it concise.Greptile review caught that the atlascloud provider reused commands: ['opencode'] and the same installCommand as the native opencode provider, causing both to probe the same binary indistinguishably (buildAgentDependencies keys each provider's dependency on its `commands`, so any user with opencode installed made atlascloud spuriously report "available"). On top of that, a spawned atlascloud session ran plain opencode with no Atlas routing at all. Atlas Cloud is an OpenAI-compatible API endpoint reached *through* the opencode CLI, not a separate binary, so configure it via env injection instead of duplicating the CLI provider: - Drop the duplicated commands/installCommand and mark atlascloud detectable:false so it no longer registers a second, identical opencode dependency probe. - Inject OPENAI_BASE_URL=https://api.atlascloud.ai/v1 (user-overridable) and inherit opencode's auto-approve permission env in resolveProviderEnv; the API key is supplied via the provider's env settings (ATLASCLOUD_API_KEY/OPENAI_API_KEY). - Share opencode's session-id validation for atlascloud (runs via opencode). - Add the missing atlascloud entry to agentConfig (Record<AgentProviderId> was incomplete, breaking the renderer/typecheck) and fix meta.ts import ordering. - Cover the new env behavior with provider-env tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Good catch on the
Typecheck, lint, and the provider-env/agent-command test suites all pass. Thanks for flagging! |
|
Hi @lucaszhu-hue, thanks for opening this and for contributing support for Atlas Cloud. We’ll review the wiring and the feedback above carefully, then follow up here in the comments. In the meantime, could you take a look at the comments Greptile made on the implementation? Also curious: what made you choose Atlas Cloud as the provider to add here? |
Adds Atlas Cloud as a supported LLM provider for Emdash agents.
Atlas Cloud provides 59 frontier models (DeepSeek-V4, Qwen3, Kimi K2, GPT-5, Gemini 2.5 Pro, Claude, Grok-4…) through a single OpenAI-compatible endpoint — perfect for powering multi-agent workflows in Emdash.
What's included:
atlascloudas a named provider in the agent registry, backed by opencode CLI configured against Atlas Cloud's APIView all models · Coding Plan