mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-10 14:38:22 +02:00
add a target routing provider for custom target resources
This commit is contained in:
@@ -28,6 +28,7 @@ import {
|
||||
providerHasCapability,
|
||||
type AiCapability
|
||||
} from "@server/lib/aiCapabilities";
|
||||
import { proxyAiGatewayToSiteTarget } from "@server/routers/aiGateway/targetRouting";
|
||||
import {
|
||||
SESSION_COOKIE_NAME,
|
||||
validateSessionToken
|
||||
@@ -486,6 +487,10 @@ export async function handleAiGatewayProxy(
|
||||
|
||||
const { provider } = selection;
|
||||
|
||||
if (provider.type === "custom" && provider.routingMode === "target") {
|
||||
return await proxyAiGatewayToSiteTarget(req, res, provider);
|
||||
}
|
||||
|
||||
const upstreamUrl = provider.upstreamUrl;
|
||||
const authType = provider.authType as AiProviderAuthType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user