Apex — Forge Integration
How Forge (cmmd-forge) calls Apex endpoints via the apex provider.
Status: draft. Wiring not yet in Forge code as of 2026-05-19. This page describes the intended integration. Tracked in FORGE-20.
Integration point in Forge
Section titled “Integration point in Forge”Forge’s apex provider is at apps/server/src/provider/Layers/ApexProvider.ts. The provider routes through the Claude Agent SDK — each profile in DEFAULT_APEX_PROFILES (defined in packages/contracts/src/settings.ts:215) carries its own Anthropic-compatible base URL + API key.
This pattern is already in place; we just add new profiles for our local Apex endpoints.
Profiles to add to DEFAULT_APEX_PROFILES
Section titled “Profiles to add to DEFAULT_APEX_PROFILES”export const DEFAULT_APEX_PROFILES: ReadonlyArray<ClaudeEndpointProfile> = [ // ... existing profiles (apex-flash, apex-general, apex-reason, apex-core) ...
// NEW: local apex tier (Sentinel) { slug: "apex-core-local", displayName: "Apex Core (Local)", description: "Local production model on Sentinel.", apiModelId: "apex-core", baseUrl: "https://apex-api.cmmd.ai", apiKey: "", // env: APEX_API_KEY disableToolSearch: false, },
// NEW: lab tier (Ryzen) { slug: "lab-flash", displayName: "Lab Flash", description: "Fast multimodal — experimental tier.", apiModelId: "lab-flash", baseUrl: "https://lab-apex-api.cmmd.ai", apiKey: "", // env: APEX_API_KEY (same key) disableToolSearch: false, }, { slug: "lab-general", displayName: "Lab General", description: "Experimental workhorse model.", apiModelId: "lab-general", baseUrl: "https://lab-apex-api.cmmd.ai", apiKey: "", disableToolSearch: false, },];The Forge ApexProvider.ts checkApexProviderStatus() function already resolves env-based keys via resolveApexApiKey() — no additional plumbing needed.
Env var
Section titled “Env var”APEX_API_KEY=<master_key>Single env var serves both endpoints (same key on both proxies).
Forge user-facing surface
Section titled “Forge user-facing surface”In Forge Settings → Providers, the CMMD card (powered by provider: apex) will list:
- Apex Core (Local) — apex-core-local
- Lab Flash — lab-flash
- Lab General — lab-general
…alongside the existing apex-flash/apex-general/apex-reason/apex-core cloud-backed profiles.
Per
architecture-cmmd-card-apex-provider-mapping: the visible “CMMD” card maps to theapexprovider key, not thecmmdkey. Changes to provider behavior need to touch BOTH ApexProvider.ts and CMMDProvider.ts.
Related
Section titled “Related”- Architecture — endpoint topology
- API Reference — request shape
- CMMD integration — parallel integration in CMMD platform
- Source:
cmmd-forge/apps/server/src/provider/