Add skill governance and runtime routing

This commit is contained in:
dahyeon committed 2026-05-14 14:28:59 -07:00
1 parent a900016be4
commit 221e9391e0
71 files changed
+7057 -102

No files matched your search

+7 -1
View File
@@ -39,8 +39,14 @@ function normalizeEndpointConfig(
function buildCompletionUrl(endpoint: string): string {
try {
const url = new URL(endpoint);
if (!url.pathname || url.pathname === "/") {
const normalizedPath = url.pathname.replace(/\/+$/u, "");
if (!normalizedPath) {
url.pathname = "/v1/chat/completions";
} else if (
normalizedPath.endsWith("/v1") ||
normalizedPath.endsWith("/api/v1")
) {
url.pathname = `${normalizedPath}/chat/completions`;
}
url.search = "";
url.hash = "";