Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: mention OrcaRouter in the API-key help text, cover the orcarouterApiKey fallback

[._.]/ Adam Eivyc41cd82b5694
diff --git a/client/src/pages/AIProviders.jsx b/client/src/pages/AIProviders.jsx
index b84a8910fa..3b74d166db 100644
--- a/client/src/pages/AIProviders.jsx
+++ b/client/src/pages/AIProviders.jsx
@@ -1149,7 +1149,7 @@ function ProviderForm({ provider, onClose, onSave, allProviders = [], runnerAllo
<p className="text-xs text-gray-500 mt-1">
This field is the only place API providers read a key from — it's stored on this
provider and sent as an <code>Authorization: Bearer</code> header on every request.
- No environment variable is involved. Hosted APIs (Cerebras, Grok, NVIDIA, …) require
+ No environment variable is involved. Hosted APIs (Cerebras, Grok, NVIDIA, OrcaRouter, …) require
one; local backends (Ollama, LM Studio) don't.
</p>
</FormField>
diff --git a/server/lib/opencodeConfig.test.js b/server/lib/opencodeConfig.test.js
index f68d5a1d58..c57e8f458d 100644
--- a/server/lib/opencodeConfig.test.js
+++ b/server/lib/opencodeConfig.test.js
@@ -25,7 +25,7 @@ describe('toBareModelIds', () => {
.toEqual(['mtplx', 'qwen/model']);
});
- it('keeps OrcaRouter vendor ids unchanged for its provider models map', () => {
+ it('keeps OrcaRouter stored ids unchanged for the models map', () => {
expect(toBareModelIds(['orcarouter/auto', 'anthropic/claude-sonnet-4.6'], 'orcarouter'))
.toEqual(['orcarouter/auto', 'anthropic/claude-sonnet-4.6']);
});
@@ -63,19 +63,6 @@ describe('buildOpencodeConfig', () => {
expect(cfg.provider.ollama.models['qwen2.5:7b']).toEqual({ name: 'qwen2.5:7b', tool_call: true });
});
- it('declares OrcaRouter stored ids under the orcarouter provider', () => {
- const cfg = buildOpencodeConfig(['orcarouter/auto', 'anthropic/claude-sonnet-4.6'], null, 'orcarouter');
- expect(cfg.provider.orcarouter).toMatchObject({
- npm: '@ai-sdk/openai-compatible',
- name: 'OrcaRouter',
- options: { baseURL: 'https://api.orcarouter.ai/v1' },
- });
- expect(Object.keys(cfg.provider.orcarouter.models).sort()).toEqual([
- 'anthropic/claude-sonnet-4.6',
- 'orcarouter/auto',
- ]);
- });
-
it('preserves a slash-bearing bare model id', () => {
const cfg = buildOpencodeConfig('ollama/hf.co/user/model:tag');
expect(cfg.provider.ollama.models['hf.co/user/model:tag']).toBeDefined();
@@ -115,6 +102,18 @@ describe('buildOpencodeConfig', () => {
mtplx: { name: 'mtplx', tool_call: true },
});
});
+
+ it('declares OrcaRouter models under unchanged keys and its gateway endpoint', () => {
+ const cfg = buildOpencodeConfig(['orcarouter/auto', 'anthropic/claude-sonnet-4.6'], null, 'orcarouter');
+ expect(cfg.provider.orcarouter).toMatchObject({
+ npm: '@ai-sdk/openai-compatible',
+ name: 'OrcaRouter',
+ options: { baseURL: 'https://api.orcarouter.ai/v1' },
+ });
+ expect(Object.keys(cfg.provider.orcarouter.models).sort()).toEqual([
+ 'anthropic/claude-sonnet-4.6', 'orcarouter/auto',
+ ]);
+ });
});
describe('buildOpencodeConfigContent', () => {
@@ -171,23 +170,23 @@ describe('buildOpencodeEnvVars', () => {
expect(cfg.provider.mtplx.models.mtplx).toEqual({ name: 'mtplx', tool_call: true });
});
- it('injects the OrcaRouter sibling key only into the dynamic spawn config', () => {
+ it('injects the sibling OrcaRouter API key only into the composed spawn config', () => {
+ const storedConfig = JSON.stringify({
+ permission: 'allow',
+ provider: { orcarouter: { npm: '@ai-sdk/openai-compatible', options: { baseURL: 'https://api.orcarouter.ai/v1' } } },
+ });
const result = buildOpencodeEnvVars({
command: 'opencode',
orcarouterBacked: true,
- apiKey: 'sk-orca-example',
models: ['orcarouter/auto'],
- envVars: {
- OPENCODE_CONFIG_CONTENT: JSON.stringify({
- permission: 'allow',
- provider: { orcarouter: { options: { baseURL: 'https://api.orcarouter.ai/v1' } } },
- }),
- },
+ envVars: { OPENCODE_CONFIG_CONTENT: storedConfig },
+ orcarouterApiKey: 'sk-orca-example',
}, 'orcarouter/auto');
const cfg = JSON.parse(result.OPENCODE_CONFIG_CONTENT);
- expect(cfg.provider.orcarouter.models['orcarouter/auto']).toBeDefined();
+ expect(cfg.provider.orcarouter.models['orcarouter/auto']).toEqual({ name: 'orcarouter/auto', tool_call: true });
expect(cfg.provider.orcarouter.options.apiKey).toBe('sk-orca-example');
expect(result.ORCAROUTER_API_KEY).toBe('sk-orca-example');
+ expect(storedConfig).not.toContain('sk-orca-example');
});
it('unions the provider models, defaultModel, and the run model (deduped, bare)', () => {