Gateway e2e (#323)

This commit is contained in:
Will Chen
2025-06-03 16:35:46 -07:00
committed by GitHub
parent fc1ebe9e8a
commit c227a08d11
14 changed files with 104 additions and 410 deletions

View File

@@ -180,14 +180,14 @@ app.get("/lmstudio/api/v0/models", (req, res) => {
res.json(lmStudioModels);
});
app.post(
"/lmstudio/v1/chat/completions",
createChatCompletionHandler("lmstudio"),
);
["lmstudio", "gateway", "engine"].forEach((provider) => {
app.post(
`/${provider}/v1/chat/completions`,
createChatCompletionHandler(provider),
);
});
app.post("/engine/v1/chat/completions", createChatCompletionHandler("engine"));
// Handle POST requests to /v1/chat/completions
// Default test provider handler:
app.post("/v1/chat/completions", createChatCompletionHandler("."));
// Start the server