protocol-proxy 2.1.3 → 2.1.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protocol-proxy",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "OpenAI / Anthropic 协议转换透明代理",
5
5
  "main": "server.js",
6
6
  "bin": {
package/public/app.js CHANGED
@@ -490,11 +490,13 @@ function openModal(id = null) {
490
490
  document.getElementById('auth-token-group').style.display = p.requireAuth ? 'block' : 'none';
491
491
  selectProvider(p.providerId || '');
492
492
  selectModel(p.defaultModel || '');
493
+ document.getElementById('target-key').placeholder = p.hasApiKey ? '已设置(留空则不修改)' : 'sk-...';
493
494
  } else {
494
495
  document.getElementById('proxy-id').value = '';
495
496
  document.getElementById('auth-token-group').style.display = 'none';
496
497
  selectProvider('');
497
498
  selectModel('');
499
+ document.getElementById('target-key').placeholder = 'sk-...';
498
500
  }
499
501
 
500
502
  updateModelAddState();
package/server.js CHANGED
@@ -262,6 +262,7 @@ async function init() {
262
262
  providerUrl: provider?.url || '',
263
263
  protocol: provider?.protocol || '',
264
264
  defaultModel: p.defaultModel || '',
265
+ hasApiKey: !!provider?.apiKey,
265
266
  running: proxyManager.isRunning(p.id),
266
267
  };
267
268
  });
@@ -278,6 +279,7 @@ async function init() {
278
279
  providerName: provider?.name || '',
279
280
  providerUrl: provider?.url || '',
280
281
  protocol: provider?.protocol || '',
282
+ hasApiKey: !!provider?.apiKey,
281
283
  });
282
284
  });
283
285