diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e7fcbc..87a206a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,8 @@ All notable changes to this project are documented here. The format is based on concurrently (bounded); permission prompts stay serialized. - **LLM retry/backoff** — 429/5xx and connection drops with exponential backoff and `Retry-After` support (OpenAI-compatible clients). +- **Runcrate backend** — `--backend runcrate` (OpenAI-compatible, `RUNCRATE_API_KEY`, + default base URL `https://api.runcrate.ai/v1`) with a curated list of open-weight models. ### Changed diff --git a/src/cli/index.ts b/src/cli/index.ts index 625cf09..b2ba23d 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -1427,7 +1427,7 @@ API keys (hosted backends) — set via flag, /provider in the TUI, or env var: Backends: ollama · lmstudio · openai · openai-compat · kimi · groq · openrouter · deepseek · gemini · anthropic · naraya · dahl - + OpenCode presets: xai · mistral · cerebras · togetherai · deepinfra · + + OpenCode presets: xai · mistral · cerebras · togetherai · runcrate · deepinfra · fireworks · baseten · nvidia · perplexity · cohere · alibaba · venice · zenmux · kilo · llmgateway · opencode Custom gateways: /provider → "Custom OpenAI scheme" or "Custom Anthropic scheme" diff --git a/src/config/config.ts b/src/config/config.ts index 518ad70..7212d61 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -41,6 +41,7 @@ const Backend = z.enum([ 'mistral', 'cerebras', 'togetherai', + 'runcrate', 'deepinfra', 'fireworks', 'baseten', @@ -74,6 +75,7 @@ export const BACKENDS: readonly Exclude[] = [ 'mistral', 'cerebras', 'togetherai', + 'runcrate', 'deepinfra', 'fireworks', 'baseten', diff --git a/src/llm/modelWarnings.ts b/src/llm/modelWarnings.ts index 3e82f88..99ed444 100644 --- a/src/llm/modelWarnings.ts +++ b/src/llm/modelWarnings.ts @@ -34,6 +34,7 @@ export function modelReliabilityWarning(backend: Backend, model: string): string 'mistral', 'cerebras', 'togetherai', + 'runcrate', 'deepinfra', 'fireworks', 'baseten', diff --git a/src/llm/providerRegistry.test.ts b/src/llm/providerRegistry.test.ts index 1c38587..37ca288 100644 --- a/src/llm/providerRegistry.test.ts +++ b/src/llm/providerRegistry.test.ts @@ -48,4 +48,14 @@ describe('providerRegistry (OpenCode-aligned)', () => { expect(ids.has(need), `missing ${need}`).toBe(true); } }); + + it('registers Runcrate with its OpenAI-compatible endpoint and key', () => { + const runcrate = getOpenAISchemeProvider('runcrate'); + expect(runcrate).toBeDefined(); + expect(runcrate?.scheme).toBe('openai'); + expect(runcrate?.baseURL).toBe('https://api.runcrate.ai/v1'); + expect(runcrate?.envKeys).toEqual(['RUNCRATE_API_KEY']); + expect(runcrate?.models).toContain(runcrate?.defaultModel); + expect(BACKENDS).toContain('runcrate'); + }); }); diff --git a/src/llm/providerRegistry.ts b/src/llm/providerRegistry.ts index c694ac7..b9f3910 100644 --- a/src/llm/providerRegistry.ts +++ b/src/llm/providerRegistry.ts @@ -96,6 +96,24 @@ export const OPENAI_SCHEME_PROVIDERS: readonly ProviderDef[] = [ ], description: 'remote — api.together.xyz', }, + { + id: 'runcrate', + name: 'Runcrate', + scheme: 'openai', + baseURL: 'https://api.runcrate.ai/v1', + envKeys: ['RUNCRATE_API_KEY'], + defaultModel: 'deepseek-ai/DeepSeek-V3.2', + models: [ + 'deepseek-ai/DeepSeek-V3.2', + 'deepseek-ai/DeepSeek-R1-0528', + 'Qwen/Qwen3-235B-A22B-Instruct-2507', + 'moonshotai/Kimi-K2.6', + 'zai-org/GLM-5.2', + 'openai/gpt-oss-120b', + 'meta-llama/Llama-3.3-70B-Instruct-Turbo', + ], + description: 'remote — api.runcrate.ai', + }, { id: 'deepinfra', name: 'DeepInfra',