2begyb commited on
Commit
cdb12fb
·
verified ·
1 Parent(s): 47b7140

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. server/_core/llm.ts +2 -2
server/_core/llm.ts CHANGED
@@ -214,14 +214,14 @@ const resolveApiUrl = () => {
214
  // Always prefer HF Inference API if we have a token and no explicit forge URL
215
  const hfToken = process.env.HF_TOKEN || process.env.HF_ACCESS_TOKEN;
216
  if (hfToken && (!ENV.forgeApiUrl || ENV.forgeApiUrl.includes("manus.im"))) {
217
- return "https://api-inference.huggingface.co/v1/chat/completions";
218
  }
219
 
220
  if (ENV.forgeApiUrl && ENV.forgeApiUrl.trim().length > 0) {
221
  return `${ENV.forgeApiUrl.replace(/\/$/, "")}/v1/chat/completions`;
222
  }
223
 
224
- return "https://api-inference.huggingface.co/v1/chat/completions";
225
  };
226
 
227
  const assertApiKey = () => {
 
214
  // Always prefer HF Inference API if we have a token and no explicit forge URL
215
  const hfToken = process.env.HF_TOKEN || process.env.HF_ACCESS_TOKEN;
216
  if (hfToken && (!ENV.forgeApiUrl || ENV.forgeApiUrl.includes("manus.im"))) {
217
+ return "https://router.huggingface.co/v1/chat/completions";
218
  }
219
 
220
  if (ENV.forgeApiUrl && ENV.forgeApiUrl.trim().length > 0) {
221
  return `${ENV.forgeApiUrl.replace(/\/$/, "")}/v1/chat/completions`;
222
  }
223
 
224
+ return "https://router.huggingface.co/v1/chat/completions";
225
  };
226
 
227
  const assertApiKey = () => {