mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 18:33:01 +00:00
/ai/models route
This commit is contained in:
8
packages/backend/src/routes/ai/models.ts
Normal file
8
packages/backend/src/routes/ai/models.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { AuthedRequest } from "../../auth/middleware";
|
||||
import { getCachedFreeModels } from "./opencode";
|
||||
|
||||
// GET /ai/models - returns cached free models
|
||||
export default function aiModels(_req: AuthedRequest) {
|
||||
const models = getCachedFreeModels();
|
||||
return Response.json(models);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import aiChat from "./ai/chat";
|
||||
import aiModels from "./ai/models";
|
||||
import authLogin from "./auth/login";
|
||||
import authLogout from "./auth/logout";
|
||||
import authMe from "./auth/me";
|
||||
@@ -58,6 +59,7 @@ import userUploadAvatar from "./user/upload-avatar";
|
||||
|
||||
export const routes = {
|
||||
aiChat,
|
||||
aiModels,
|
||||
|
||||
authRegister,
|
||||
authLogin,
|
||||
|
||||
Reference in New Issue
Block a user