Spaces:
Sleeping
Sleeping
Bot commited on
Commit ·
d9de537
1
Parent(s): ca1682c
Clean up unused declarations in models route to fix Next.js build errors
Browse files
src/app/api/chat/models/route.ts
CHANGED
|
@@ -1,38 +1,6 @@
|
|
| 1 |
import { customModelProvider } from "lib/ai/models";
|
| 2 |
|
| 3 |
export const GET = async () => {
|
| 4 |
-
let recommendedModelId = "";
|
| 5 |
-
try {
|
| 6 |
-
const res = await fetch("https://augment17-claude-code-backend.hf.space/health", {
|
| 7 |
-
headers: { "Authorization": `Bearer ${process.env.BACKEND_API_KEY}` },
|
| 8 |
-
next: { revalidate: 60 }
|
| 9 |
-
});
|
| 10 |
-
if (res.ok) {
|
| 11 |
-
const data = await res.json();
|
| 12 |
-
recommendedModelId = data.recommended_model || "";
|
| 13 |
-
}
|
| 14 |
-
} catch (error) {
|
| 15 |
-
console.error("Failed to fetch recommended model from backend:", error);
|
| 16 |
-
}
|
| 17 |
-
|
| 18 |
-
const apiNames: Record<string, string> = {
|
| 19 |
-
"Nemotron 3 Ultra 550B (Agentic)": "nvidia/nemotron-3-ultra-550b-a55b",
|
| 20 |
-
"GLM 5.1 (Agentic)": "z-ai/glm-5.1",
|
| 21 |
-
"Kimi K2.6 (Agentic)": "moonshotai/kimi-k2.6",
|
| 22 |
-
"MiniMax M3 (Agentic)": "minimaxai/minimax-m3",
|
| 23 |
-
"Step 3.7 Flash (Agentic)": "stepfun-ai/step-3.7-flash",
|
| 24 |
-
"MiniMax M2.7 (Agentic)": "minimaxai/minimax-m2.7",
|
| 25 |
-
"Llama 3.1 70B (Agentic)": "meta/llama-3.1-70b-instruct",
|
| 26 |
-
"Llama 3.1 405B (Agentic)": "meta/llama-3.1-405b-instruct",
|
| 27 |
-
"Qwen 2.5 Coder 32B (Agentic)": "qwen/qwen2.5-coder-32b-instruct",
|
| 28 |
-
"Nemotron 70B (Agentic)": "nvidia/llama-3.1-nemotron-70b-instruct",
|
| 29 |
-
"Llama 3.3 70B (Agentic)": "meta/llama-3.3-70b-instruct",
|
| 30 |
-
"DeepSeek V4 Flash (Agentic)": "deepseek-ai/deepseek-v4-flash",
|
| 31 |
-
"DeepSeek V4 Pro (Agentic)": "deepseek-ai/deepseek-v4-pro",
|
| 32 |
-
"DeepSeek R1 (Chat only)": "deepseek-ai/deepseek-r1",
|
| 33 |
-
"Mistral Large 2 (Chat only)": "mistralai/mistral-large-2-instruct",
|
| 34 |
-
};
|
| 35 |
-
|
| 36 |
const modelsInfo = customModelProvider.modelsInfo;
|
| 37 |
|
| 38 |
return Response.json(
|
|
|
|
| 1 |
import { customModelProvider } from "lib/ai/models";
|
| 2 |
|
| 3 |
export const GET = async () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
const modelsInfo = customModelProvider.modelsInfo;
|
| 5 |
|
| 6 |
return Response.json(
|