import {
createGatewayAgentClient,
} from "@ai-stats/agent-sdk";
const client = createGatewayAgentClient({
clientOptions: {
apiKey: process.env.AI_STATS_API_KEY!,
},
responseFormat: {
type: "json_schema",
name: "code_review_plan",
schema: {
type: "object",
properties: {
risk: {
type: "string",
enum: ["low", "medium", "high"],
},
summary: { type: "string" },
recommendedActions: {
type: "array",
items: { type: "string" },
minItems: 1,
},
needsApproval: { type: "boolean" },
},
required: ["risk", "summary", "recommendedActions", "needsApproval"],
additionalProperties: false,
},
},
plugins: [{ id: "response-healing", mode: "strict" }],
});