opencode-studio-server 1.12.3 → 1.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +22 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1384,7 +1384,12 @@ app.get('/api/auth/providers', (req, res) => {
1384
1384
  { id: 'openai', name: 'OpenAI', type: 'api', description: 'GPT models' },
1385
1385
  { id: 'xai', name: 'xAI', type: 'api', description: 'Grok models' },
1386
1386
  { id: 'openrouter', name: 'OpenRouter', type: 'api', description: 'Unified LLM API' },
1387
- { id: 'github-copilot', name: 'GitHub Copilot', type: 'api', description: 'Copilot models' }
1387
+ { id: 'github-copilot', name: 'GitHub Copilot', type: 'api', description: 'Copilot models' },
1388
+ { id: 'mistral', name: 'Mistral AI', type: 'api', description: 'Mistral models' },
1389
+ { id: 'deepseek', name: 'DeepSeek', type: 'api', description: 'DeepSeek models' },
1390
+ { id: 'groq', name: 'Groq', type: 'api', description: 'LPU Inference' },
1391
+ { id: 'amazon-bedrock', name: 'AWS Bedrock', type: 'api', description: 'Amazon Bedrock' },
1392
+ { id: 'azure', name: 'Azure OpenAI', type: 'api', description: 'Azure OpenAI' }
1388
1393
  ];
1389
1394
  res.json(providers);
1390
1395
  });
@@ -1412,7 +1417,12 @@ app.get('/api/auth', (req, res) => {
1412
1417
  { id: 'openai', name: 'OpenAI', type: 'api' },
1413
1418
  { id: 'xai', name: 'xAI', type: 'api' },
1414
1419
  { id: 'openrouter', name: 'OpenRouter', type: 'api' },
1415
- { id: 'github-copilot', name: 'GitHub Copilot', type: 'api' }
1420
+ { id: 'github-copilot', name: 'GitHub Copilot', type: 'api' },
1421
+ { id: 'mistral', name: 'Mistral AI', type: 'api' },
1422
+ { id: 'deepseek', name: 'DeepSeek', type: 'api' },
1423
+ { id: 'groq', name: 'Groq', type: 'api' },
1424
+ { id: 'amazon-bedrock', name: 'AWS Bedrock', type: 'api' },
1425
+ { id: 'azure', name: 'Azure OpenAI', type: 'api' }
1416
1426
  ];
1417
1427
 
1418
1428
  const opencodeCfg = loadConfig();
@@ -1636,14 +1646,18 @@ app.delete('/api/auth/profiles/:provider/:name', (req, res) => {
1636
1646
  if (studio.activeProfiles && studio.activeProfiles[provider] === name) {
1637
1647
  delete studio.activeProfiles[provider];
1638
1648
  saveStudioConfig(studio);
1649
+ }
1639
1650
 
1640
- const authCfg = loadAuthConfig() || {};
1651
+ const authCfg = loadAuthConfig() || {};
1652
+ if (provider === 'google' && authCfg.google?.email === name) {
1653
+ delete authCfg.google;
1654
+ delete authCfg['google.antigravity'];
1655
+ delete authCfg['google.gemini'];
1656
+ const cp = getConfigPath();
1657
+ const ap = path.join(path.dirname(cp), 'auth.json');
1658
+ atomicWriteFileSync(ap, JSON.stringify(authCfg, null, 2));
1659
+ } else if (authCfg[provider]) {
1641
1660
  delete authCfg[provider];
1642
- if (provider === 'google') {
1643
- const key = 'google.antigravity';
1644
- delete authCfg.google;
1645
- delete authCfg[key];
1646
- }
1647
1661
  const cp = getConfigPath();
1648
1662
  const ap = path.join(path.dirname(cp), 'auth.json');
1649
1663
  atomicWriteFileSync(ap, JSON.stringify(authCfg, null, 2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-studio-server",
3
- "version": "1.12.3",
3
+ "version": "1.12.5",
4
4
  "description": "Backend server for OpenCode Studio - manages opencode configurations",
5
5
  "main": "index.js",
6
6
  "bin": {