This commit is contained in:
decolua
2026-06-15 18:18:04 +07:00
parent 8ab5af0052
commit b282f05549
66 changed files with 2328 additions and 213 deletions
+3
View File
@@ -3,6 +3,7 @@ import { getModelAliases, setModelAlias } from "@/models";
import { getDisabledModels } from "@/lib/disabledModelsDb";
import { AI_MODELS } from "@/shared/constants/config";
import { getProviderAlias } from "@/shared/constants/providers";
import { getCapabilitiesForModel } from "open-sse/providers/capabilities.js";
// GET /api/models - Get models with aliases
export async function GET() {
@@ -18,10 +19,12 @@ export async function GET() {
})
.map((m) => {
const fullModel = `${m.provider}/${m.model}`;
const c = getCapabilitiesForModel(m.provider, m.model);
return {
...m,
fullModel,
alias: modelAliases[fullModel] || m.model,
caps: { vision: c.vision, search: c.search, reasoning: c.reasoning },
};
});