fixes #2663: validate AI output for test connection endpoint (#2674)

This commit is contained in:
Amruth Pillai
2026-02-02 00:43:31 +01:00
committed by GitHub
parent f5a9ffb776
commit da9a3c0b12
63 changed files with 349 additions and 348 deletions
+5 -6
View File
@@ -1,7 +1,6 @@
import { SmartCoercionPlugin } from "@orpc/json-schema";
import { OpenAPIGenerator } from "@orpc/openapi";
import { OpenAPIHandler } from "@orpc/openapi/fetch";
import { onError } from "@orpc/server";
import { RequestHeadersPlugin } from "@orpc/server/plugins";
import { ZodToJsonSchemaConverter } from "@orpc/zod/zod4";
import { createFileRoute } from "@tanstack/react-router";
@@ -10,11 +9,11 @@ import { env } from "@/utils/env";
import { getLocale } from "@/utils/locale";
const openAPIHandler = new OpenAPIHandler(router, {
interceptors: [
onError((error) => {
console.error(error);
}),
],
// interceptors: [
// onError((error) => {
// console.error(error);
// }),
// ],
plugins: [
new RequestHeadersPlugin(),
new SmartCoercionPlugin({
+5 -6
View File
@@ -1,4 +1,3 @@
import { onError } from "@orpc/server";
import { RPCHandler } from "@orpc/server/fetch";
import { BatchHandlerPlugin, RequestHeadersPlugin } from "@orpc/server/plugins";
import { createFileRoute } from "@tanstack/react-router";
@@ -6,11 +5,11 @@ import router from "@/integrations/orpc/router";
import { getLocale } from "@/utils/locale";
const rpcHandler = new RPCHandler(router, {
interceptors: [
onError((error) => {
console.error(error);
}),
],
// interceptors: [
// onError((error) => {
// console.error(error);
// }),
// ],
plugins: [new BatchHandlerPlugin(), new RequestHeadersPlugin()],
});