You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: add CommandCode as an AI provider #140
JobSync's AI features support a fixed set of providers: Ollama, OpenAI, DeepSeek, Gemini, and OpenRouter. There is no way to use CommandCode (https://api.commandcode.ai) even though it exposes an OpenAI-compatible API and serves Claude, GPT, Gemini, and open models behind a single API key. Users who already have a CommandCode key cannot use it in JobSync without standing up an external OpenAI-compatible proxy.
Proposed solution
Register commandcode as an optional cloud provider, following the same path as OpenRouter:
Add a commandcode entry to PROVIDER_REGISTRY in src/lib/ai/provider-registry.ts
(cloud / api-key, envVar: COMMANDCODE_API_KEY, modelsEndpoint: "commandcode/models", parseModelsResponse).
Add a verifier and a factory in src/lib/ai/provider-registry.server.ts.
Add a models route at src/app/api/ai/commandcode/models/route.ts mirroring src/app/api/ai/openrouter/models/route.ts.
One CommandCode-specific detail: it answers the Anthropic Messages endpoint for Claude models and OpenAI Chat Completions for everything else, both at https://api.commandcode.ai/provider/v1. So the factory routes claude* model ids through createAnthropic and all others through createOpenAI. A mismatched pairing returns HTTP 400.
This is purely additive — no existing provider changes.
Keep it out-of-tree and document running an OpenAI-compatible proxy in front of CommandCode. Works, but adds setup for users and loses the native model listing.
Activity