From b7fa65d9f9ea4217aaabbedbb349ff3e83422096 Mon Sep 17 00:00:00 2001 From: nai-degen Date: Wed, 31 May 2023 13:53:24 -0500 Subject: [PATCH] fixes dumb /v1/models bug affecting sillytavern again --- src/proxy/openai.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/proxy/openai.ts b/src/proxy/openai.ts index 041e05a..0db9b9c 100644 --- a/src/proxy/openai.ts +++ b/src/proxy/openai.ts @@ -83,7 +83,11 @@ openaiRouter.use((req, _res, next) => { } next(); }); -openaiRouter.get("/v1/models", openaiProxy); +openaiRouter.get( + "/v1/models", + setApiFormat({ in: "openai", out: "openai" }), + openaiProxy // TODO: replace with fake model list instead of proxying +); openaiRouter.post( "/v1/chat/completions", setApiFormat({ in: "openai", out: "openai" }),