anurag008w commited on
Commit
cfd6981
Β·
1 Parent(s): 35e67fe

Add support for multiple new API providers

Browse files
Files changed (1) hide show
  1. multi-provider-key-rotator.cjs +27 -0
multi-provider-key-rotator.cjs CHANGED
@@ -166,6 +166,33 @@ const PROVIDERS = [
166
  envPlural: 'HUGGINGFACE_HUB_TOKENS', // plural variant
167
  envSingular:'HUGGINGFACE_HUB_TOKEN',
168
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  ];
170
 
171
  // ─── Key loading ─────────────────────────────────────────────────────────────
 
166
  envPlural: 'HUGGINGFACE_HUB_TOKENS', // plural variant
167
  envSingular:'HUGGINGFACE_HUB_TOKEN',
168
  },
169
+ {
170
+ name: 'venice',
171
+ hostname: /(?:^|\.)api\.venice\.ai$/i,
172
+ envPlural: 'VENICE_API_KEYS',
173
+ envSingular:'VENICE_API_KEY',
174
+ },
175
+ {
176
+ name: 'github-copilot',
177
+ hostname: /(?:^|\.)api\.githubcopilot\.com$/i,
178
+ envPlural: 'COPILOT_GITHUB_TOKENS',
179
+ envSingular:'COPILOT_GITHUB_TOKEN',
180
+ },
181
+ {
182
+ name: 'qianfan',
183
+ // Baidu Qianfan / ERNIE
184
+ hostname: /(?:^|\.)(?:aip|qianfan)\.baidubce\.com$/i,
185
+ envPlural: 'QIANFAN_API_KEYS',
186
+ envSingular:'QIANFAN_API_KEY',
187
+ },
188
+ {
189
+ name: 'modelstudio',
190
+ // Aliyun DashScope / Qwen (both qwen/* and modelstudio/* prefixes)
191
+ hostname: /(?:^|\.)dashscope\.aliyuncs\.com$/i,
192
+ envPlural: 'MODELSTUDIO_API_KEYS',
193
+ envSingular:'MODELSTUDIO_API_KEY',
194
+ },
195
+
196
  ];
197
 
198
  // ─── Key loading ─────────────────────────────────────────────────────────────