Spaces:
Sleeping
Sleeping
Bot commited on
Commit ·
b57b1c4
1
Parent(s): a652980
Remove recommended model name modifier to fix model lookup mismatch and API key errors
Browse files
src/app/api/chat/models/route.ts
CHANGED
|
@@ -33,24 +33,7 @@ export const GET = async () => {
|
|
| 33 |
"Mistral Large 2 (Chat only)": "mistralai/mistral-large-2-instruct",
|
| 34 |
};
|
| 35 |
|
| 36 |
-
const modelsInfo = customModelProvider.modelsInfo
|
| 37 |
-
if (providerInfo.provider === "Claude Code") {
|
| 38 |
-
return {
|
| 39 |
-
...providerInfo,
|
| 40 |
-
models: providerInfo.models.map(model => {
|
| 41 |
-
const apiName = apiNames[model.name];
|
| 42 |
-
if (apiName && apiName === recommendedModelId) {
|
| 43 |
-
return {
|
| 44 |
-
...model,
|
| 45 |
-
name: `${model.name} (Recommended)`
|
| 46 |
-
};
|
| 47 |
-
}
|
| 48 |
-
return model;
|
| 49 |
-
})
|
| 50 |
-
};
|
| 51 |
-
}
|
| 52 |
-
return providerInfo;
|
| 53 |
-
});
|
| 54 |
|
| 55 |
return Response.json(
|
| 56 |
modelsInfo.sort((a, b) => {
|
|
|
|
| 33 |
"Mistral Large 2 (Chat only)": "mistralai/mistral-large-2-instruct",
|
| 34 |
};
|
| 35 |
|
| 36 |
+
const modelsInfo = customModelProvider.modelsInfo;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
return Response.json(
|
| 39 |
modelsInfo.sort((a, b) => {
|