🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
✨ feat(openapi): expose eval resources and external run lifecycle (#19428)
Rdmclin21334209461f6
diff --git a/AGENTS.md b/AGENTS.mdindex 23d056f82f4..de3aaa49d8b 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -79,7 +79,13 @@ Use `bun run check [changed-files...]`.### Acceptance-Finishing a feature or fix means proving it on the real product, not only passing the gates above. Before a PR is opened or marked ready, run the `acceptance` skill: drive the change on the surface it reaches (CLI / Web / Electron), capture visually confirmed evidence, and publish a round with `lh acceptance run ingest`. Put the published `https://app.lobehub.com/acceptance/<id>` link in the PR body. Tests, lint, and type-check are gates, never acceptance checks; a change without a published round is not done. Skip only for pure refactors or tooling changes with no user-visible outcome, and say so explicitly in the PR.+Use the `acceptance` skill to decide whether the delivery needs product verification and whether existing evidence already covers it. Opening or marking a PR ready is a checkpoint for that decision, not a trigger to rerun verification.++- Documentation/instruction-only changes, pure refactors or tooling changes with no product behavior change, and gitlink-only syncs do not require a new acceptance run. State the reason in the PR; for a gitlink sync, link the upstream change and its existing acceptance when available.+- Reuse a completed acceptance that covers the delivered behavior. If its report and evidence exist only locally, inspect and upload them with `lh acceptance run ingest`; if already published, reuse the link. Do not rerun the product merely to open a PR or obtain a report URL.+- For new or changed product behavior not covered by valid evidence, verify the affected outcomes on the real product, capture the required evidence, and publish the result. The skill owns reuse criteria and the execution workflow.++When acceptance is required, put its published `https://app.lobehub.com/acceptance/<id>` link in the PR body. Tests, lint, and type-check remain separate quality gates; they do not replace product acceptance.### i18ndiff --git a/apps/server/src/routers/lambda/agentEvalExternal.ts b/apps/server/src/routers/lambda/agentEvalExternal.tsindex f9fccf18c38..8300d497e20 100644--- a/apps/server/src/routers/lambda/agentEvalExternal.ts+++ b/apps/server/src/routers/lambda/agentEvalExternal.ts@@ -1,12 +1,5 @@-import type {- EvalCaseSelection,- EvalRunMetrics,- EvalRunTopicResult,- EvalThreadResult,-} from '@lobechat/types';import { TRPCError } from '@trpc/server';import { and, asc, eq, isNull } from 'drizzle-orm';-import isEqual from 'fast-deep-equal';import { z } from 'zod';import { withScopedPermission } from '@/business/server/trpc-middlewares/rbacPermission';@@ -23,6 +16,11 @@ import { buildWorkspaceWhere } from '@/database/utils/workspace';import { router } from '@/libs/trpc/lambda';import { serverDatabase } from '@/libs/trpc/lambda/middleware';import { AgentEvalRunService, RUN_CREATE_ID_CONFLICT } from '@/server/services/agentEvalRun';+import {+ applyReportResult,+ recomputeRunAggregation,+ resolveExpectedTotalCases,+} from '@/server/services/agentEvalRun/reportResults';import { evalRunInputConfigSchema } from './evalRunConfig.schema';@@ -76,300 +74,10 @@ const agentEvalExternalWriteProcedure = agentEvalExternalProcedure.use(withScopedPermission('agent:update'),);-type ReportResultInput = z.infer<typeof reportResultItemSchema> & { runId: string };--/**- * Decide the run status from aggregated metrics. Priority: external (still- * awaiting external eval) > running (cases outstanding) > failed (every case- * errored/timed out) > completed. Exported for unit tests.- */-export const resolveRunStatus = (- metrics: Pick<EvalRunMetrics, 'completedCases' | 'errorCases' | 'timeoutCases' | 'totalCases'>,- hasAwaitingExternal: boolean,-): 'completed' | 'external' | 'failed' | 'running' => {- if (hasAwaitingExternal) return 'external';- const totalCases = metrics.totalCases ?? 0;- if ((metrics.completedCases ?? 0) < totalCases) return 'running';- return (metrics.errorCases ?? 0) + (metrics.timeoutCases ?? 0) >= totalCases- ? 'failed'- : 'completed';-};--/**- * Denominator for external-run totals. External runs create topics on demand,- * so the dataset case count is the baseline; a persisted caseSelection narrows- * it to the selected subset (include → selection size, exclude → dataset minus- * excluded). Omitted selection means all cases (canonical).- *- * caseIds are shape-validated only (existence is the worker's contract); a- * worker executing fewer cases than the selection is treated the same as one- * executing fewer than the full dataset — no extra clamping query. Exported- * for unit tests.- */-export const resolveExpectedTotalCases = (- caseSelection: EvalCaseSelection | undefined,- datasetCaseCount: number,-): number => {- if (!caseSelection || caseSelection.mode === 'all') return datasetCaseCount;- const selectedIds = caseSelection.caseIds ?? [];- if (caseSelection.mode === 'include') return selectedIds.length;- return Math.max(datasetCaseCount - selectedIds.length, 0);-};--const recomputeRunAggregation = async (- ctx: {- runModel: AgentEvalRunModel;- runService: AgentEvalRunService;- runTopicModel: AgentEvalRunTopicModel;- testCaseModel: AgentEvalTestCaseModel;- },- runId: string,-) => {- const refreshedRun = await ctx.runModel.findById(runId);- if (!refreshedRun) return undefined;-- const refreshedTopics = await ctx.runTopicModel.findByRunId(runId);- const metrics = await ctx.runService.evaluateAndFinalizeRun({- expectedTotalCases: resolveExpectedTotalCases(- refreshedRun.config?.caseSelection,- await ctx.testCaseModel.countByDatasetId(refreshedRun.datasetId),- ),- run: {- config: refreshedRun.config,- id: refreshedRun.id,- metrics: refreshedRun.metrics,- startedAt: refreshedRun.startedAt,- },- runTopics: refreshedTopics,- });-- const hasAwaitingExternal = refreshedTopics.some(- (topic) =>- topic.status === 'external' ||- (topic.evalResult as Record<string, unknown> | null)?.awaitingExternalEval === true,- );- const hasActiveTopic = refreshedTopics.some(- (topic) => topic.status === 'pending' || topic.status === 'running',- );- const status = hasActiveTopic ? 'running' : resolveRunStatus(metrics, hasAwaitingExternal);-- await ctx.runModel.update(runId, { metrics, status });-- return status;-};--const applyReportResult = async (- ctx: {- runModel: AgentEvalRunModel;- runTopicModel: AgentEvalRunTopicModel;- runService: AgentEvalRunService;- testCaseModel: AgentEvalTestCaseModel;- threadModel: ThreadModel;- },- input: ReportResultInput,- recomputeRun: boolean,-) => {- const run = await ctx.runModel.findById(input.runId);- if (!run) {- throw new TRPCError({ code: 'NOT_FOUND', message: 'Run not found' });- }-- const runTopics = await ctx.runTopicModel.findByRunId(input.runId);- const runTopic = runTopics.find((item) => item.topicId === input.topicId);- if (!runTopic) {- throw new TRPCError({ code: 'NOT_FOUND', message: 'Run topic not found' });- }-- const runK = run.config?.k ?? 1;- const rubricScores = [{ rubricId: 'external', score: input.score }];- const existingEvalResult = (runTopic.evalResult ?? {}) as EvalRunTopicResult &- Record<string, unknown>;- const externalResult = input.result ?? {};-- let idempotent = false;- let reportedThreads: number;- let totalThreads: number;- let topicFinalized: boolean;-- if (runK > 1) {- if (!input.threadId) {- throw new TRPCError({- code: 'BAD_REQUEST',- message: 'threadId is required when k > 1',- });- }-- const allThreads = await ctx.threadModel.queryByTopicId(input.topicId);- const evalThreads = allThreads.filter((thread) => thread.type === 'eval');- const sourceThreads = evalThreads.length > 0 ? evalThreads : allThreads;- if (sourceThreads.length === 0) {- throw new TRPCError({- code: 'BAD_REQUEST',- message: 'No threads found for this topic',- });- }-- const threads: EvalThreadResult[] =- (existingEvalResult.threads as EvalThreadResult[] | undefined)?.map((thread) => ({- ...thread,- })) ??- sourceThreads.map((thread) => ({- status: 'external',- threadId: thread.id,- }));-- let targetIndex = threads.findIndex((thread) => thread.threadId === input.threadId);- if (targetIndex < 0) {- const existsInTopic = sourceThreads.some((thread) => thread.id === input.threadId);- if (!existsInTopic) {- throw new TRPCError({- code: 'NOT_FOUND',- message: 'Thread not found for this topic',- });- }-- threads.push({ status: 'external', threadId: input.threadId });- targetIndex = threads.length - 1;- }-- totalThreads = threads.length;- const targetThread = threads[targetIndex];- const alreadyReported =- targetThread.status === 'completed' &&- targetThread.score === input.score &&- targetThread.passed === input.correct &&- isEqual(- (existingEvalResult.externalThreadResults as Record<string, unknown> | undefined)?.[- input.threadId- ],- externalResult,- );- if (alreadyReported) {- idempotent = true;- } else {- threads[targetIndex] = {- ...targetThread,- passed: input.correct,- rubricScores,- score: input.score,- status: 'completed',- };-- const existingThreadResults = (existingEvalResult.externalThreadResults ?? {}) as Record<- string,- unknown- >;- const nextEvalResult = {- ...existingEvalResult,- awaitingExternalEval: true,- externalThreadResults: {- ...existingThreadResults,- [input.threadId]: externalResult,- },- threads,- } satisfies EvalRunTopicResult & Record<string, unknown>;-- await ctx.runTopicModel.updateByRunAndTopic(input.runId, input.topicId, {- evalResult: nextEvalResult,- status: 'external',- });- }-- reportedThreads = threads.filter(- (thread) => thread.status === 'completed' && typeof thread.score === 'number',- ).length;- topicFinalized = reportedThreads >= totalThreads;-- if (topicFinalized) {- const finalThreads = threads;- const totalScore = finalThreads.reduce((acc, thread) => acc + (thread.score ?? 0), 0);- const avgScore = totalScore / finalThreads.length;- const passAtK = finalThreads.some((thread) => thread.passed === true);- const passAllK = finalThreads.every((thread) => thread.passed === true);-- const existingThreadResults = (existingEvalResult.externalThreadResults ?? {}) as Record<- string,- unknown- >;- const nextEvalResult = {- ...existingEvalResult,- awaitingExternalEval: false,- externalThreadResults: {- ...existingThreadResults,- [input.threadId]: externalResult,- },- passAllK,- passAtK,- rubricScores: [{ rubricId: 'external', score: avgScore }],- threads: finalThreads,- } satisfies EvalRunTopicResult & Record<string, unknown>;-- await ctx.runTopicModel.updateByRunAndTopic(input.runId, input.topicId, {- evalResult: nextEvalResult,- passed: passAtK,- score: avgScore,- status: passAtK ? 'passed' : 'failed',- });- }- } else {- const externalError = externalResult.error as Record<string, unknown> | string | undefined;- const errorMessage =- typeof externalError === 'string'- ? externalError- : [externalError?.type, externalError?.message].filter(Boolean).join(': ') || undefined;- const topicStatus = errorMessage ? 'error' : input.correct ? 'passed' : 'failed';- const alreadyReported =- runTopic.status === topicStatus &&- runTopic.score === input.score &&- runTopic.passed === input.correct &&- isEqual(existingEvalResult.externalResult, externalResult);- if (alreadyReported) {- idempotent = true;- } else {- const nextEvalResult = {- ...existingEvalResult,- awaitingExternalEval: false,- externalResult,- rubricScores,- } satisfies EvalRunTopicResult & Record<string, unknown>;- if (errorMessage) {- nextEvalResult.error = errorMessage;- nextEvalResult.errorDetail = externalError;- } else {- delete nextEvalResult.error;- delete nextEvalResult.errorDetail;- }-- await ctx.runTopicModel.updateByRunAndTopic(input.runId, input.topicId, {- evalResult: nextEvalResult,- passed: input.correct,- score: input.score,- status: topicStatus,- });- }-- reportedThreads = 1;- totalThreads = 1;- topicFinalized = true;- }-- let runStatus: string | undefined;- if (recomputeRun) {- runStatus = await recomputeRunAggregation(ctx, input.runId);- }-- return {- idempotent,- reportedThreads,- runId: input.runId,- runStatus,- success: true,- threadId: input.threadId,- topicFinalized,- topicId: input.topicId,- totalThreads,- };-};+export {+ resolveExpectedTotalCases,+ resolveRunStatus,+} from '@/server/services/agentEvalRun/reportResults';export const agentEvalExternalRouter = router({/**diff --git a/apps/server/src/services/agentEvalRun/aggregate.ts b/apps/server/src/services/agentEvalRun/aggregate.tsnew file mode 100644index 00000000000..7d9c4fd2824--- /dev/null+++ b/apps/server/src/services/agentEvalRun/aggregate.ts@@ -0,0 +1,168 @@+import type { EvalRunConfig, EvalRunMetrics, EvalRunTopicResult } from '@lobechat/types';++const roundCost = (v: number): number => Math.round(v * 1e6) / 1e6;+export async function evaluateAndFinalizeRun(params: {+ /**+ * Dataset case count. For external runs (Topics created on demand) this is+ * the denominator for totalCases/passRate; internal runs omit it and keep+ * `runTopics.length` (all cases are pre-created).+ */+ expectedTotalCases?: number;+ run: {+ config?: EvalRunConfig | null;+ id: string;+ metrics?: EvalRunMetrics | null;+ /**+ * Accepts a string because the finalize-run workflow reads this row inside a step, and+ * Upstash restores step results from JSON — the `Date` arrives as an ISO string.+ */+ startedAt?: Date | null | string;+ };+ runTopics: Array<{+ evalResult?: EvalRunTopicResult | null;+ passed?: boolean | null;+ runId: string;+ score?: number | null;+ status?: string | null;+ topicId: string;+ }>;+}): Promise<EvalRunMetrics> {+ const { run, runTopics } = params;+ const k = run.config?.k ?? 1;++ let passedCases = 0;+ let failedCases = 0;+ let errorCases = 0;+ let externalCases = 0;+ let timeoutCases = 0;+ let totalScore = 0;+ // Sum of per-case averages (for per-case display)+ let sumCost = 0;+ let sumTokens = 0;+ let sumSteps = 0;+ let sumLlmCalls = 0;+ let sumToolCalls = 0;+ // Actual cumulative totals across all K executions+ let actualTotalCost = 0;+ let actualTotalTokens = 0;+ let actualTotalDuration = 0;+ const rubricScoreAcc: Record<string, { count: number; sum: number }> = {};++ // pass@k / pass^k counters (only meaningful when k > 1)+ let passAtKCount = 0;+ let passAllKCount = 0;++ for (const runTopic of runTopics) {+ const existingResult = runTopic.evalResult;++ // Accumulate per-case averages (cost/tokens/steps/llmCalls/toolCalls are averages per execution)+ if (existingResult?.cost) sumCost += existingResult.cost;+ if (existingResult?.tokens) sumTokens += existingResult.tokens;+ if (existingResult?.steps) sumSteps += existingResult.steps;+ if (existingResult?.llmCalls) sumLlmCalls += existingResult.llmCalls;+ if (existingResult?.toolCalls) sumToolCalls += existingResult.toolCalls;++ // Accumulate actual totals (totalCost has K-thread cumulative, fallback to cost for K=1)+ actualTotalCost += existingResult?.totalCost ?? existingResult?.cost ?? 0;+ actualTotalTokens += existingResult?.totalTokens ?? existingResult?.tokens ?? 0;+ actualTotalDuration += existingResult?.totalDuration ?? existingResult?.duration ?? 0;++ // Count by status+ if (runTopic.status === 'passed') {+ passedCases++;+ } else if (runTopic.status === 'failed') {+ failedCases++;+ } else if (runTopic.status === 'error') {+ errorCases++;+ } else if (runTopic.status === 'external') {+ externalCases++;+ } else if (runTopic.status === 'timeout') {+ timeoutCases++;+ }++ // Only accumulate scores for evaluated (non-error, non-timeout, non-external) cases+ if (+ runTopic.status !== 'error' &&+ runTopic.status !== 'timeout' &&+ runTopic.status !== 'external' &&+ runTopic.score != null+ ) {+ totalScore += runTopic.score;+ }++ // Accumulate per-rubric scores from existing evalResult (exclude error/timeout/external cases)+ if (+ runTopic.status !== 'error' &&+ runTopic.status !== 'timeout' &&+ runTopic.status !== 'external' &&+ existingResult?.rubricScores+ ) {+ for (const rs of existingResult.rubricScores) {+ if (!rubricScoreAcc[rs.rubricId]) {+ rubricScoreAcc[rs.rubricId] = { count: 0, sum: 0 };+ }+ rubricScoreAcc[rs.rubricId].sum += rs.score;+ rubricScoreAcc[rs.rubricId].count++;+ }+ }++ // pass@k / pass^k: derive from thread results when k > 1+ if (k > 1 && existingResult?.threads && existingResult.threads.length > 0) {+ const anyThreadPassed = existingResult.threads.some((t) => t.passed === true);+ const allThreadsPassed = existingResult.threads.every((t) => t.passed === true);+ if (anyThreadPassed) passAtKCount++;+ if (allThreadsPassed) passAllKCount++;+ }+ }++ const totalCases = params.expectedTotalCases ?? runTopics.length;+ const evaluatedCases = passedCases + failedCases;+ const rubricScores: Record<string, number> = {};+ for (const [rubricId, acc] of Object.entries(rubricScoreAcc)) {+ rubricScores[rubricId] = acc.count > 0 ? acc.sum / acc.count : 0;+ }++ // Wall-clock duration: from startedAt (DB column, set when run enters 'running') to now+ const startedAt = run.startedAt ? new Date(run.startedAt).getTime() : undefined;+ const wallClockDuration = startedAt ? Date.now() - startedAt : undefined;++ const metrics: EvalRunMetrics = {+ averageScore: evaluatedCases > 0 ? totalScore / evaluatedCases : 0,+ // Cases with a RunTopic (executed). Equals totalCases for internal runs,+ // where every case gets a pre-created topic.+ completedCases: runTopics.length,+ cost: sumCost ? roundCost(sumCost) : undefined,+ duration: wallClockDuration || undefined,+ errorCases,+ externalCases: externalCases || undefined,+ failedCases,+ llmCalls: sumLlmCalls || undefined,+ passRate: totalCases > 0 ? passedCases / totalCases : 0,+ passedCases,+ perCaseCost: sumCost && totalCases ? roundCost(sumCost / totalCases) : undefined,+ perCaseLlmCalls:+ sumLlmCalls && totalCases ? Math.round((sumLlmCalls / totalCases) * 10) / 10 : undefined,+ perCaseSteps:+ sumSteps && totalCases ? Math.round((sumSteps / totalCases) * 10) / 10 : undefined,+ perCaseTokens: sumTokens && totalCases ? Math.round(sumTokens / totalCases) : undefined,+ perCaseToolCalls:+ sumToolCalls && totalCases ? Math.round((sumToolCalls / totalCases) * 10) / 10 : undefined,+ rubricScores,+ steps: sumSteps || undefined,+ timeoutCases,+ tokens: sumTokens || undefined,+ toolCalls: sumToolCalls || undefined,+ totalCases,+ totalCost: actualTotalCost ? roundCost(actualTotalCost) : undefined,+ totalDuration: actualTotalDuration || undefined,+ totalTokens: actualTotalTokens || undefined,+ };++ // Add pass@k / pass^k only when k > 1+ if (k > 1) {+ metrics.passAtK = totalCases > 0 ? passAtKCount / totalCases : 0;+ metrics.passAllK = totalCases > 0 ? passAllKCount / totalCases : 0;+ }++ return metrics;+}diff --git a/apps/server/src/services/agentEvalRun/index.ts b/apps/server/src/services/agentEvalRun/index.tsindex 7ffa514c40e..258d909af47 100644--- a/apps/server/src/services/agentEvalRun/index.ts+++ b/apps/server/src/services/agentEvalRun/index.ts@@ -43,6 +43,8 @@ import {type ResumeThreadTrajectoryPayload,} from '@/server/workflows/agentEvalRun';+import { evaluateAndFinalizeRun } from './aggregate';+/** Round cost to at most 6 decimal places to avoid floating-point noise */const roundCost = (v: number): number => Math.round(v * 1e6) / 1e6;const EVAL_AGENT_RUNTIME_QSTASH_RETRIES = 5;@@ -267,12 +269,14 @@ export class AgentEvalRunService {} catch (error) {// Race-safe idempotency: a concurrent create with the same caller id won// — return the winner when params are equivalent, else conflict.- if (params.id && (error as { code?: string })?.code === '23505') {+ const databaseError = error as { code?: string; cause?: { code?: string } };+ if (params.id && (databaseError?.code ?? databaseError?.cause?.code) === '23505') {const existing = await this.runModel.findById(params.id);if (existing) {if (!matchesExisting(existing)) throw new Error(RUN_CREATE_ID_CONFLICT, { cause: error });return existing;}+ throw new Error(RUN_CREATE_ID_CONFLICT, { cause: error });}throw error;}@@ -2310,171 +2314,7 @@ export class AgentEvalRunService {return { allDone: completedCount >= totalCases, completedCount };}- async evaluateAndFinalizeRun(params: {- /**- * Dataset case count. For external runs (Topics created on demand) this is- * the denominator for totalCases/passRate; internal runs omit it and keep- * `runTopics.length` (all cases are pre-created).- */- expectedTotalCases?: number;- run: {- config?: EvalRunConfig | null;- id: string;- metrics?: EvalRunMetrics | null;- /**- * Accepts a string because the finalize-run workflow reads this row inside a step, and- * Upstash restores step results from JSON — the `Date` arrives as an ISO string.- */- startedAt?: Date | null | string;- };- runTopics: Array<{- evalResult?: EvalRunTopicResult | null;- passed?: boolean | null;- runId: string;- score?: number | null;- status?: string | null;- topicId: string;- }>;- }): Promise<EvalRunMetrics> {- const { run, runTopics } = params;- const k = run.config?.k ?? 1;-- let passedCases = 0;- let failedCases = 0;- let errorCases = 0;- let externalCases = 0;- let timeoutCases = 0;- let totalScore = 0;- // Sum of per-case averages (for per-case display)- let sumCost = 0;- let sumTokens = 0;- let sumSteps = 0;- let sumLlmCalls = 0;- let sumToolCalls = 0;- // Actual cumulative totals across all K executions- let actualTotalCost = 0;- let actualTotalTokens = 0;- let actualTotalDuration = 0;- const rubricScoreAcc: Record<string, { count: number; sum: number }> = {};-- // pass@k / pass^k counters (only meaningful when k > 1)- let passAtKCount = 0;- let passAllKCount = 0;-- for (const runTopic of runTopics) {- const existingResult = runTopic.evalResult;-- // Accumulate per-case averages (cost/tokens/steps/llmCalls/toolCalls are averages per execution)- if (existingResult?.cost) sumCost += existingResult.cost;- if (existingResult?.tokens) sumTokens += existingResult.tokens;- if (existingResult?.steps) sumSteps += existingResult.steps;- if (existingResult?.llmCalls) sumLlmCalls += existingResult.llmCalls;- if (existingResult?.toolCalls) sumToolCalls += existingResult.toolCalls;-- // Accumulate actual totals (totalCost has K-thread cumulative, fallback to cost for K=1)- actualTotalCost += existingResult?.totalCost ?? existingResult?.cost ?? 0;- actualTotalTokens += existingResult?.totalTokens ?? existingResult?.tokens ?? 0;- actualTotalDuration += existingResult?.totalDuration ?? existingResult?.duration ?? 0;-- // Count by status- if (runTopic.status === 'passed') {- passedCases++;- } else if (runTopic.status === 'failed') {- failedCases++;- } else if (runTopic.status === 'error') {- errorCases++;- } else if (runTopic.status === 'external') {- externalCases++;- } else if (runTopic.status === 'timeout') {- timeoutCases++;- }-- // Only accumulate scores for evaluated (non-error, non-timeout, non-external) cases- if (- runTopic.status !== 'error' &&- runTopic.status !== 'timeout' &&- runTopic.status !== 'external' &&- runTopic.score != null- ) {- totalScore += runTopic.score;- }-- // Accumulate per-rubric scores from existing evalResult (exclude error/timeout/external cases)- if (- runTopic.status !== 'error' &&- runTopic.status !== 'timeout' &&- runTopic.status !== 'external' &&- existingResult?.rubricScores- ) {- for (const rs of existingResult.rubricScores) {- if (!rubricScoreAcc[rs.rubricId]) {- rubricScoreAcc[rs.rubricId] = { count: 0, sum: 0 };- }- rubricScoreAcc[rs.rubricId].sum += rs.score;- rubricScoreAcc[rs.rubricId].count++;- }- }-- // pass@k / pass^k: derive from thread results when k > 1- if (k > 1 && existingResult?.threads && existingResult.threads.length > 0) {- const anyThreadPassed = existingResult.threads.some((t) => t.passed === true);- const allThreadsPassed = existingResult.threads.every((t) => t.passed === true);- if (anyThreadPassed) passAtKCount++;- if (allThreadsPassed) passAllKCount++;- }- }-- const totalCases = params.expectedTotalCases ?? runTopics.length;- const evaluatedCases = passedCases + failedCases;- const rubricScores: Record<string, number> = {};- for (const [rubricId, acc] of Object.entries(rubricScoreAcc)) {- rubricScores[rubricId] = acc.count > 0 ? acc.sum / acc.count : 0;- }-- // Wall-clock duration: from startedAt (DB column, set when run enters 'running') to now- const startedAt = run.startedAt ? new Date(run.startedAt).getTime() : undefined;- const wallClockDuration = startedAt ? Date.now() - startedAt : undefined;-- const metrics: EvalRunMetrics = {- averageScore: evaluatedCases > 0 ? totalScore / evaluatedCases : 0,- // Cases with a RunTopic (executed). Equals totalCases for internal runs,- // where every case gets a pre-created topic.- completedCases: runTopics.length,- cost: sumCost ? roundCost(sumCost) : undefined,- duration: wallClockDuration || undefined,- errorCases,- externalCases: externalCases || undefined,- failedCases,- llmCalls: sumLlmCalls || undefined,- passRate: totalCases > 0 ? passedCases / totalCases : 0,- passedCases,- perCaseCost: sumCost && totalCases ? roundCost(sumCost / totalCases) : undefined,- perCaseLlmCalls:- sumLlmCalls && totalCases ? Math.round((sumLlmCalls / totalCases) * 10) / 10 : undefined,- perCaseSteps:- sumSteps && totalCases ? Math.round((sumSteps / totalCases) * 10) / 10 : undefined,- perCaseTokens: sumTokens && totalCases ? Math.round(sumTokens / totalCases) : undefined,- perCaseToolCalls:- sumToolCalls && totalCases ? Math.round((sumToolCalls / totalCases) * 10) / 10 : undefined,- rubricScores,- steps: sumSteps || undefined,- timeoutCases,- tokens: sumTokens || undefined,- toolCalls: sumToolCalls || undefined,- totalCases,- totalCost: actualTotalCost ? roundCost(actualTotalCost) : undefined,- totalDuration: actualTotalDuration || undefined,- totalTokens: actualTotalTokens || undefined,- };-- // Add pass@k / pass^k only when k > 1- if (k > 1) {- metrics.passAtK = totalCases > 0 ? passAtKCount / totalCases : 0;- metrics.passAllK = totalCases > 0 ? passAllKCount / totalCases : 0;- }-- return metrics;- }+ evaluateAndFinalizeRun = evaluateAndFinalizeRun;private async evaluateCase(runId: string,diff --git a/apps/server/src/services/agentEvalRun/reportResults.ts b/apps/server/src/services/agentEvalRun/reportResults.tsnew file mode 100644index 00000000000..377a1e75189--- /dev/null+++ b/apps/server/src/services/agentEvalRun/reportResults.ts@@ -0,0 +1,319 @@+import type {+ EvalCaseSelection,+ EvalRunMetrics,+ EvalRunTopicResult,+ EvalThreadResult,+} from '@lobechat/types';+import { TRPCError } from '@trpc/server';+import isEqual from 'fast-deep-equal';++import type {+ AgentEvalRunModel,+ AgentEvalRunTopicModel,+ AgentEvalTestCaseModel,+} from '@/database/models/agentEval';+import type { ThreadModel } from '@/database/models/thread';++import type { AgentEvalRunService } from './index';++interface ReportResultInput {+ correct: boolean;+ result?: Record<string, unknown>;+ runId: string;+ score: number;+ threadId?: string;+ topicId: string;+}++/**+ * Decide the run status from aggregated metrics. Priority: external (still+ * awaiting external eval) > running (cases outstanding) > failed (every case+ * errored/timed out) > completed. Exported for unit tests.+ */+export const resolveRunStatus = (+ metrics: Pick<EvalRunMetrics, 'completedCases' | 'errorCases' | 'timeoutCases' | 'totalCases'>,+ hasAwaitingExternal: boolean,+): 'completed' | 'external' | 'failed' | 'running' => {+ if (hasAwaitingExternal) return 'external';+ const totalCases = metrics.totalCases ?? 0;+ if ((metrics.completedCases ?? 0) < totalCases) return 'running';+ return (metrics.errorCases ?? 0) + (metrics.timeoutCases ?? 0) >= totalCases+ ? 'failed'+ : 'completed';+};++/**+ * Denominator for external-run totals. External runs create topics on demand,+ * so the dataset case count is the baseline; a persisted caseSelection narrows+ * it to the selected subset (include → selection size, exclude → dataset minus+ * excluded). Omitted selection means all cases (canonical).+ *+ * caseIds are shape-validated only (existence is the worker's contract); a+ * worker executing fewer cases than the selection is treated the same as one+ * executing fewer than the full dataset — no extra clamping query. Exported+ * for unit tests.+ */+export const resolveExpectedTotalCases = (+ caseSelection: EvalCaseSelection | undefined,+ datasetCaseCount: number,+): number => {+ if (!caseSelection || caseSelection.mode === 'all') return datasetCaseCount;+ const selectedIds = caseSelection.caseIds ?? [];+ if (caseSelection.mode === 'include') return selectedIds.length;+ return Math.max(datasetCaseCount - selectedIds.length, 0);+};++export const recomputeRunAggregation = async (+ ctx: {+ runModel: AgentEvalRunModel;+ runService: Pick<AgentEvalRunService, 'evaluateAndFinalizeRun'>;+ runTopicModel: AgentEvalRunTopicModel;+ testCaseModel: Pick<AgentEvalTestCaseModel, 'countByDatasetId'>;+ },+ runId: string,+) => {+ const refreshedRun = await ctx.runModel.findById(runId);+ if (!refreshedRun) return undefined;++ const refreshedTopics = await ctx.runTopicModel.findByRunId(runId);+ const metrics = await ctx.runService.evaluateAndFinalizeRun({+ expectedTotalCases: resolveExpectedTotalCases(+ refreshedRun.config?.caseSelection,+ await ctx.testCaseModel.countByDatasetId(refreshedRun.datasetId),+ ),+ run: {+ config: refreshedRun.config,+ id: refreshedRun.id,+ metrics: refreshedRun.metrics,+ startedAt: refreshedRun.startedAt,+ },+ runTopics: refreshedTopics,+ });++ const hasAwaitingExternal = refreshedTopics.some(+ (topic) =>+ topic.status === 'external' ||+ (topic.evalResult as Record<string, unknown> | null)?.awaitingExternalEval === true,+ );+ const hasActiveTopic = refreshedTopics.some(+ (topic) => topic.status === 'pending' || topic.status === 'running',+ );+ const status = hasActiveTopic ? 'running' : resolveRunStatus(metrics, hasAwaitingExternal);++ await ctx.runModel.update(runId, { metrics, status });++ return status;+};++export const applyReportResult = async (+ ctx: {+ runModel: AgentEvalRunModel;+ runTopicModel: AgentEvalRunTopicModel;+ runService: Pick<AgentEvalRunService, 'evaluateAndFinalizeRun'>;+ testCaseModel: Pick<AgentEvalTestCaseModel, 'countByDatasetId'>;+ threadModel: ThreadModel;+ },+ input: ReportResultInput,+ recomputeRun: boolean,+) => {+ const run = await ctx.runModel.findById(input.runId);+ if (!run) {+ throw new TRPCError({ code: 'NOT_FOUND', message: 'Run not found' });+ }++ const runTopics = await ctx.runTopicModel.findByRunId(input.runId);+ const runTopic = runTopics.find((item) => item.topicId === input.topicId);+ if (!runTopic) {+ throw new TRPCError({ code: 'NOT_FOUND', message: 'Run topic not found' });+ }++ const runK = run.config?.k ?? 1;+ const rubricScores = [{ rubricId: 'external', score: input.score }];+ const existingEvalResult = (runTopic.evalResult ?? {}) as EvalRunTopicResult &+ Record<string, unknown>;+ const externalResult = input.result ?? {};++ let idempotent = false;+ let reportedThreads: number;+ let totalThreads: number;+ let topicFinalized: boolean;++ if (runK > 1) {+ if (!input.threadId) {+ throw new TRPCError({+ code: 'BAD_REQUEST',+ message: 'threadId is required when k > 1',+ });+ }++ const allThreads = await ctx.threadModel.queryByTopicId(input.topicId);+ const evalThreads = allThreads.filter((thread) => thread.type === 'eval');+ const sourceThreads = evalThreads.length > 0 ? evalThreads : allThreads;+ if (sourceThreads.length === 0) {+ throw new TRPCError({+ code: 'BAD_REQUEST',+ message: 'No threads found for this topic',+ });+ }++ const threads: EvalThreadResult[] =+ (existingEvalResult.threads as EvalThreadResult[] | undefined)?.map((thread) => ({+ ...thread,+ })) ??+ sourceThreads.map((thread) => ({+ status: 'external',+ threadId: thread.id,+ }));++ let targetIndex = threads.findIndex((thread) => thread.threadId === input.threadId);+ if (targetIndex < 0) {+ const existsInTopic = sourceThreads.some((thread) => thread.id === input.threadId);+ if (!existsInTopic) {+ throw new TRPCError({+ code: 'NOT_FOUND',+ message: 'Thread not found for this topic',+ });+ }++ threads.push({ status: 'external', threadId: input.threadId });+ targetIndex = threads.length - 1;+ }++ totalThreads = threads.length;+ const targetThread = threads[targetIndex];+ const alreadyReported =+ targetThread.status === 'completed' &&+ targetThread.score === input.score &&+ targetThread.passed === input.correct &&+ isEqual(+ (existingEvalResult.externalThreadResults as Record<string, unknown> | undefined)?.[+ input.threadId+ ],+ externalResult,+ );+ if (alreadyReported) {+ idempotent = true;+ } else {+ threads[targetIndex] = {+ ...targetThread,+ passed: input.correct,+ rubricScores,+ score: input.score,+ status: 'completed',+ };++ const existingThreadResults = (existingEvalResult.externalThreadResults ?? {}) as Record<+ string,+ unknown+ >;+ const nextEvalResult = {+ ...existingEvalResult,+ awaitingExternalEval: true,+ externalThreadResults: {+ ...existingThreadResults,+ [input.threadId]: externalResult,+ },+ threads,+ } satisfies EvalRunTopicResult & Record<string, unknown>;++ await ctx.runTopicModel.updateByRunAndTopic(input.runId, input.topicId, {+ evalResult: nextEvalResult,+ status: 'external',+ });+ }++ reportedThreads = threads.filter(+ (thread) => thread.status === 'completed' && typeof thread.score === 'number',+ ).length;+ topicFinalized = reportedThreads >= totalThreads;++ if (topicFinalized) {+ const finalThreads = threads;+ const totalScore = finalThreads.reduce((acc, thread) => acc + (thread.score ?? 0), 0);+ const avgScore = totalScore / finalThreads.length;+ const passAtK = finalThreads.some((thread) => thread.passed === true);+ const passAllK = finalThreads.every((thread) => thread.passed === true);++ const existingThreadResults = (existingEvalResult.externalThreadResults ?? {}) as Record<+ string,+ unknown+ >;+ const nextEvalResult = {+ ...existingEvalResult,+ awaitingExternalEval: false,+ externalThreadResults: {+ ...existingThreadResults,+ [input.threadId]: externalResult,+ },+ passAllK,+ passAtK,+ rubricScores: [{ rubricId: 'external', score: avgScore }],+ threads: finalThreads,+ } satisfies EvalRunTopicResult & Record<string, unknown>;++ await ctx.runTopicModel.updateByRunAndTopic(input.runId, input.topicId, {+ evalResult: nextEvalResult,+ passed: passAtK,+ score: avgScore,+ status: passAtK ? 'passed' : 'failed',+ });+ }+ } else {+ const externalError = externalResult.error as Record<string, unknown> | string | undefined;+ const errorMessage =+ typeof externalError === 'string'+ ? externalError+ : [externalError?.type, externalError?.message].filter(Boolean).join(': ') || undefined;+ const topicStatus = errorMessage ? 'error' : input.correct ? 'passed' : 'failed';+ const alreadyReported =+ runTopic.status === topicStatus &&+ runTopic.score === input.score &&+ runTopic.passed === input.correct &&+ isEqual(existingEvalResult.externalResult, externalResult);+ if (alreadyReported) {+ idempotent = true;+ } else {+ const nextEvalResult = {+ ...existingEvalResult,+ awaitingExternalEval: false,+ externalResult,+ rubricScores,+ } satisfies EvalRunTopicResult & Record<string, unknown>;+ if (errorMessage) {+ nextEvalResult.error = errorMessage;+ nextEvalResult.errorDetail = externalError;+ } else {+ delete nextEvalResult.error;+ delete nextEvalResult.errorDetail;+ }++ await ctx.runTopicModel.updateByRunAndTopic(input.runId, input.topicId, {+ evalResult: nextEvalResult,+ passed: input.correct,+ score: input.score,+ status: topicStatus,+ });+ }++ reportedThreads = 1;+ totalThreads = 1;+ topicFinalized = true;+ }++ let runStatus: string | undefined;+ if (recomputeRun) {+ runStatus = await recomputeRunAggregation(ctx, input.runId);+ }++ return {+ idempotent,+ reportedThreads,+ runId: input.runId,+ runStatus,+ success: true,+ threadId: input.threadId,+ topicFinalized,+ topicId: input.topicId,+ totalThreads,+ };+};diff --git a/packages/builtin-skills/src/acceptance/SKILL.md b/packages/builtin-skills/src/acceptance/SKILL.mdindex 3f118c521d3..f3b074533c5 100644--- a/packages/builtin-skills/src/acceptance/SKILL.md+++ b/packages/builtin-skills/src/acceptance/SKILL.md@@ -25,6 +25,35 @@ marks it `uncertain` and holds the delivery.author (or discover) the plan → pick the surface → capture evidence → publish the round → self-check coverage```+## Decide whether to execute before starting a round++Creating or updating a PR, marking it ready, or being asked to upload a report+must not by itself start another verification run. First inspect the requested+scope and the task's existing reports, evidence, and published acceptance links+(from the conversation, PR, or local `.acceptances/` directory).++| Delivery state | Action |+| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| Documentation/instruction-only change, or pure refactor/tooling change with no product behavior change | Skip product acceptance and briefly state why. Keep any applicable quality checks. |+| Gitlink-only sync | Do not launch a fresh acceptance. Link the upstream change and its existing acceptance when available; disclose missing upstream evidence without claiming it passed. Cloud changes accompanying the sync are assessed separately. |+| Completed acceptance already published and still covers the delivery | Reuse its URL and coverage. Do not create a round or rerun cases just for the PR. |+| Completed acceptance report and evidence exist locally and still cover the delivery | Inspect coverage and artifacts, then upload that report using [report.md](references/report.md). Preserve the original execution provenance; no product rerun, new plan, or repeated completed checker review is needed merely for upload. |+| Product behavior lacks valid evidence, or relevant behavior changed after verification | Execute only the missing or affected outcomes, retain unaffected evidence with its original provenance, and publish according to the round rules below. |++Evidence is reusable when its criteria cover the requested behavior, its artifacts+are available and support the observations, and subsequent code, dependency,+configuration, or environment changes do not invalidate those observations.+Compare the relevant changes; a different commit SHA, rebase, PR event, or report+publication status alone is not a reason to rerun. Failed/blocked checks and missing+required evidence are not passes: repair or supplement those specific gaps.+An explicit user request for fresh verification still takes precedence.++The execution, environment setup, plan/checker, and capture sections below apply+when executing acceptance. For reuse or upload only, inspect the existing report+and evidence and complete the necessary publication/coverage steps; do not boot+services or replay completed cases. Uploading does not change when or against+which implementation the evidence was captured.+## Independent acceptance review (first round only)The primary checks the environment, writes the plan, executes cases, inspectsdiff --git a/packages/const/src/apiKeyScope.ts b/packages/const/src/apiKeyScope.tsindex f26f537aae6..c2b008047b7 100644--- a/packages/const/src/apiKeyScope.ts+++ b/packages/const/src/apiKeyScope.ts@@ -30,6 +30,8 @@ export const API_KEY_SCOPES = [API_KEY_FULL_ACCESS_SCOPE,'agent:read','agent:write',+ 'eval:read',+ 'eval:write','chat:read','chat:write','model:invoke',diff --git a/packages/database/src/models/agentEval/run.ts b/packages/database/src/models/agentEval/run.tsindex 9b0fa187910..27760e838b9 100644--- a/packages/database/src/models/agentEval/run.ts+++ b/packages/database/src/models/agentEval/run.ts@@ -67,7 +67,7 @@ export class AgentEvalRunModel {.select().from(agentEvalRuns).where(and(...conditions))- .orderBy(desc(agentEvalRuns.createdAt))+ .orderBy(desc(agentEvalRuns.createdAt), desc(agentEvalRuns.id)).$dynamic();if (filter?.limit !== undefined) {diff --git a/packages/database/src/models/agentEval/runTopic.ts b/packages/database/src/models/agentEval/runTopic.tsindex 5dcd643deab..1f4d63bf5a6 100644--- a/packages/database/src/models/agentEval/runTopic.ts+++ b/packages/database/src/models/agentEval/runTopic.ts@@ -59,7 +59,7 @@ export class AgentEvalRunTopicModel {.leftJoin(agentEvalTestCases, eq(agentEvalRunTopics.testCaseId, agentEvalTestCases.id)).leftJoin(topics, eq(agentEvalRunTopics.topicId, topics.id)).where(and(eq(agentEvalRunTopics.runId, runId), this.ownership()))- .orderBy(asc(agentEvalTestCases.sortOrder))+ .orderBy(asc(agentEvalTestCases.sortOrder), asc(agentEvalRunTopics.topicId)).$dynamic();if (pagination?.limit !== undefined) {diff --git a/packages/openapi/openapi.yml b/packages/openapi/openapi.ymlindex 6270752a5f0..26d2ead97bd 100644--- a/packages/openapi/openapi.yml+++ b/packages/openapi/openapi.yml@@ -47,6 +47,8 @@ components:- "*"- agent:read- agent:write+ - eval:read+ - eval:write- chat:read- chat:write- model:invoke@@ -106,6 +108,23 @@ components:type:- object- "null"+ plugins:+ type: array+ items:+ type: object+ additionalProperties: false+ properties:+ identifier:+ type: string+ mode:+ type: string+ enum:+ - pinned+ - auto+ - disabled+ required:+ - identifier+ - modeprovider:type:- string@@ -1116,9 +1135,9 @@ paths:type: stringminLength: 1sort:- anyOf:- - type: number- - type: "null"+ type:+ - number+ - "null"required:- nameresponses:@@ -1152,11 +1171,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -1228,11 +1260,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -1293,9 +1338,9 @@ paths:minLength: 1- type: "null"sort:- anyOf:- - type: number- - type: "null"+ type:+ - number+ - "null"responses:"200":content:@@ -1319,11 +1364,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -1397,11 +1455,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -1490,11 +1561,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -1547,9 +1631,9 @@ paths:- type: objectproperties:enableGraphMode:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"graph:anyOf:- type: object@@ -1690,17 +1774,17 @@ paths:- type: "null"- type: "null"avatar:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"chatConfig:anyOf:- type: objectproperties:disableContextCaching:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"displayMode:anyOf:- type: string@@ -1709,33 +1793,33 @@ paths:- docs- type: "null"enableCompressHistory:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableHistoryCount:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableMaxTokens:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableReasoning:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableReasoningEffort:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"historyCount:- anyOf:- - type: number- - type: "null"+ type:+ - number+ - "null"reasoningBudgetToken:- anyOf:- - type: number- - type: "null"+ type:+ - number+ - "null"reasoningEffort:anyOf:- type: string@@ -1745,9 +1829,9 @@ paths:- high- type: "null"searchFCModel:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"searchMode:anyOf:- type: string@@ -1756,18 +1840,37 @@ paths:- enabled- type: "null"useModelBuiltinSearch:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"- type: "null"description:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"model:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"+ plugins:+ maxItems: 100+ type: array+ items:+ type: object+ properties:+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ mode:+ type: string+ enum:+ - pinned+ - auto+ - disabled+ required:+ - identifier+ additionalProperties: falseparams:anyOf:- type: object@@ -1776,13 +1879,13 @@ paths:additionalProperties: {}- type: "null"provider:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"systemRole:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"title:type: stringminLength: 1@@ -1811,11 +1914,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -1887,11 +2003,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -1951,9 +2080,9 @@ paths:- type: objectproperties:enableGraphMode:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"graph:anyOf:- type: object@@ -2094,17 +2223,17 @@ paths:- type: "null"- type: "null"avatar:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"chatConfig:anyOf:- type: objectproperties:disableContextCaching:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"displayMode:anyOf:- type: string@@ -2113,33 +2242,33 @@ paths:- docs- type: "null"enableCompressHistory:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableHistoryCount:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableMaxTokens:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableReasoning:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableReasoningEffort:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"historyCount:- anyOf:- - type: number- - type: "null"+ type:+ - number+ - "null"reasoningBudgetToken:- anyOf:- - type: number- - type: "null"+ type:+ - number+ - "null"reasoningEffort:anyOf:- type: string@@ -2149,9 +2278,9 @@ paths:- high- type: "null"searchFCModel:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"searchMode:anyOf:- type: string@@ -2160,18 +2289,37 @@ paths:- enabled- type: "null"useModelBuiltinSearch:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"- type: "null"description:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"model:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"+ plugins:+ maxItems: 100+ type: array+ items:+ type: object+ properties:+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ mode:+ type: string+ enum:+ - pinned+ - auto+ - disabled+ required:+ - identifier+ additionalProperties: falseparams:anyOf:- type: object@@ -2180,13 +2328,13 @@ paths:additionalProperties: {}- type: "null"provider:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"systemRole:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"title:type: stringminLength: 1@@ -2213,11 +2361,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -2291,11 +2452,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -2334,23 +2508,22 @@ paths:description: Internal server errortags:- agents- /api/v1/api-keys:- get:- operationId: getApiV1ApiKeys- summary: List API keys+ /api/v1/agents/{id}/duplicate:+ post:+ operationId: postApiV1AgentsByIdDuplicate+ summary: Duplicate agenttags:- - api-keys+ - agentsresponses:- "200":+ "201":content:application/json:schema:additionalProperties: falseproperties:data:- items:- $ref: "#/components/schemas/ApiKey"- type: array+ additionalProperties: true+ type: objectmessage:type: stringsuccess:@@ -2365,11 +2538,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -2406,8 +2592,13 @@ paths:schema:$ref: "#/components/schemas/ApiError"description: Internal server error- post:- operationId: postApiV1ApiKeys+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ required: truerequestBody:required: truecontent:@@ -2415,38 +2606,126 @@ paths:schema:type: objectproperties:- expiresAt:- anyOf:- - type: string- format: date-time- pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$- - type: "null"- name:+ title:type: stringminLength: 1- maxLength: 256- scopes:- anyOf:- - minItems: 1- type: array- items:- type: string- enum:- - "*"- - agent:read- - agent:write- - chat:read- - chat:write- - model:invoke- - model:read- - model:write- - file:read- - file:write- - knowledge:read- - knowledge:write- - mcp:read- - mcp:write- - usage:read+ maxLength: 255+ additionalProperties: false+ /api/v1/api-keys:+ get:+ operationId: getApiV1ApiKeys+ summary: List API keys+ tags:+ - api-keys+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ items:+ $ref: "#/components/schemas/ApiKey"+ type: array+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Invalid request+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ post:+ operationId: postApiV1ApiKeys+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ expiresAt:+ anyOf:+ - type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$+ - type: "null"+ name:+ type: string+ minLength: 1+ maxLength: 256+ scopes:+ anyOf:+ - minItems: 1+ type: array+ items:+ type: string+ enum:+ - "*"+ - agent:read+ - agent:write+ - eval:read+ - eval:write+ - chat:read+ - chat:write+ - model:invoke+ - model:read+ - model:write+ - file:read+ - file:write+ - knowledge:read+ - knowledge:write+ - mcp:read+ - mcp:write+ - usage:read- workspace:read- workspace:write- user:read@@ -2494,6 +2773,8 @@ paths:- "*"- agent:read- agent:write+ - eval:read+ - eval:write- chat:read- chat:write- model:invoke@@ -2540,11 +2821,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -2617,11 +2911,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -2683,7 +2990,7 @@ paths:anyOf:- type: stringformat: date-time- pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$- type: "null"name:type: string@@ -2713,11 +3020,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -2792,11 +3112,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -2892,9 +3225,9 @@ paths:maxLength: 64- type: "null"stream:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"temperature:anyOf:- type: number@@ -2930,11 +3263,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -3039,11 +3385,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -3103,9 +3462,9 @@ paths:- type: objectproperties:disableContextCaching:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"displayMode:anyOf:- type: string@@ -3114,25 +3473,25 @@ paths:- docs- type: "null"enableCompressHistory:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableHistoryCount:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableMaxTokens:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableReasoning:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"enableReasoningEffort:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"historyCount:anyOf:- type: integer@@ -3173,9 +3532,9 @@ paths:maximum: 1000000- type: "null"useModelBuiltinSearch:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"- type: "null"conversationHistory:maxItems: 1000@@ -3251,11 +3610,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -3310,7 +3682,85 @@ paths:additionalProperties: falseproperties:data:- $ref: "#/components/schemas/EvalRun"+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ config:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ executionMode:+ type: string+ enum:+ - internal+ - external+ datasetId:+ type: string+ experimentId:+ type:+ - string+ - "null"+ parentRunId:+ type:+ - string+ - "null"+ status:+ type: string+ enum:+ - idle+ - pending+ - running+ - external+ - completed+ - failed+ - aborted+ targetAgentId:+ type:+ - string+ - "null"+ name:+ type:+ - string+ - "null"+ metrics:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ startedAt:+ anyOf:+ - type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ - type: "null"+ required:+ - id+ - createdAt+ - updatedAt+ - config+ - executionMode+ - datasetId+ - experimentId+ - parentRunId+ - status+ - targetAgentId+ - name+ - metrics+ - startedAt+ additionalProperties: falsemessage:type: stringsuccess:@@ -3325,11 +3775,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -3376,19 +3839,60 @@ paths:config:type: objectproperties:- k:- type: integer- minimum: 1- maximum: 10- maxSteps:+ maxConcurrency:type: integerminimum: 1- maximum: 1000- timeout:- type: integer- minimum: 60000- maximum: 21600000+ maximum: 100+ caseSelection:+ oneOf:+ - type: object+ properties:+ mode:+ type: string+ const: all+ required:+ - mode+ additionalProperties: false+ - type: object+ properties:+ mode:+ type: string+ enum:+ - include+ - exclude+ caseIds:+ minItems: 1+ maxItems: 10000+ type: array+ items:+ type: string+ minLength: 1+ required:+ - mode+ - caseIds+ additionalProperties: false+ k:+ type: integer+ minimum: 1+ maximum: 10+ maxSteps:+ type: integer+ minimum: 1+ maximum: 1000+ timeout:+ type: integer+ minimum: 60000+ maximum: 21600000additionalProperties: false+ executionMode:+ type: string+ enum:+ - internal+ - external+ experimentId:+ type: string+ minLength: 1+ maxLength: 128datasetId:type: stringminLength: 1@@ -3422,7 +3926,98 @@ paths:additionalProperties: falseproperties:data:- $ref: "#/components/schemas/EvalRun"+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ runs:+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ config:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ executionMode:+ type: string+ enum:+ - internal+ - external+ datasetId:+ type: string+ experimentId:+ type:+ - string+ - "null"+ parentRunId:+ type:+ - string+ - "null"+ status:+ type: string+ enum:+ - idle+ - pending+ - running+ - external+ - completed+ - failed+ - aborted+ targetAgentId:+ type:+ - string+ - "null"+ name:+ type:+ - string+ - "null"+ metrics:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ startedAt:+ anyOf:+ - type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ - type: "null"+ required:+ - id+ - createdAt+ - updatedAt+ - config+ - executionMode+ - datasetId+ - experimentId+ - parentRunId+ - status+ - targetAgentId+ - name+ - metrics+ - startedAt+ additionalProperties: false+ total:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - runs+ - total+ additionalProperties: falsemessage:type: stringsuccess:@@ -3437,11 +4032,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -3479,14 +4087,36 @@ paths:$ref: "#/components/schemas/ApiError"description: Internal server errorparameters:+ - in: query+ name: limit+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: offset+ schema:+ type: integer+ minimum: 0+ maximum: 1000000- in: queryname: pageschema:- type: string+ type: integer+ minimum: 1+ maximum: 1000000- in: queryname: pageSize+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: experimentIdschema:type: string+ minLength: 1+ maxLength: 128- in: queryname: datasetIdschema:@@ -3505,10 +4135,10 @@ paths:- failed- aborted- external- /api/v1/eval/datasets:+ /api/v1/eval/runs/{id}/topics:get:- operationId: getApiV1EvalDatasets- summary: List eval datasets+ operationId: getApiV1EvalRunsByIdTopics+ summary: List topic results of an eval runtags:- evalresponses:@@ -3519,7 +4149,5633 @@ paths:additionalProperties: falseproperties:data:- $ref: "#/components/schemas/EvalRun"+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ topics:+ type: array+ items:+ type: object+ properties:+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ evalResult:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ passed:+ type:+ - boolean+ - "null"+ runId:+ type: string+ score:+ type:+ - number+ - "null"+ status:+ type:+ - string+ - "null"+ testCaseId:+ type: string+ topicId:+ type: string+ input:+ type: string+ required:+ - createdAt+ - evalResult+ - passed+ - runId+ - score+ - status+ - testCaseId+ - topicId+ - input+ additionalProperties: false+ total:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ runId:+ type: string+ required:+ - topics+ - total+ - runId+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ - in: query+ name: limit+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: offset+ schema:+ type: integer+ minimum: 0+ maximum: 1000000+ - in: query+ name: page+ schema:+ type: integer+ minimum: 1+ maximum: 1000000+ - in: query+ name: pageSize+ schema:+ type: integer+ minimum: 1+ maximum: 100+ /api/v1/eval/runs/{id}:+ get:+ operationId: getApiV1EvalRunsById+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ config:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ executionMode:+ type: string+ enum:+ - internal+ - external+ datasetId:+ type: string+ experimentId:+ type:+ - string+ - "null"+ parentRunId:+ type:+ - string+ - "null"+ status:+ type: string+ enum:+ - idle+ - pending+ - running+ - external+ - completed+ - failed+ - aborted+ targetAgentId:+ type:+ - string+ - "null"+ name:+ type:+ - string+ - "null"+ metrics:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ startedAt:+ anyOf:+ - type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ - type: "null"+ required:+ - id+ - createdAt+ - updatedAt+ - config+ - executionMode+ - datasetId+ - experimentId+ - parentRunId+ - status+ - targetAgentId+ - name+ - metrics+ - startedAt+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ tags:+ - eval+ /api/v1/eval/runs/{id}/results:+ get:+ operationId: getApiV1EvalRunsByIdResults+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ - in: query+ name: limit+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: offset+ schema:+ type: integer+ minimum: 0+ maximum: 1000000+ - in: query+ name: page+ schema:+ type: integer+ minimum: 1+ maximum: 1000000+ - in: query+ name: pageSize+ schema:+ type: integer+ minimum: 1+ maximum: 100+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ results:+ type: array+ items:+ type: object+ properties:+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ passed:+ type:+ - boolean+ - "null"+ score:+ type:+ - number+ - "null"+ status:+ type:+ - string+ - "null"+ testCaseId:+ type: string+ topicId:+ type: string+ input:+ type: string+ result:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ required:+ - createdAt+ - passed+ - score+ - status+ - testCaseId+ - topicId+ - input+ - result+ additionalProperties: false+ total:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ runId:+ type: string+ required:+ - results+ - total+ - runId+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ tags:+ - eval+ post:+ operationId: postApiV1EvalRunsByIdResults+ summary: reportBatch+ tags:+ - eval+ description: "Claim: one pending worker succeeds, others receive 409. Reports:+ identical replays succeed; different results conflict. Batches are+ atomic. External workers can supply testCaseId to associate their own+ topic with a dataset case on first report. Retry: only terminal runs,+ concurrent repeats conflict."+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ items:+ type: array+ items:+ type: object+ properties:+ idempotent:+ type: boolean+ reportedThreads:+ type: number+ runId:+ type: string+ runStatus:+ type: string+ success:+ type: boolean+ threadId:+ type: string+ topicFinalized:+ type: boolean+ topicId:+ type: string+ totalThreads:+ type: number+ required:+ - idempotent+ - reportedThreads+ - runId+ - success+ - topicFinalized+ - topicId+ - totalThreads+ additionalProperties: false+ runId:+ type: string+ runStatus:+ type: string+ success:+ type: boolean+ required:+ - items+ - runId+ - runStatus+ - success+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ items:+ minItems: 1+ maxItems: 100+ type: array+ items:+ type: object+ properties:+ testCaseId:+ type: string+ minLength: 1+ maxLength: 128+ correct:+ type: boolean+ score:+ type: number+ result:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ threadId:+ type: string+ minLength: 1+ maxLength: 128+ topicId:+ type: string+ minLength: 1+ maxLength: 128+ required:+ - correct+ - score+ - topicId+ additionalProperties: false+ required:+ - items+ additionalProperties: false+ /api/v1/eval/benchmarks:+ post:+ operationId: postApiV1EvalBenchmarks+ summary: createBenchmark+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "201":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ description:+ type:+ - string+ - "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ referenceUrl:+ type:+ - string+ - "null"+ rubrics:+ default: []+ maxItems: 100+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ minLength: 1+ maxLength: 128+ name:+ type: string+ minLength: 1+ maxLength: 255+ type:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ weight:+ type: number+ minimum: 0+ threshold:+ type: number+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ config:+ anyOf:+ - type: object+ properties:+ value:+ type: string+ threshold:+ type: number+ required:+ - value+ additionalProperties: false+ - type: object+ properties:+ value:+ type: number+ tolerance:+ type: number+ required:+ - value+ additionalProperties: false+ - type: object+ properties:+ pattern:+ type: string+ required:+ - pattern+ additionalProperties: false+ - type: object+ properties:+ code:+ type: string+ required:+ - code+ additionalProperties: false+ - type: object+ properties:+ criteria:+ type: string+ model:+ type: string+ provider:+ type: string+ systemRole:+ type: string+ required:+ - criteria+ additionalProperties: false+ - type: object+ properties:+ values:+ type: array+ items:+ type: string+ caseSensitive:+ type: boolean+ required:+ - values+ additionalProperties: false+ - type: object+ properties:+ schema:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - schema+ additionalProperties: false+ - type: object+ properties:+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ innerMatcher:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ required:+ - extractor+ additionalProperties: false+ required:+ - id+ - name+ - type+ - weight+ - config+ additionalProperties: false+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ isSystem:+ type: boolean+ required:+ - id+ - identifier+ - name+ - description+ - metadata+ - referenceUrl+ - rubrics+ - createdAt+ - updatedAt+ - isSystem+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ id:+ type: string+ minLength: 1+ maxLength: 128+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ description:+ anyOf:+ - type: string+ maxLength: 10000+ - type: "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ referenceUrl:+ anyOf:+ - type: string+ format: uri+ - type: "null"+ rubrics:+ default: []+ maxItems: 100+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ minLength: 1+ maxLength: 128+ name:+ type: string+ minLength: 1+ maxLength: 255+ type:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ weight:+ type: number+ minimum: 0+ threshold:+ type: number+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ config:+ anyOf:+ - type: object+ properties:+ value:+ type: string+ threshold:+ type: number+ required:+ - value+ additionalProperties: false+ - type: object+ properties:+ value:+ type: number+ tolerance:+ type: number+ required:+ - value+ - type: object+ properties:+ pattern:+ type: string+ required:+ - pattern+ - type: object+ properties:+ code:+ type: string+ required:+ - code+ - type: object+ properties:+ criteria:+ type: string+ model:+ type: string+ provider:+ type: string+ systemRole:+ type: string+ required:+ - criteria+ - type: object+ properties:+ values:+ type: array+ items:+ type: string+ caseSensitive:+ type: boolean+ required:+ - values+ additionalProperties: false+ - type: object+ properties:+ schema:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - schema+ additionalProperties: false+ - type: object+ properties:+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ innerMatcher:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ required:+ - extractor+ additionalProperties: false+ required:+ - id+ - name+ - type+ - weight+ - config+ additionalProperties: false+ required:+ - identifier+ - name+ additionalProperties: false+ get:+ operationId: getApiV1EvalBenchmarks+ summary: listBenchmarks+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ benchmarks:+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ description:+ type:+ - string+ - "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ referenceUrl:+ type:+ - string+ - "null"+ rubrics:+ default: []+ maxItems: 100+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ minLength: 1+ maxLength: 128+ name:+ type: string+ minLength: 1+ maxLength: 255+ type:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ weight:+ type: number+ minimum: 0+ threshold:+ type: number+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ config:+ anyOf:+ - type: object+ properties:+ value:+ type: string+ threshold:+ type: number+ required:+ - value+ additionalProperties: false+ - type: object+ properties:+ value:+ type: number+ tolerance:+ type: number+ required:+ - value+ additionalProperties: false+ - type: object+ properties:+ pattern:+ type: string+ required:+ - pattern+ additionalProperties: false+ - type: object+ properties:+ code:+ type: string+ required:+ - code+ additionalProperties: false+ - type: object+ properties:+ criteria:+ type: string+ model:+ type: string+ provider:+ type: string+ systemRole:+ type: string+ required:+ - criteria+ additionalProperties: false+ - type: object+ properties:+ values:+ type: array+ items:+ type: string+ caseSensitive:+ type: boolean+ required:+ - values+ additionalProperties: false+ - type: object+ properties:+ schema:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - schema+ additionalProperties: false+ - type: object+ properties:+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ innerMatcher:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ required:+ - extractor+ additionalProperties: false+ required:+ - id+ - name+ - type+ - weight+ - config+ additionalProperties: false+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ isSystem:+ type: boolean+ required:+ - id+ - identifier+ - name+ - description+ - metadata+ - referenceUrl+ - rubrics+ - createdAt+ - updatedAt+ - isSystem+ additionalProperties: false+ total:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - benchmarks+ - total+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: query+ name: limit+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: offset+ schema:+ type: integer+ minimum: 0+ maximum: 1000000+ - in: query+ name: page+ schema:+ type: integer+ minimum: 1+ maximum: 1000000+ - in: query+ name: pageSize+ schema:+ type: integer+ minimum: 1+ maximum: 100+ /api/v1/eval/benchmarks/{id}:+ get:+ operationId: getApiV1EvalBenchmarksById+ summary: getBenchmark+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ description:+ type:+ - string+ - "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ referenceUrl:+ type:+ - string+ - "null"+ rubrics:+ default: []+ maxItems: 100+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ minLength: 1+ maxLength: 128+ name:+ type: string+ minLength: 1+ maxLength: 255+ type:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ weight:+ type: number+ minimum: 0+ threshold:+ type: number+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ config:+ anyOf:+ - type: object+ properties:+ value:+ type: string+ threshold:+ type: number+ required:+ - value+ additionalProperties: false+ - type: object+ properties:+ value:+ type: number+ tolerance:+ type: number+ required:+ - value+ additionalProperties: false+ - type: object+ properties:+ pattern:+ type: string+ required:+ - pattern+ additionalProperties: false+ - type: object+ properties:+ code:+ type: string+ required:+ - code+ additionalProperties: false+ - type: object+ properties:+ criteria:+ type: string+ model:+ type: string+ provider:+ type: string+ systemRole:+ type: string+ required:+ - criteria+ additionalProperties: false+ - type: object+ properties:+ values:+ type: array+ items:+ type: string+ caseSensitive:+ type: boolean+ required:+ - values+ additionalProperties: false+ - type: object+ properties:+ schema:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - schema+ additionalProperties: false+ - type: object+ properties:+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ innerMatcher:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ required:+ - extractor+ additionalProperties: false+ required:+ - id+ - name+ - type+ - weight+ - config+ additionalProperties: false+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ isSystem:+ type: boolean+ required:+ - id+ - identifier+ - name+ - description+ - metadata+ - referenceUrl+ - rubrics+ - createdAt+ - updatedAt+ - isSystem+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ patch:+ operationId: patchApiV1EvalBenchmarksById+ summary: updateBenchmark+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ description:+ type:+ - string+ - "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ referenceUrl:+ type:+ - string+ - "null"+ rubrics:+ default: []+ maxItems: 100+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ minLength: 1+ maxLength: 128+ name:+ type: string+ minLength: 1+ maxLength: 255+ type:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ weight:+ type: number+ minimum: 0+ threshold:+ type: number+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ config:+ anyOf:+ - type: object+ properties:+ value:+ type: string+ threshold:+ type: number+ required:+ - value+ additionalProperties: false+ - type: object+ properties:+ value:+ type: number+ tolerance:+ type: number+ required:+ - value+ additionalProperties: false+ - type: object+ properties:+ pattern:+ type: string+ required:+ - pattern+ additionalProperties: false+ - type: object+ properties:+ code:+ type: string+ required:+ - code+ additionalProperties: false+ - type: object+ properties:+ criteria:+ type: string+ model:+ type: string+ provider:+ type: string+ systemRole:+ type: string+ required:+ - criteria+ additionalProperties: false+ - type: object+ properties:+ values:+ type: array+ items:+ type: string+ caseSensitive:+ type: boolean+ required:+ - values+ additionalProperties: false+ - type: object+ properties:+ schema:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - schema+ additionalProperties: false+ - type: object+ properties:+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ innerMatcher:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ required:+ - extractor+ additionalProperties: false+ required:+ - id+ - name+ - type+ - weight+ - config+ additionalProperties: false+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ isSystem:+ type: boolean+ required:+ - id+ - identifier+ - name+ - description+ - metadata+ - referenceUrl+ - rubrics+ - createdAt+ - updatedAt+ - isSystem+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ description:+ anyOf:+ - type: string+ maxLength: 10000+ - type: "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ referenceUrl:+ anyOf:+ - type: string+ format: uri+ - type: "null"+ rubrics:+ default: []+ maxItems: 100+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ minLength: 1+ maxLength: 128+ name:+ type: string+ minLength: 1+ maxLength: 255+ type:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ weight:+ type: number+ minimum: 0+ threshold:+ type: number+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ config:+ anyOf:+ - type: object+ properties:+ value:+ type: string+ threshold:+ type: number+ required:+ - value+ additionalProperties: false+ - type: object+ properties:+ value:+ type: number+ tolerance:+ type: number+ required:+ - value+ - type: object+ properties:+ pattern:+ type: string+ required:+ - pattern+ - type: object+ properties:+ code:+ type: string+ required:+ - code+ - type: object+ properties:+ criteria:+ type: string+ model:+ type: string+ provider:+ type: string+ systemRole:+ type: string+ required:+ - criteria+ - type: object+ properties:+ values:+ type: array+ items:+ type: string+ caseSensitive:+ type: boolean+ required:+ - values+ additionalProperties: false+ - type: object+ properties:+ schema:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - schema+ additionalProperties: false+ - type: object+ properties:+ extractor:+ oneOf:+ - type: object+ properties:+ type:+ type: string+ const: regex+ pattern:+ type: string+ group:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - type+ - pattern+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: delimiter+ delimiter:+ type: string+ position:+ type: string+ enum:+ - first+ - last+ required:+ - type+ - delimiter+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: last-line+ trim:+ type: boolean+ required:+ - type+ additionalProperties: false+ - type: object+ properties:+ type:+ type: string+ const: choice-index+ labels:+ type: array+ items:+ type: string+ pattern:+ type: string+ required:+ - type+ additionalProperties: false+ innerMatcher:+ type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ required:+ - extractor+ additionalProperties: false+ required:+ - id+ - name+ - type+ - weight+ - config+ additionalProperties: false+ additionalProperties: false+ delete:+ operationId: deleteApiV1EvalBenchmarksById+ summary: deleteBenchmark+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ required:+ - id+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ /api/v1/eval/datasets:+ post:+ operationId: postApiV1EvalDatasets+ summary: createDataset+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "201":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ benchmarkId:+ type:+ - string+ - "null"+ description:+ type:+ - string+ - "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalMode:+ type:+ - string+ - "null"+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ sourceExperimentId:+ type:+ - string+ - "null"+ testCaseCount:+ type: integer+ minimum: -9007199254740991+ maximum: 9007199254740991+ required:+ - id+ - identifier+ - name+ - benchmarkId+ - description+ - metadata+ - evalConfig+ - evalMode+ - createdAt+ - updatedAt+ - sourceExperimentId+ - testCaseCount+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ id:+ type: string+ minLength: 1+ maxLength: 128+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ benchmarkId:+ anyOf:+ - type: string+ minLength: 1+ maxLength: 128+ - type: "null"+ description:+ anyOf:+ - type: string+ maxLength: 10000+ - type: "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalMode:+ anyOf:+ - type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ - type: "null"+ required:+ - identifier+ - name+ additionalProperties: false+ get:+ operationId: getApiV1EvalDatasets+ summary: listDatasets+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ datasets:+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ benchmarkId:+ type:+ - string+ - "null"+ description:+ type:+ - string+ - "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalMode:+ type:+ - string+ - "null"+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ sourceExperimentId:+ type:+ - string+ - "null"+ testCaseCount:+ type: integer+ minimum: -9007199254740991+ maximum: 9007199254740991+ required:+ - id+ - identifier+ - name+ - benchmarkId+ - description+ - metadata+ - evalConfig+ - evalMode+ - createdAt+ - updatedAt+ - sourceExperimentId+ - testCaseCount+ additionalProperties: false+ total:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - datasets+ - total+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: query+ name: limit+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: offset+ schema:+ type: integer+ minimum: 0+ maximum: 1000000+ - in: query+ name: page+ schema:+ type: integer+ minimum: 1+ maximum: 1000000+ - in: query+ name: pageSize+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: benchmarkId+ schema:+ type: string+ minLength: 1+ maxLength: 128+ /api/v1/eval/datasets/{id}:+ get:+ operationId: getApiV1EvalDatasetsById+ summary: getDataset+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ benchmarkId:+ type:+ - string+ - "null"+ description:+ type:+ - string+ - "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalMode:+ type:+ - string+ - "null"+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ sourceExperimentId:+ type:+ - string+ - "null"+ testCaseCount:+ type: integer+ minimum: -9007199254740991+ maximum: 9007199254740991+ required:+ - id+ - identifier+ - name+ - benchmarkId+ - description+ - metadata+ - evalConfig+ - evalMode+ - createdAt+ - updatedAt+ - sourceExperimentId+ - testCaseCount+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ patch:+ operationId: patchApiV1EvalDatasetsById+ summary: updateDataset+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ benchmarkId:+ type:+ - string+ - "null"+ description:+ type:+ - string+ - "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalMode:+ type:+ - string+ - "null"+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ sourceExperimentId:+ type:+ - string+ - "null"+ testCaseCount:+ type: integer+ minimum: -9007199254740991+ maximum: 9007199254740991+ required:+ - id+ - identifier+ - name+ - benchmarkId+ - description+ - metadata+ - evalConfig+ - evalMode+ - createdAt+ - updatedAt+ - sourceExperimentId+ - testCaseCount+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ identifier:+ type: string+ minLength: 1+ maxLength: 255+ name:+ type: string+ minLength: 1+ maxLength: 255+ benchmarkId:+ anyOf:+ - type: string+ minLength: 1+ maxLength: 128+ - type: "null"+ description:+ anyOf:+ - type: string+ maxLength: 10000+ - type: "null"+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ evalMode:+ anyOf:+ - type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ - type: "null"+ additionalProperties: false+ delete:+ operationId: deleteApiV1EvalDatasetsById+ summary: deleteDataset+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ required:+ - id+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ /api/v1/eval/datasets/{datasetId}/test-cases:+ post:+ operationId: postApiV1EvalDatasetsByDatasetIdTestCases+ summary: createTestCase+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "201":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ input:+ type: string+ expected:+ type: string+ category:+ type: string+ choices:+ type: array+ items:+ type: string+ environment:+ type: object+ properties:+ envPrompt:+ type: string+ toolForwarding:+ type: object+ propertyNames:+ type: string+ additionalProperties:+ type: object+ properties:+ endpoint:+ type: string+ format: uri+ timeoutMs:+ type: integer+ exclusiveMinimum: 0+ maximum: 9007199254740991+ required:+ - endpoint+ additionalProperties: false+ additionalProperties: false+ messages:+ maxItems: 1000+ type: array+ items:+ type: object+ properties:+ content:+ type: string+ role:+ type: string+ enum:+ - user+ - assistant+ - system+ - tool+ id:+ type: string+ minLength: 1+ maxLength: 128+ parentId:+ anyOf:+ - type: string+ minLength: 1+ maxLength: 128+ - type: "null"+ model:+ type: string+ provider:+ type: string+ createdAt:+ type:+ - string+ - number+ updatedAt:+ type:+ - string+ - number+ tools:+ type: array+ items:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ tool_call_id:+ type: string+ metadata:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ reasoning:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ plugin:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginState:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginError:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginIntervention:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ error:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ search:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - content+ - role+ additionalProperties: false+ caseId:+ type: string+ minLength: 1+ maxLength: 128+ sortOrder:+ type:+ - number+ - "null"+ evalMode:+ anyOf:+ - type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ datasetId:+ type: string+ content:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ required:+ - id+ - input+ - sortOrder+ - createdAt+ - updatedAt+ - datasetId+ - content+ - metadata+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: datasetId+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ id:+ type: string+ minLength: 1+ maxLength: 128+ input:+ type: string+ expected:+ type: string+ category:+ type: string+ choices:+ type: array+ items:+ type: string+ environment:+ type: object+ properties:+ envPrompt:+ type: string+ toolForwarding:+ type: object+ propertyNames:+ type: string+ additionalProperties:+ type: object+ properties:+ endpoint:+ type: string+ format: uri+ timeoutMs:+ type: integer+ exclusiveMinimum: 0+ maximum: 9007199254740991+ required:+ - endpoint+ additionalProperties: false+ additionalProperties: false+ messages:+ maxItems: 1000+ type: array+ items:+ type: object+ properties:+ content:+ type: string+ role:+ type: string+ enum:+ - user+ - assistant+ - system+ - tool+ id:+ type: string+ minLength: 1+ maxLength: 128+ parentId:+ anyOf:+ - type: string+ minLength: 1+ maxLength: 128+ - type: "null"+ model:+ type: string+ provider:+ type: string+ createdAt:+ type:+ - string+ - number+ updatedAt:+ type:+ - string+ - number+ tools:+ type: array+ items:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ tool_call_id:+ type: string+ metadata:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ reasoning:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ plugin:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginState:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginError:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginIntervention:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ error:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ search:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - content+ - role+ additionalProperties: false+ caseId:+ type: string+ minLength: 1+ maxLength: 128+ sortOrder:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ evalMode:+ anyOf:+ - type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ required:+ - input+ additionalProperties: false+ get:+ operationId: getApiV1EvalDatasetsByDatasetIdTestCases+ summary: listTestCases+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ testCases:+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ input:+ type: string+ expected:+ type: string+ category:+ type: string+ choices:+ type: array+ items:+ type: string+ environment:+ type: object+ properties:+ envPrompt:+ type: string+ toolForwarding:+ type: object+ propertyNames:+ type: string+ additionalProperties:+ type: object+ properties:+ endpoint:+ type: string+ format: uri+ timeoutMs:+ type: integer+ exclusiveMinimum: 0+ maximum: 9007199254740991+ required:+ - endpoint+ additionalProperties: false+ additionalProperties: false+ messages:+ maxItems: 1000+ type: array+ items:+ type: object+ properties:+ content:+ type: string+ role:+ type: string+ enum:+ - user+ - assistant+ - system+ - tool+ id:+ type: string+ minLength: 1+ maxLength: 128+ parentId:+ anyOf:+ - type: string+ minLength: 1+ maxLength: 128+ - type: "null"+ model:+ type: string+ provider:+ type: string+ createdAt:+ type:+ - string+ - number+ updatedAt:+ type:+ - string+ - number+ tools:+ type: array+ items:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ tool_call_id:+ type: string+ metadata:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ reasoning:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ plugin:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginState:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginError:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginIntervention:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ error:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ search:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - content+ - role+ additionalProperties: false+ caseId:+ type: string+ minLength: 1+ maxLength: 128+ sortOrder:+ type:+ - number+ - "null"+ evalMode:+ anyOf:+ - type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ datasetId:+ type: string+ content:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ required:+ - id+ - input+ - sortOrder+ - createdAt+ - updatedAt+ - datasetId+ - content+ - metadata+ additionalProperties: false+ total:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - testCases+ - total+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: datasetId+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ - in: query+ name: limit+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: offset+ schema:+ type: integer+ minimum: 0+ maximum: 1000000+ - in: query+ name: page+ schema:+ type: integer+ minimum: 1+ maximum: 1000000+ - in: query+ name: pageSize+ schema:+ type: integer+ minimum: 1+ maximum: 100+ /api/v1/eval/test-cases/{id}:+ get:+ operationId: getApiV1EvalTestCasesById+ summary: getTestCase+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ input:+ type: string+ expected:+ type: string+ category:+ type: string+ choices:+ type: array+ items:+ type: string+ environment:+ type: object+ properties:+ envPrompt:+ type: string+ toolForwarding:+ type: object+ propertyNames:+ type: string+ additionalProperties:+ type: object+ properties:+ endpoint:+ type: string+ format: uri+ timeoutMs:+ type: integer+ exclusiveMinimum: 0+ maximum: 9007199254740991+ required:+ - endpoint+ additionalProperties: false+ additionalProperties: false+ messages:+ maxItems: 1000+ type: array+ items:+ type: object+ properties:+ content:+ type: string+ role:+ type: string+ enum:+ - user+ - assistant+ - system+ - tool+ id:+ type: string+ minLength: 1+ maxLength: 128+ parentId:+ anyOf:+ - type: string+ minLength: 1+ maxLength: 128+ - type: "null"+ model:+ type: string+ provider:+ type: string+ createdAt:+ type:+ - string+ - number+ updatedAt:+ type:+ - string+ - number+ tools:+ type: array+ items:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ tool_call_id:+ type: string+ metadata:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ reasoning:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ plugin:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginState:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginError:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginIntervention:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ error:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ search:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - content+ - role+ additionalProperties: false+ caseId:+ type: string+ minLength: 1+ maxLength: 128+ sortOrder:+ type:+ - number+ - "null"+ evalMode:+ anyOf:+ - type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ datasetId:+ type: string+ content:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ required:+ - id+ - input+ - sortOrder+ - createdAt+ - updatedAt+ - datasetId+ - content+ - metadata+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ patch:+ operationId: patchApiV1EvalTestCasesById+ summary: updateTestCase+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ input:+ type: string+ expected:+ type: string+ category:+ type: string+ choices:+ type: array+ items:+ type: string+ environment:+ type: object+ properties:+ envPrompt:+ type: string+ toolForwarding:+ type: object+ propertyNames:+ type: string+ additionalProperties:+ type: object+ properties:+ endpoint:+ type: string+ format: uri+ timeoutMs:+ type: integer+ exclusiveMinimum: 0+ maximum: 9007199254740991+ required:+ - endpoint+ additionalProperties: false+ additionalProperties: false+ messages:+ maxItems: 1000+ type: array+ items:+ type: object+ properties:+ content:+ type: string+ role:+ type: string+ enum:+ - user+ - assistant+ - system+ - tool+ id:+ type: string+ minLength: 1+ maxLength: 128+ parentId:+ anyOf:+ - type: string+ minLength: 1+ maxLength: 128+ - type: "null"+ model:+ type: string+ provider:+ type: string+ createdAt:+ type:+ - string+ - number+ updatedAt:+ type:+ - string+ - number+ tools:+ type: array+ items:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ tool_call_id:+ type: string+ metadata:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ reasoning:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ plugin:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginState:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginError:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginIntervention:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ error:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ search:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - content+ - role+ additionalProperties: false+ caseId:+ type: string+ minLength: 1+ maxLength: 128+ sortOrder:+ type:+ - number+ - "null"+ evalMode:+ anyOf:+ - type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ datasetId:+ type: string+ content:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ metadata:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ required:+ - id+ - input+ - sortOrder+ - createdAt+ - updatedAt+ - datasetId+ - content+ - metadata+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ input:+ type: string+ expected:+ type: string+ category:+ type: string+ choices:+ type: array+ items:+ type: string+ environment:+ type: object+ properties:+ envPrompt:+ type: string+ toolForwarding:+ type: object+ propertyNames:+ type: string+ additionalProperties:+ type: object+ properties:+ endpoint:+ type: string+ format: uri+ timeoutMs:+ type: integer+ exclusiveMinimum: 0+ maximum: 9007199254740991+ required:+ - endpoint+ additionalProperties: false+ additionalProperties: false+ messages:+ maxItems: 1000+ type: array+ items:+ type: object+ properties:+ content:+ type: string+ role:+ type: string+ enum:+ - user+ - assistant+ - system+ - tool+ id:+ type: string+ minLength: 1+ maxLength: 128+ parentId:+ anyOf:+ - type: string+ minLength: 1+ maxLength: 128+ - type: "null"+ model:+ type: string+ provider:+ type: string+ createdAt:+ type:+ - string+ - number+ updatedAt:+ type:+ - string+ - number+ tools:+ type: array+ items:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ tool_call_id:+ type: string+ metadata:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ reasoning:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ plugin:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginState:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginError:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ pluginIntervention:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ error:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ search:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ required:+ - content+ - role+ additionalProperties: false+ caseId:+ type: string+ minLength: 1+ maxLength: 128+ sortOrder:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ evalMode:+ anyOf:+ - type: string+ enum:+ - equals+ - contains+ - regex+ - starts-with+ - ends-with+ - any-of+ - numeric+ - extract-match+ - json-schema+ - javascript+ - python+ - llm-rubric+ - factuality+ - answer-relevance+ - similar+ - levenshtein+ - rubric+ - external+ - type: "null"+ evalConfig:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ additionalProperties: false+ delete:+ operationId: deleteApiV1EvalTestCasesById+ summary: deleteTestCase+ description: "Creates accept an optional id: an identical replay returns the+ resource; conflicting id or identifier returns 409. Lists are+ paginated."+ tags:+ - eval+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ required:+ - id+ additionalProperties: false+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: id+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ /api/v1/eval/runs/{id}/claim:+ post:+ operationId: postApiV1EvalRunsByIdClaim+ summary: claim+ tags:+ - eval+ description: "Claim: one pending worker succeeds, others receive 409. Reports:+ identical replays succeed; different results conflict. Batches are+ atomic. External workers can supply testCaseId to associate their own+ topic with a dataset case on first report. Retry: only terminal runs,+ concurrent repeats conflict."+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ config:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ executionMode:+ type: string+ enum:+ - internal+ - external+ datasetId:+ type: string+ experimentId:+ type:+ - string+ - "null"+ parentRunId:+ type:+ - string+ - "null"+ status:+ type: string+ enum:+ - idle+ - pending+ - running+ - external+ - completed+ - failed+ - aborted+ targetAgentId:+ type:+ - string+ - "null"+ name:+ type:+ - string+ - "null"+ metrics:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ startedAt:+ anyOf:+ - type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ - type: "null"+ required:+ - id+ - createdAt+ - updatedAt+ - config+ - executionMode+ - datasetId+ - experimentId+ - parentRunId+ - status+ - targetAgentId+ - name+ - metrics+ - startedAt+ additionalProperties: falsemessage:type: stringsuccess:@@ -3534,11 +9790,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -3576,26 +9845,24 @@ paths:$ref: "#/components/schemas/ApiError"description: Internal server errorparameters:- - in: query- name: page- schema:- type: string- - in: query- name: pageSize- schema:- type: string- - in: query- name: benchmarkId+ - in: path+ name: idschema:type: stringminLength: 1maxLength: 128- /api/v1/eval/datasets/{id}:- get:- operationId: getApiV1EvalDatasetsById- summary: Get an eval dataset+ required: true+ /api/v1/eval/runs/{id}/status:+ patch:+ operationId: patchApiV1EvalRunsByIdStatus+ summary: setStatustags:- eval+ description: "Claim: one pending worker succeeds, others receive 409. Reports:+ identical replays succeed; different results conflict. Batches are+ atomic. External workers can supply testCaseId to associate their own+ topic with a dataset case on first report. Retry: only terminal runs,+ concurrent repeats conflict."responses:"200":content:@@ -3604,7 +9871,85 @@ paths:additionalProperties: falseproperties:data:- $ref: "#/components/schemas/EvalRun"+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ id:+ type: string+ createdAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ updatedAt:+ type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ config:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ executionMode:+ type: string+ enum:+ - internal+ - external+ datasetId:+ type: string+ experimentId:+ type:+ - string+ - "null"+ parentRunId:+ type:+ - string+ - "null"+ status:+ type: string+ enum:+ - idle+ - pending+ - running+ - external+ - completed+ - failed+ - aborted+ targetAgentId:+ type:+ - string+ - "null"+ name:+ type:+ - string+ - "null"+ metrics:+ anyOf:+ - type: object+ propertyNames:+ type: string+ additionalProperties: {}+ - type: "null"+ startedAt:+ anyOf:+ - type: string+ format: date-time+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$+ - type: "null"+ required:+ - id+ - createdAt+ - updatedAt+ - config+ - executionMode+ - datasetId+ - experimentId+ - parentRunId+ - status+ - targetAgentId+ - name+ - metrics+ - startedAt+ additionalProperties: falsemessage:type: stringsuccess:@@ -3619,11 +9964,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -3668,12 +10026,35 @@ paths:minLength: 1maxLength: 128required: true- /api/v1/eval/runs/{id}/topics:- get:- operationId: getApiV1EvalRunsByIdTopics- summary: List topic results of an eval run+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ status:+ type: string+ enum:+ - running+ - external+ - completed+ - failed+ - aborted+ required:+ - status+ additionalProperties: false+ /api/v1/eval/runs/{id}/retry-errors:+ post:+ operationId: postApiV1EvalRunsByIdRetryErrors+ summary: retryErrorstags:- eval+ description: "Claim: one pending worker succeeds, others receive 409. Reports:+ identical replays succeed; different results conflict. Batches are+ atomic. External workers can supply testCaseId to associate their own+ topic with a dataset case on first report. Retry: only terminal runs,+ concurrent repeats conflict."responses:"200":content:@@ -3682,7 +10063,17 @@ paths:additionalProperties: falseproperties:data:- $ref: "#/components/schemas/EvalRun"+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ runId:+ type: string+ retryCount:+ type: number+ required:+ - runId+ - retryCount+ additionalProperties: falsemessage:type: stringsuccess:@@ -3697,11 +10088,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -3746,25 +10150,17 @@ paths:minLength: 1maxLength: 128required: true- - in: query- name: page- schema:- type: string- - in: query- name: pageSize- schema:- type: string- /api/v1/eval/runs/{id}:- get:- operationId: getApiV1EvalRunsById- parameters:- - in: path- name: id- schema:- type: string- minLength: 1- maxLength: 128- required: true+ /api/v1/eval/runs/{runId}/topics/{topicId}/result:+ put:+ operationId: putApiV1EvalRunsByRunIdTopicsByTopicIdResult+ summary: report+ tags:+ - eval+ description: "Claim: one pending worker succeeds, others receive 409. Reports:+ identical replays succeed; different results conflict. Batches are+ atomic. External workers can supply testCaseId to associate their own+ topic with a dataset case on first report. Retry: only terminal runs,+ concurrent repeats conflict."responses:"200":content:@@ -3773,7 +10169,36 @@ paths:additionalProperties: falseproperties:data:- $ref: "#/components/schemas/EvalRun"+ $schema: https://json-schema.org/draft/2020-12/schema+ type: object+ properties:+ idempotent:+ type: boolean+ reportedThreads:+ type: number+ runId:+ type: string+ runStatus:+ type: string+ success:+ type: boolean+ threadId:+ type: string+ topicFinalized:+ type: boolean+ topicId:+ type: string+ totalThreads:+ type: number+ required:+ - idempotent+ - reportedThreads+ - runId+ - success+ - topicFinalized+ - topicId+ - totalThreads+ additionalProperties: falsemessage:type: stringsuccess:@@ -3788,11 +10213,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -3829,19 +10267,55 @@ paths:schema:$ref: "#/components/schemas/ApiError"description: Internal server error- tags:- - eval- /api/v1/eval/runs/{id}/results:- get:- operationId: getApiV1EvalRunsByIdResultsparameters:- in: path- name: id+ name: runId+ schema:+ type: string+ minLength: 1+ maxLength: 128+ required: true+ - in: path+ name: topicIdschema:type: stringminLength: 1maxLength: 128required: true+ requestBody:+ required: true+ content:+ application/json:+ schema:+ type: object+ properties:+ testCaseId:+ type: string+ minLength: 1+ maxLength: 128+ correct:+ type: boolean+ score:+ type: number+ result:+ type: object+ propertyNames:+ type: string+ additionalProperties: {}+ threadId:+ type: string+ minLength: 1+ maxLength: 128+ required:+ - correct+ - score+ additionalProperties: false+ /api/v1/plugins:+ get:+ operationId: getApiV1Plugins+ summary: List installed plugins in the current workspace or personal scope+ tags:+ - pluginsresponses:"200":content:@@ -3850,22 +10324,29 @@ paths:additionalProperties: falseproperties:data:- additionalProperties: false+ type: objectproperties:- results:- items:- $ref: "#/components/schemas/EvalRunResult"+ plugins:type: array- runId:- type: string+ items:+ type: object+ additionalProperties: false+ properties:+ identifier:+ type: string+ type:+ type: string+ createdAt:+ format: date-time+ type: string+ updatedAt:+ format: date-time+ type: stringtotal:- minimum: 0type: integerrequired:- - runId+ - plugins- total- - results- type: objectmessage:type: stringsuccess:@@ -3880,11 +10361,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -3921,8 +10415,31 @@ paths:schema:$ref: "#/components/schemas/ApiError"description: Internal server error- tags:- - eval+ parameters:+ - in: query+ name: limit+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: offset+ schema:+ type: integer+ minimum: 0+ maximum: 1000000+ - in: query+ name: page+ schema:+ type: integer+ minimum: 1+ maximum: 1000000+ - in: query+ name: pageSize+ schema:+ type: integer+ minimum: 1+ maximum: 100/api/v1/files:get:operationId: getApiV1Files@@ -3956,13 +10473,13 @@ paths:schema:type: stringformat: date-time- pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$- in: queryname: updatedAtStartschema:type: stringformat: date-time- pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$- in: queryname: userIdschema:@@ -4001,11 +10518,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -4186,11 +10716,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -4246,9 +10789,9 @@ paths:type: objectproperties:knowledgeBaseId:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"responses:"200":content:@@ -4272,11 +10815,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -4350,11 +10906,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -4406,9 +10975,9 @@ paths:- in: queryname: expiresInschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"responses:"200":content:@@ -4433,11 +11002,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -4489,9 +11071,9 @@ paths:- in: queryname: skipExistschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"responses:"200":content:@@ -4516,11 +11098,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -4604,11 +11199,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -4680,11 +11288,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -4946,11 +11567,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -5039,11 +11673,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -5126,11 +11773,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -5202,11 +11862,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -5294,11 +11967,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -5372,11 +12058,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -5440,9 +12139,9 @@ paths:- in: queryname: fileTypeschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"responses:"200":content:@@ -5467,11 +12166,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -5559,11 +12271,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -5652,11 +12377,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -5748,11 +12486,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -5891,11 +12642,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6043,11 +12807,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6190,11 +12967,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6269,11 +13059,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6356,11 +13159,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6425,13 +13241,13 @@ paths:from:type: stringmodel:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"provider:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"to:type: stringminLength: 1@@ -6461,11 +13277,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6537,11 +13366,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6598,14 +13440,14 @@ paths:properties:from:type: string- model:- anyOf:- - type: string- - type: "null"- provider:- anyOf:- - type: string- - type: "null"+ model:+ type:+ - string+ - "null"+ provider:+ type:+ - string+ - "null"to:type: stringminLength: 1@@ -6637,11 +13479,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6713,11 +13568,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6760,18 +13628,28 @@ paths:get:operationId: getApiV1MessagesCountparameters:+ - in: query+ name: topicId+ schema:+ type: string+ minLength: 1+ - in: query+ name: threadId+ schema:+ type: string+ minLength: 1- in: queryname: topicIdsschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"- in: queryname: userIdschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"responses:"200":content:@@ -6802,11 +13680,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6849,18 +13740,23 @@ paths:get:operationId: getApiV1Messagesparameters:+ - in: query+ name: threadId+ schema:+ type: string+ minLength: 1- in: queryname: topicIdschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"- in: queryname: userIdschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"- in: queryname: roleschema:@@ -6879,11 +13775,27 @@ paths:- in: queryname: pageschema:- type: string+ type: integer+ minimum: 1+ maximum: 1000000- in: queryname: pageSizeschema:- type: string+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: limit+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: offset+ schema:+ type: integer+ minimum: 0+ maximum: 1000000responses:"200":content:@@ -6918,11 +13830,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -6981,47 +13906,37 @@ paths:- assistant- toolmodel:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"provider:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"topicId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"threadId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"parentId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"quotaId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"agentId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"clientId:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"metadata:anyOf:- {}@@ -7039,17 +13954,13 @@ paths:- {}- type: "null"traceId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"observationId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"files:anyOf:- type: array@@ -7058,9 +13969,9 @@ paths:- type: "null"favorite:default: false- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"required:- content- role@@ -7087,11 +13998,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -7173,11 +14097,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -7249,11 +14186,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -7327,11 +14277,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -7387,47 +14350,37 @@ paths:type: stringconst: usermodel:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"provider:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"topicId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"threadId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"parentId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"quotaId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"agentId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"clientId:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"metadata:anyOf:- {}@@ -7445,17 +14398,13 @@ paths:- {}- type: "null"traceId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"observationId:- anyOf:- - anyOf:- - type: string- - type: "null"- - type: "null"+ type:+ - string+ - "null"files:anyOf:- type: array@@ -7464,9 +14413,9 @@ paths:- type: "null"favorite:default: false- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"required:- content- role@@ -7495,11 +14444,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -7557,9 +14519,9 @@ paths:- in: queryname: enabledschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"- in: queryname: providerschema:@@ -7618,11 +14580,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -7691,20 +14666,20 @@ paths:maximum: 9007199254740991- type: "null"description:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"displayName:type: stringminLength: 1enabled:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"organization:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"parameters:anyOf:- type: object@@ -7720,9 +14695,9 @@ paths:additionalProperties: {}- type: "null"releasedAt:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"sort:anyOf:- type: integer@@ -7786,11 +14761,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -7871,11 +14859,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -7959,20 +14960,20 @@ paths:maximum: 9007199254740991- type: "null"description:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"displayName:type: stringminLength: 1enabled:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"organization:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"parameters:anyOf:- type: object@@ -7988,9 +14989,9 @@ paths:additionalProperties: {}- type: "null"releasedAt:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"sort:anyOf:- type: integer@@ -8043,11 +15044,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -8093,9 +15107,9 @@ paths:- in: queryname: activeschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"- in: queryname: categoryschema:@@ -8149,11 +15163,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -8208,14 +15235,14 @@ paths:type: stringminLength: 1description:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"isActive:default: true- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"name:type: stringminLength: 1@@ -8246,11 +15273,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -8323,11 +15363,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -8390,14 +15443,14 @@ paths:type: stringminLength: 1description:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"isActive:default: true- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"name:type: stringminLength: 1@@ -8424,11 +15477,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -8503,11 +15569,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -8600,11 +15679,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -8653,24 +15745,24 @@ paths:type: objectproperties:checkModel:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"config:type: objectpropertyNames:type: stringadditionalProperties: {}description:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"enabled:type: booleanfetchOnClient:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"keyVaults:type: objectpropertyNames:@@ -8678,9 +15770,9 @@ paths:additionalProperties:type: stringlogo:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"name:anyOf:- type: string@@ -8730,11 +15822,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -8807,11 +15912,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -8868,24 +15986,24 @@ paths:type: objectproperties:checkModel:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"config:type: objectpropertyNames:type: stringadditionalProperties: {}description:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"enabled:type: booleanfetchOnClient:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"keyVaults:anyOf:- type: object@@ -8895,9 +16013,9 @@ paths:type: string- type: "null"logo:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"name:anyOf:- type: string@@ -8942,11 +16060,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -9021,11 +16152,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -9208,9 +16352,9 @@ paths:- output- typeinstructions:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"max_output_tokens:anyOf:- type: integer@@ -9228,13 +16372,13 @@ paths:model:type: stringparallel_tool_calls:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"previous_response_id:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"reasoning:anyOf:- type: object@@ -9247,9 +16391,9 @@ paths:- high- type: "null"stream:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"temperature:anyOf:- type: number@@ -9303,6 +16447,7 @@ paths:properties:type:type: string+ format: starts_withpattern: ^lobe-.*required:- type@@ -9325,9 +16470,9 @@ paths:- disabled- type: "null"user:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"required:- input- model@@ -9365,11 +16510,24 @@ paths:type: stringdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -9415,15 +16573,15 @@ paths:- in: queryname: activeschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"- in: queryname: systemschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"- in: queryname: keywordschema:@@ -9470,11 +16628,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -9523,22 +16694,22 @@ paths:type: objectproperties:description:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"displayName:type: stringminLength: 1isActive:default: true- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"isSystem:default: false- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"name:type: stringminLength: 1@@ -9568,11 +16739,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -9644,11 +16828,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -9704,22 +16901,22 @@ paths:type: objectproperties:description:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"displayName:type: stringminLength: 1isActive:default: true- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"isSystem:default: false- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"name:type: stringminLength: 1@@ -9746,11 +16943,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -9824,11 +17034,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -9913,11 +17136,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10010,11 +17246,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10088,11 +17337,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10138,9 +17400,9 @@ paths:- in: queryname: agentIdschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"- in: queryname: excludeTriggersschema:@@ -10150,9 +17412,9 @@ paths:- in: queryname: groupIdschema:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"- in: queryname: includeTriggersschema:@@ -10209,11 +17471,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10260,19 +17535,19 @@ paths:application/json:schema:type: object- properties:- agentId:- anyOf:- - type: string- - type: "null"+ properties:+ agentId:+ type:+ - string+ - "null"clientId:type: stringfavorite:type: booleangroupId:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"title:type: stringminLength: 1@@ -10301,11 +17576,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10377,11 +17665,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10477,11 +17778,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10555,11 +17869,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10598,6 +17925,156 @@ paths:description: Internal server errortags:- topics+ /api/v1/topics/{topicId}/threads:+ get:+ operationId: getApiV1TopicsByTopicIdThreads+ summary: List topic threads+ tags:+ - topics+ responses:+ "200":+ content:+ application/json:+ schema:+ additionalProperties: false+ properties:+ data:+ type: object+ properties:+ threads:+ type: array+ items:+ type: object+ additionalProperties: false+ properties:+ id:+ type: string+ topicId:+ type: string+ title:+ type:+ - string+ - "null"+ type:+ type: string+ status:+ type:+ - string+ - "null"+ parentThreadId:+ type:+ - string+ - "null"+ createdAt:+ format: date-time+ type: string+ updatedAt:+ format: date-time+ type: string+ total:+ type: integer+ required:+ - threads+ - total+ message:+ type: string+ success:+ const: true+ type: boolean+ timestamp:+ format: date-time+ type: string+ required:+ - success+ - timestamp+ type: object+ description: Successful response+ "400":+ description: Validation Error+ content:+ application/json:+ schema:+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data+ "401":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Authentication required+ "403":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Insufficient permission+ "404":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource not found+ "409":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Resource conflict+ "429":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Rate limit exceeded+ "500":+ content:+ application/json:+ schema:+ $ref: "#/components/schemas/ApiError"+ description: Internal server error+ parameters:+ - in: path+ name: topicId+ schema:+ type: string+ minLength: 1+ required: true+ - in: query+ name: limit+ schema:+ type: integer+ minimum: 1+ maximum: 100+ - in: query+ name: offset+ schema:+ type: integer+ minimum: 0+ maximum: 1000000+ - in: query+ name: page+ schema:+ type: integer+ minimum: 1+ maximum: 1000000+ - in: query+ name: pageSize+ schema:+ type: integer+ minimum: 1+ maximum: 100/api/v1/users/me:get:operationId: getApiV1UsersMe@@ -10726,11 +18203,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10779,35 +18269,35 @@ paths:type: objectproperties:avatar:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"email:anyOf:- type: stringformat: email- pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$+ pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$- type: "null"firstName:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"fullName:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"id:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"lastName:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"phone:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"roleIds:anyOf:- type: array@@ -10843,11 +18333,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10919,11 +18422,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -10979,35 +18495,35 @@ paths:type: objectproperties:avatar:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"email:anyOf:- type: stringformat: email- pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$+ pattern: ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$- type: "null"firstName:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"fullName:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"isOnboarded:- anyOf:- - type: boolean- - type: "null"+ type:+ - boolean+ - "null"lastName:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"phone:- anyOf:- - type: string- - type: "null"+ type:+ - string+ - "null"preference:anyOf:- {}@@ -11047,11 +18563,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -11125,11 +18654,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -11202,11 +18744,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -11271,7 +18826,7 @@ paths:anyOf:- type: stringformat: date-time- pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$+ pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$- type: "null"roleId:type: string@@ -11310,11 +18865,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:@@ -11388,11 +18956,24 @@ paths:type: objectdescription: Successful response"400":+ description: Validation Errorcontent:application/json:schema:- $ref: "#/components/schemas/ApiError"- description: Invalid request+ type: object+ properties:+ success:+ type: boolean+ enum:+ - false+ error:+ type: array+ items: {}+ data: {}+ required:+ - success+ - error+ - data"401":content:application/json:diff --git a/packages/openapi/src/controllers/agent.controller.ts b/packages/openapi/src/controllers/agent.controller.tsindex c899b3075e0..b0b07cd9c30 100644--- a/packages/openapi/src/controllers/agent.controller.ts+++ b/packages/openapi/src/controllers/agent.controller.ts@@ -14,6 +14,21 @@ import type {* Handles Agent-related HTTP requests and responses*/export class AgentController extends BaseController {+ async duplicateAgent(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const body = await this.getBody<{ title?: string }>(c);+ const service = new AgentService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.duplicateAgent(id, body.title), 'Agent duplicated', 201);+ } catch (error) {+ return this.handleError(c, error);+ }+ }+/*** Retrieves a list of all Agents in the system* GET /api/v1/agents/listdiff --git a/packages/openapi/src/controllers/eval-context.controller.ts b/packages/openapi/src/controllers/eval-context.controller.tsnew file mode 100644index 00000000000..c3506d4bdfa--- /dev/null+++ b/packages/openapi/src/controllers/eval-context.controller.ts@@ -0,0 +1,33 @@+import type { Context } from 'hono';++import { BaseController } from '../common/base.controller';+import { EvalContextService } from '../services/eval-context.service';+import type { EvalPagination } from '../types/eval-resource.type';++export class EvalContextController extends BaseController {+ async listThreads(c: Context) {+ try {+ const { topicId } = this.getParams<{ topicId: string }>(c);+ const service = new EvalContextService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.listThreads(topicId, this.getQuery<EvalPagination>(c)));+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async listPlugins(c: Context) {+ try {+ const service = new EvalContextService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.listPlugins(this.getQuery<EvalPagination>(c)));+ } catch (error) {+ return this.handleError(c, error);+ }+ }+}diff --git a/packages/openapi/src/controllers/eval-resource.controller.ts b/packages/openapi/src/controllers/eval-resource.controller.tsnew file mode 100644index 00000000000..56463108c50--- /dev/null+++ b/packages/openapi/src/controllers/eval-resource.controller.ts@@ -0,0 +1,249 @@+import type { Context } from 'hono';++import { BaseController } from '../common/base.controller';+import { EvalResourceService } from '../services/eval-resource.service';+import type {+ CreateBenchmark,+ CreateDataset,+ CreateTestCase,+ EvalPagination,+} from '../types/eval-resource.type';++export class EvalResourceController extends BaseController {+ async listBenchmarks(c: Context) {+ try {+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.listBenchmarks(this.getQuery<EvalPagination>(c)),+ 'Eval resource retrieved',+ 200,+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async getBenchmark(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.getBenchmark(id), 'Eval resource retrieved', 200);+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async createBenchmark(c: Context) {+ try {+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.createBenchmark((await this.getBody<CreateBenchmark>(c))!),+ 'Eval resource retrieved',+ 201,+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async updateBenchmark(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.updateBenchmark(id, (await this.getBody<Partial<CreateBenchmark>>(c))!),+ 'Eval resource retrieved',+ 200,+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async deleteBenchmark(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.deleteBenchmark(id), 'Eval resource retrieved', 200);+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async listDatasets(c: Context) {+ try {+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.listDatasets(this.getQuery<EvalPagination & { benchmarkId?: string }>(c)),+ 'Eval resource retrieved',+ 200,+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async getDataset(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.getDataset(id), 'Eval resource retrieved', 200);+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async createDataset(c: Context) {+ try {+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.createDataset((await this.getBody<CreateDataset>(c))!),+ 'Eval resource retrieved',+ 201,+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async updateDataset(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.updateDataset(id, (await this.getBody<Partial<CreateDataset>>(c))!),+ 'Eval resource retrieved',+ 200,+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async deleteDataset(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.deleteDataset(id), 'Eval resource retrieved', 200);+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async listTestCases(c: Context) {+ try {+ const { datasetId } = this.getParams<{ datasetId: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.listTestCases(datasetId, this.getQuery<EvalPagination>(c)),+ 'Eval resource retrieved',+ 200,+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async getTestCase(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.getTestCase(id), 'Eval resource retrieved', 200);+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async createTestCase(c: Context) {+ try {+ const { datasetId } = this.getParams<{ datasetId: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.createTestCase(datasetId, (await this.getBody<CreateTestCase>(c))!),+ 'Eval resource retrieved',+ 201,+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async updateTestCase(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.updateTestCase(id, (await this.getBody<Partial<CreateTestCase>>(c))!),+ 'Eval resource retrieved',+ 200,+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async deleteTestCase(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalResourceService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.deleteTestCase(id), 'Eval resource retrieved', 200);+ } catch (error) {+ return this.handleError(c, error);+ }+ }+}diff --git a/packages/openapi/src/controllers/eval.controller.ts b/packages/openapi/src/controllers/eval.controller.tsindex 7cf27150b6d..d583545c132 100644--- a/packages/openapi/src/controllers/eval.controller.ts+++ b/packages/openapi/src/controllers/eval.controller.ts@@ -1,12 +1,17 @@import type { Context } from 'hono';import { BaseController } from '../common/base.controller';+import { requireApiKeyScope } from '../middleware/permission-check';import { EvalService } from '../services/eval.service';+import { EvalLifecycleService } from '../services/eval-lifecycle.service';import type {CreateEvalRunRequest,+ EvalBatchReport,EvalDatasetListQuery,+ EvalReport,EvalRunListQuery,EvalRunTopicListQuery,+ EvalSetStatus,} from '../types/eval.type';export class EvalController extends BaseController {@@ -92,11 +97,86 @@ export class EvalController extends BaseController {const { id } = this.getParams<{ id: string }>(c);return this.success(c,- await (await this.getService(c)).getRunResults(id),+ await (await this.getService(c)).getRunResults(id, this.getQuery<EvalRunTopicListQuery>(c)),'Eval results retrieved',);} catch (error) {return this.handleError(c, error);}}+ async claim(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalLifecycleService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.claim(id));+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async setStatus(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalLifecycleService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(c, await service.setStatus(id, (await this.getBody<EvalSetStatus>(c))!));+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async retryErrors(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalLifecycleService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ if (await service.requiresInternalExecution(id)) {+ await requireApiKeyScope('model:invoke')(c, async () => {});+ await requireApiKeyScope('chat:write')(c, async () => {});+ }+ return this.success(c, await service.retryErrors(id));+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async report(c: Context) {+ try {+ const { runId, topicId } = this.getParams<{ runId: string; topicId: string }>(c);+ const service = new EvalLifecycleService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.report(runId, topicId, (await this.getBody<EvalReport>(c))!),+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }+ async reportBatch(c: Context) {+ try {+ const { id } = this.getParams<{ id: string }>(c);+ const service = new EvalLifecycleService(+ await this.getDatabase(),+ this.getUserId(c)!,+ this.getWorkspaceId(c),+ );+ return this.success(+ c,+ await service.reportBatch(id, (await this.getBody<EvalBatchReport>(c))!),+ );+ } catch (error) {+ return this.handleError(c, error);+ }+ }}diff --git a/packages/openapi/src/helpers/eval-run.ts b/packages/openapi/src/helpers/eval-run.tsnew file mode 100644index 00000000000..b6d51f93d1c--- /dev/null+++ b/packages/openapi/src/helpers/eval-run.ts@@ -0,0 +1,25 @@+import type { AgentEvalRunItem } from '@/database/schemas';++import type { EvalRunResponse } from '../types/eval.type';++export const projectRun = (run: AgentEvalRunItem): EvalRunResponse => ({+ config: {+ k: run.config?.k ?? 1,+ maxSteps: run.config?.maxSteps,+ timeout: run.config?.timeout,+ maxConcurrency: run.config?.maxConcurrency,+ caseSelection: run.config?.caseSelection,+ },+ executionMode: run.config?.executionMode ?? 'internal',+ experimentId: run.experimentId,+ parentRunId: run.parentRunId,+ createdAt: run.createdAt,+ datasetId: run.datasetId,+ id: run.id,+ metrics: run.metrics,+ name: run.name,+ startedAt: run.startedAt,+ status: run.status,+ targetAgentId: run.targetAgentId,+ updatedAt: run.updatedAt,+});diff --git a/packages/openapi/src/helpers/public-fields.test.ts b/packages/openapi/src/helpers/public-fields.test.tsindex 6924966fdd3..73b164ac810 100644--- a/packages/openapi/src/helpers/public-fields.test.ts+++ b/packages/openapi/src/helpers/public-fields.test.ts@@ -11,7 +11,7 @@ import {} from './public-fields';describe('public response field projections', () => {- it('keeps the Agent contract at the documented 13-field allowlist', () => {+ it('keeps the Agent contract at the documented allowlist including plugin modes', () => {const projected = projectPublicAgent({agencyConfig: null,avatar: null,@@ -32,7 +32,7 @@ describe('public response field projections', () => {workspaceId: 'workspace-1',} as unknown as AgentItem);- expect(Object.keys(projected).sort()).toEqual([...PUBLIC_AGENT_FIELDS].sort());+ expect(Object.keys(projected).sort()).toEqual([...PUBLIC_AGENT_FIELDS, 'plugins'].sort());expect(projected).not.toHaveProperty('clientId');expect(projected).not.toHaveProperty('marketIdentifier');expect(projected).not.toHaveProperty('userId');diff --git a/packages/openapi/src/helpers/public-fields.ts b/packages/openapi/src/helpers/public-fields.tsindex 782084f5b27..0b010ec5a51 100644--- a/packages/openapi/src/helpers/public-fields.ts+++ b/packages/openapi/src/helpers/public-fields.ts@@ -1,3 +1,5 @@+import { parsePluginEntry } from '@lobechat/types';+import type {AgentEvalDatasetItem,AgentEvalRunItem,@@ -276,7 +278,9 @@ export const PUBLIC_EVAL_RUN_TOPIC_FIELDS = ['topicId',] as const satisfies readonly (keyof AgentEvalRunTopicItem)[];-export type PublicAgent = Pick<AgentItem, (typeof PUBLIC_AGENT_FIELDS)[number]>;+export type PublicAgent = Pick<AgentItem, (typeof PUBLIC_AGENT_FIELDS)[number]> & {+ plugins: ReturnType<typeof parsePluginEntry>[];+};export type PublicUser = Pick<UserItem, (typeof PUBLIC_USER_FIELDS)[number]>;export type PublicProvider = Pick<AiProviderSelectItem, (typeof PUBLIC_PROVIDER_FIELDS)[number]>;export type PublicModel = Pick<AiModelSelectItem, (typeof PUBLIC_MODEL_FIELDS)[number]>;@@ -305,8 +309,10 @@ export type PublicEvalRunTopic = Pick<export type PublicRole = Pick<RoleItem, (typeof PUBLIC_ROLE_FIELDS)[number]>;export type PublicPermission = Pick<PermissionItem, (typeof PUBLIC_PERMISSION_FIELDS)[number]>;-export const projectPublicAgent = (value: AgentItem): PublicAgent =>- pickPublicFields(value, PUBLIC_AGENT_FIELDS);+export const projectPublicAgent = (value: AgentItem): PublicAgent => ({+ ...pickPublicFields(value, PUBLIC_AGENT_FIELDS),+ plugins: (value.plugins ?? []).map(parsePluginEntry),+});export const projectPublicUser = (value: UserItem): PublicUser =>pickPublicFields(value, PUBLIC_USER_FIELDS);diff --git a/packages/openapi/src/routes/agents.route.ts b/packages/openapi/src/routes/agents.route.tsindex 28b42248c33..a2bb6609099 100644--- a/packages/openapi/src/routes/agents.route.ts+++ b/packages/openapi/src/routes/agents.route.ts@@ -1,4 +1,5 @@import { Hono } from 'hono';+import { describeRoute } from 'hono-openapi';import { getAllScopePermissions, getScopePermissions } from '@/utils/rbac';@@ -10,6 +11,7 @@ import { PaginationQuerySchema } from '../types';import {AgentIdParamSchema,CreateAgentRequestSchema,+ DuplicateAgentSchema,UpdateAgentRequestSchema,} from '../types/agent.type';@@ -112,4 +114,14 @@ AgentRoutes.delete(},);+AgentRoutes.post(+ '/:id/duplicate',+ describeRoute({ summary: 'Duplicate agent', tags: ['agents'] }),+ requireAuth,+ requireAnyPermission(getAllScopePermissions('AGENT_FORK')),+ zValidator('param', AgentIdParamSchema),+ zValidator('json', DuplicateAgentSchema),+ async (c) => new AgentController().duplicateAgent(c),+);+export default AgentRoutes;diff --git a/packages/openapi/src/routes/eval.route.test.ts b/packages/openapi/src/routes/eval.route.test.tsindex efe4211bc0d..f0c71eb1540 100644--- a/packages/openapi/src/routes/eval.route.test.ts+++ b/packages/openapi/src/routes/eval.route.test.ts@@ -7,7 +7,11 @@ import type * as PermissionCheck from '../middleware/permission-check';// better-auth graph (via `requireAuth`) at import time; this test is only about// which gates the route itself declares.vi.mock('@/database/core/db-adaptor', () => ({ getServerDB: vi.fn() }));-vi.mock('@/database/models/rbac', () => ({ RbacModel: class {} }));+vi.mock('@/database/models/rbac', () => ({+ RbacModel: class {+ hasAnyPermission = async () => true;+ },+}));vi.mock('../middleware/auth', () => ({requireAuth: async (_c: any, next: any) => next(),}));@@ -57,7 +61,7 @@ describe('POST /eval/runs API-key scopes', () => {});it('accepts a key holding the full agent-run trio', async () => {- const res = await requestAs(['agent:write', 'chat:write', 'model:invoke']);+ const res = await requestAs(['eval:write', 'chat:write', 'model:invoke']);expect(res.status).toBe(200);});diff --git a/packages/openapi/src/routes/eval.route.ts b/packages/openapi/src/routes/eval.route.tsindex 309a4673504..2707c953df7 100644--- a/packages/openapi/src/routes/eval.route.ts+++ b/packages/openapi/src/routes/eval.route.ts@@ -5,20 +5,44 @@ import { getAllScopePermissions } from '@/utils/rbac';import { zValidator } from '../common/validator';import { EvalController } from '../controllers/eval.controller';+import { EvalResourceController } from '../controllers/eval-resource.controller';import { requireAuth } from '../middleware/auth';-import { requireAnyPermission, requireApiKeyScope } from '../middleware/permission-check';+import {+ requireAnyPermissionWithApiKeyScope,+ requireApiKeyScope,+} from '../middleware/permission-check';import {CreateEvalRunRequestSchema,- EvalDatasetIdParamSchema,- EvalDatasetListQuerySchema,+ EvalBatchReportSchema,+ EvalReportSchema,EvalRunIdParamSchema,EvalRunListQuerySchema,EvalRunTopicListQuerySchema,+ EvalRunTopicPathSchema,+ EvalSetStatusSchema,} from '../types/eval.type';+import {+ CreateBenchmarkSchema,+ CreateDatasetSchema,+ CreateTestCaseSchema,+ EvalDatasetPathSchema,+ EvalPaginationSchema,+ EvalResourceIdSchema,+ ListDatasetsSchema,+ UpdateBenchmarkSchema,+ UpdateDatasetSchema,+ UpdateTestCaseSchema,+} from '../types/eval-resource.type';const app = new Hono();-const requireRead = requireAnyPermission(getAllScopePermissions('AGENT_READ'));-const requireWrite = requireAnyPermission(getAllScopePermissions('AGENT_UPDATE'));+const requireRead = requireAnyPermissionWithApiKeyScope(+ getAllScopePermissions('AGENT_READ'),+ 'eval:read',+);+const requireWrite = requireAnyPermissionWithApiKeyScope(+ getAllScopePermissions('AGENT_UPDATE'),+ 'eval:write',+);app.post('/runs',@@ -29,12 +53,13 @@ app.post(}),requireAuth,requireWrite,- requireApiKeyScope('model:invoke'),- // An internal run pre-creates real chat topics through `TopicModel`, and the- // QStash workflow keeps writing topic/message state, so a restricted key needs- // the same `chat:write` gate as `/responses` and the tRPC agent-run entries.- requireApiKeyScope('chat:write'),zValidator('json', CreateEvalRunRequestSchema),+ async (c, next) => {+ if (c.req.valid('json').executionMode === 'external') return next();+ return requireApiKeyScope('model:invoke')(c, async () => {+ await requireApiKeyScope('chat:write')(c, next);+ });+ },async (c) => new EvalController().createRun(c),);@@ -48,47 +73,318 @@ app.get();app.get(- '/datasets',- describeRoute({ summary: 'List eval datasets', tags: ['eval'] }),+ '/runs/:id/topics',+ describeRoute({ summary: 'List topic results of an eval run', tags: ['eval'] }),requireAuth,requireRead,- zValidator('query', EvalDatasetListQuerySchema),- async (c) => new EvalController().listDatasets(c),+ zValidator('param', EvalRunIdParamSchema),+ zValidator('query', EvalRunTopicListQuerySchema),+ async (c) => new EvalController().getRunTopics(c),);app.get(- '/datasets/:id',- describeRoute({ summary: 'Get an eval dataset', tags: ['eval'] }),+ '/runs/:id',requireAuth,requireRead,- zValidator('param', EvalDatasetIdParamSchema),- async (c) => new EvalController().getDataset(c),+ zValidator('param', EvalRunIdParamSchema),+ async (c) => new EvalController().getRun(c),);app.get(- '/runs/:id/topics',- describeRoute({ summary: 'List topic results of an eval run', tags: ['eval'] }),+ '/runs/:id/results',requireAuth,requireRead,zValidator('param', EvalRunIdParamSchema),zValidator('query', EvalRunTopicListQuerySchema),- async (c) => new EvalController().getRunTopics(c),+ async (c) => new EvalController().getRunResults(c),+);++app.post(+ '/benchmarks',+ describeRoute({+ summary: 'createBenchmark',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireWrite,+ zValidator('json', CreateBenchmarkSchema),+ async (c) => new EvalResourceController().createBenchmark(c),);app.get(- '/runs/:id',+ '/benchmarks',+ describeRoute({+ summary: 'listBenchmarks',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),requireAuth,requireRead,- zValidator('param', EvalRunIdParamSchema),- async (c) => new EvalController().getRun(c),+ zValidator('query', EvalPaginationSchema),+ async (c) => new EvalResourceController().listBenchmarks(c),);app.get(- '/runs/:id/results',+ '/benchmarks/:id',+ describeRoute({+ summary: 'getBenchmark',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireRead,+ zValidator('param', EvalResourceIdSchema),+ async (c) => new EvalResourceController().getBenchmark(c),+);++app.patch(+ '/benchmarks/:id',+ describeRoute({+ summary: 'updateBenchmark',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalResourceIdSchema),+ zValidator('json', UpdateBenchmarkSchema),+ async (c) => new EvalResourceController().updateBenchmark(c),+);++app.delete(+ '/benchmarks/:id',+ describeRoute({+ summary: 'deleteBenchmark',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalResourceIdSchema),+ async (c) => new EvalResourceController().deleteBenchmark(c),+);++app.post(+ '/datasets',+ describeRoute({+ summary: 'createDataset',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireWrite,+ zValidator('json', CreateDatasetSchema),+ async (c) => new EvalResourceController().createDataset(c),+);++app.get(+ '/datasets',+ describeRoute({+ summary: 'listDatasets',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireRead,+ zValidator('query', ListDatasetsSchema),+ async (c) => new EvalResourceController().listDatasets(c),+);++app.get(+ '/datasets/:id',+ describeRoute({+ summary: 'getDataset',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),requireAuth,requireRead,+ zValidator('param', EvalResourceIdSchema),+ async (c) => new EvalResourceController().getDataset(c),+);++app.patch(+ '/datasets/:id',+ describeRoute({+ summary: 'updateDataset',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalResourceIdSchema),+ zValidator('json', UpdateDatasetSchema),+ async (c) => new EvalResourceController().updateDataset(c),+);++app.delete(+ '/datasets/:id',+ describeRoute({+ summary: 'deleteDataset',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalResourceIdSchema),+ async (c) => new EvalResourceController().deleteDataset(c),+);++app.post(+ '/datasets/:datasetId/test-cases',+ describeRoute({+ summary: 'createTestCase',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalDatasetPathSchema),+ zValidator('json', CreateTestCaseSchema),+ async (c) => new EvalResourceController().createTestCase(c),+);++app.get(+ '/datasets/:datasetId/test-cases',+ describeRoute({+ summary: 'listTestCases',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireRead,+ zValidator('param', EvalDatasetPathSchema),+ zValidator('query', EvalPaginationSchema),+ async (c) => new EvalResourceController().listTestCases(c),+);++app.get(+ '/test-cases/:id',+ describeRoute({+ summary: 'getTestCase',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireRead,+ zValidator('param', EvalResourceIdSchema),+ async (c) => new EvalResourceController().getTestCase(c),+);++app.patch(+ '/test-cases/:id',+ describeRoute({+ summary: 'updateTestCase',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalResourceIdSchema),+ zValidator('json', UpdateTestCaseSchema),+ async (c) => new EvalResourceController().updateTestCase(c),+);++app.delete(+ '/test-cases/:id',+ describeRoute({+ summary: 'deleteTestCase',+ description:+ 'Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.',+ tags: ['eval'],+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalResourceIdSchema),+ async (c) => new EvalResourceController().deleteTestCase(c),+);++app.post(+ '/runs/:id/claim',+ describeRoute({+ summary: 'claim',+ tags: ['eval'],+ description:+ 'Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.',+ }),+ requireAuth,+ requireWrite,zValidator('param', EvalRunIdParamSchema),- async (c) => new EvalController().getRunResults(c),+ async (c) => new EvalController().claim(c),+);++app.patch(+ '/runs/:id/status',+ describeRoute({+ summary: 'setStatus',+ tags: ['eval'],+ description:+ 'Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.',+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalRunIdParamSchema),+ zValidator('json', EvalSetStatusSchema),+ async (c) => new EvalController().setStatus(c),+);++app.post(+ '/runs/:id/retry-errors',+ describeRoute({+ summary: 'retryErrors',+ tags: ['eval'],+ description:+ 'Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.',+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalRunIdParamSchema),+ async (c) => new EvalController().retryErrors(c),+);++app.put(+ '/runs/:runId/topics/:topicId/result',+ describeRoute({+ summary: 'report',+ tags: ['eval'],+ description:+ 'Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.',+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalRunTopicPathSchema),+ zValidator('json', EvalReportSchema),+ async (c) => new EvalController().report(c),+);++app.post(+ '/runs/:id/results',+ describeRoute({+ summary: 'reportBatch',+ tags: ['eval'],+ description:+ 'Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.',+ }),+ requireAuth,+ requireWrite,+ zValidator('param', EvalRunIdParamSchema),+ zValidator('json', EvalBatchReportSchema),+ async (c) => new EvalController().reportBatch(c),);export default app;diff --git a/packages/openapi/src/routes/index.ts b/packages/openapi/src/routes/index.tsindex 81b0ef3daf0..92386d51ec4 100644--- a/packages/openapi/src/routes/index.ts+++ b/packages/openapi/src/routes/index.ts@@ -12,6 +12,7 @@ import MessagesRoutes from './messages.route';import ModelsRoutes from './models.route';import OpenAIRoutes from './openai.route';import PermissionsRoutes from './permissions.route';+import { PluginsRoutes } from './plugins.route';import ProvidersRoutes from './providers.route';import ResponsesRoutes from './responses.route';import RolesRoutes from './roles.route';@@ -26,6 +27,7 @@ export default {'api-keys': ApiKeysRoutes,'chat': ChatRoutes,'eval': EvalRoutes,+ 'plugins': PluginsRoutes,'files': FileRoutes,'knowledge-bases': KnowledgeBasesRoutes,'mcp-servers': McpServersRoutes,diff --git a/packages/openapi/src/routes/plugins.route.ts b/packages/openapi/src/routes/plugins.route.tsnew file mode 100644index 00000000000..ab00c13b7e1--- /dev/null+++ b/packages/openapi/src/routes/plugins.route.ts@@ -0,0 +1,23 @@+import { Hono } from 'hono';+import { describeRoute } from 'hono-openapi';++import { getAllScopePermissions } from '@/utils/rbac';++import { zValidator } from '../common/validator';+import { EvalContextController } from '../controllers/eval-context.controller';+import { requireAuth } from '../middleware/auth';+import { requireAnyPermission } from '../middleware/permission-check';+import { EvalPaginationSchema } from '../types/eval-resource.type';++export const PluginsRoutes = new Hono();+PluginsRoutes.get(+ '/',+ describeRoute({+ summary: 'List installed plugins in the current workspace or personal scope',+ tags: ['plugins'],+ }),+ requireAuth,+ requireAnyPermission(getAllScopePermissions('AGENT_READ')),+ zValidator('query', EvalPaginationSchema),+ async (c) => new EvalContextController().listPlugins(c),+);diff --git a/packages/openapi/src/routes/topics.route.ts b/packages/openapi/src/routes/topics.route.tsindex 2bebc9ea947..0bf515676ed 100644--- a/packages/openapi/src/routes/topics.route.ts+++ b/packages/openapi/src/routes/topics.route.ts@@ -1,11 +1,15 @@import { Hono } from 'hono';+import { describeRoute } from 'hono-openapi';+import { z } from 'zod';import { getAllScopePermissions } from '@/utils/rbac';import { zValidator } from '../common/validator';import { TopicController } from '../controllers';+import { EvalContextController } from '../controllers/eval-context.controller';import { requireAuth } from '../middleware';import { requireAnyPermission } from '../middleware/permission-check';+import { EvalPaginationSchema } from '../types/eval-resource.type';import {TopicCreateRequestSchema,TopicDeleteParamSchema,@@ -94,4 +98,14 @@ TopicsRoutes.delete(},);+TopicsRoutes.get(+ '/:topicId/threads',+ describeRoute({ summary: 'List topic threads', tags: ['topics'] }),+ requireAuth,+ requireAnyPermission(getAllScopePermissions('MESSAGE_READ')),+ zValidator('param', z.object({ topicId: z.string().min(1) })),+ zValidator('query', EvalPaginationSchema),+ async (c) => new EvalContextController().listThreads(c),+);+export default TopicsRoutes;diff --git a/packages/openapi/src/services/agent.service.ts b/packages/openapi/src/services/agent.service.tsindex db2fd9461f2..5a98d89d1ee 100644--- a/packages/openapi/src/services/agent.service.ts+++ b/packages/openapi/src/services/agent.service.ts@@ -34,6 +34,18 @@ export class AgentService extends BaseService {super(db, userId, workspaceId);}+ async duplicateAgent(id: string, title?: string) {+ const permission = await this.resolveOperationPermission('AGENT_FORK', { targetAgentId: id });+ if (!permission.isPermitted)+ throw this.createAuthorizationError('No permission to duplicate agent');+ const result = await new AgentModel(this.db, this.userId, this.workspaceId).duplicate(+ id,+ title,+ );+ if (!result) throw this.createNotFoundError('Agent not found');+ return this.getAgentById(result.agentId);+ }+/*** Get the user's Agent list* @param page Page number, starting from 1@@ -98,6 +110,8 @@ export class AgentService extends BaseService {id: idGenerator('agents'),model: request.model || null,params: request.params ?? {},+ // JSONB accepts mixed plugin entries; the legacy DB column remains string[].+ plugins: request.plugins as unknown as string[] | undefined,provider: request.provider || null,slug: randomSlug(4), // Auto-generated slugsystemRole: request.systemRole || null,@@ -198,6 +212,8 @@ export class AgentService extends BaseService {: mergeJsonPatch(existingAgent.chatConfig, request.chatConfig);}if (request.description !== undefined) updateData.description = request.description ?? null;+ if (request.plugins !== undefined)+ updateData.plugins = request.plugins as unknown as string[];if (request.model !== undefined) updateData.model = request.model ?? null;if (request.provider !== undefined) updateData.provider = request.provider ?? null;if (request.systemRole !== undefined) updateData.systemRole = request.systemRole ?? null;diff --git a/packages/openapi/src/services/eval-context.service.ts b/packages/openapi/src/services/eval-context.service.tsnew file mode 100644index 00000000000..31fe7bbd04e--- /dev/null+++ b/packages/openapi/src/services/eval-context.service.ts@@ -0,0 +1,73 @@+import { and, asc, count, eq, isNull } from 'drizzle-orm';++import { threads, topics, userInstalledPlugins } from '@/database/schemas';++import { BaseService } from '../common/base.service';+import type { EvalPagination } from '../types/eval-resource.type';+import { evalPagination } from '../types/eval-resource.type';++export class EvalContextService extends BaseService {+ async listThreads(topicId: string, query: EvalPagination) {+ const [topic] = await this.db+ .select({ id: topics.id })+ .from(topics)+ .where(+ and(eq(topics.id, topicId), this.buildWorkspaceWhere(topics), isNull(topics.deletedAt)),+ )+ .limit(1);+ if (!topic) throw this.createNotFoundError('Topic not found');+ const permission = await this.resolveOperationPermission('MESSAGE_READ', {+ targetTopicId: topicId,+ });+ if (!permission.isPermitted)+ throw this.createAuthorizationError('No permission to read topic threads');+ const where = and(+ eq(threads.topicId, topicId),+ this.buildWorkspaceWhere(threads),+ isNull(threads.deletedAt),+ );+ const { limit, offset } = evalPagination(query);+ const [rows, totals] = await Promise.all([+ this.db+ .select({+ id: threads.id,+ topicId: threads.topicId,+ title: threads.title,+ type: threads.type,+ status: threads.status,+ parentThreadId: threads.parentThreadId,+ createdAt: threads.createdAt,+ updatedAt: threads.updatedAt,+ })+ .from(threads)+ .where(where)+ .orderBy(asc(threads.createdAt), asc(threads.id))+ .limit(limit)+ .offset(offset),+ this.db.select({ total: count() }).from(threads).where(where),+ ]);+ return { threads: rows, total: totals[0].total };+ }+ async listPlugins(query: EvalPagination) {+ const where = this.buildWorkspaceWhere(userInstalledPlugins);+ const { limit, offset } = evalPagination(query);+ const [rows, totals] = await Promise.all([+ this.db+ .select({+ identifier: userInstalledPlugins.identifier,+ type: userInstalledPlugins.type,+ createdAt: userInstalledPlugins.createdAt,+ updatedAt: userInstalledPlugins.updatedAt,+ })+ .from(userInstalledPlugins)+ .where(where)+ .orderBy(asc(userInstalledPlugins.identifier), asc(userInstalledPlugins.createdAt))+ .limit(limit)+ .offset(offset),+ this.db.select({ total: count() }).from(userInstalledPlugins).where(where),+ ]);+ // Credentials, settings, custom connection parameters and manifests are not+ // public capability metadata. Only the actual installed inventory is exposed.+ return { plugins: rows, total: totals[0].total };+ }+}diff --git a/packages/openapi/src/services/eval-lifecycle.service.test.ts b/packages/openapi/src/services/eval-lifecycle.service.test.tsnew file mode 100644index 00000000000..06ae03063c4--- /dev/null+++ b/packages/openapi/src/services/eval-lifecycle.service.test.ts@@ -0,0 +1,221 @@+import { beforeAll, describe, expect, it, vi } from 'vitest';++import { getTestDB } from '@/database/core/getTestDB';+import {+ agentEvalBenchmarks,+ agentEvalDatasets,+ agentEvalRuns,+ agentEvalRunTopics,+ agentEvalTestCases,+ topics,+ users,+} from '@/database/schemas';++import { EvalLifecycleService } from './eval-lifecycle.service';++vi.mock('@/server/workflows/agentEvalRun', () => ({+ AgentEvalRunWorkflow: { triggerRunBenchmark: vi.fn() },+}));+const db = await getTestDB();+const owner = new EvalLifecycleService(db, 'lifecycle-owner');+const foreign = new EvalLifecycleService(db, 'lifecycle-foreign');+beforeAll(async () => {+ await db.insert(users).values([{ id: 'lifecycle-owner' }, { id: 'lifecycle-foreign' }]);+ await db.insert(agentEvalBenchmarks).values({+ id: 'lifecycle-benchmark',+ identifier: 'lifecycle-benchmark',+ name: 'Lifecycle',+ rubrics: [],+ isSystem: false,+ userId: 'lifecycle-owner',+ });+ await db.insert(agentEvalDatasets).values({+ id: 'lifecycle-dataset',+ benchmarkId: 'lifecycle-benchmark',+ identifier: 'lifecycle-dataset',+ name: 'Lifecycle',+ userId: 'lifecycle-owner',+ });+ await db.insert(agentEvalTestCases).values({+ id: 'lifecycle-case',+ datasetId: 'lifecycle-dataset',+ content: { input: 'x' },+ userId: 'lifecycle-owner',+ });+});+const seedRun = async (id: string, status: 'pending' | 'running' = 'pending') => {+ await db.insert(agentEvalRuns).values({+ id,+ datasetId: 'lifecycle-dataset',+ userId: 'lifecycle-owner',+ config: { executionMode: 'external', k: 1 },+ status,+ });+};+describe('external run lifecycle', () => {+ it('reports shared dataset cases and counts the whole readable dataset', async () => {+ await db.insert(agentEvalDatasets).values({+ id: 'shared-lifecycle-dataset',+ identifier: 'shared-lifecycle-dataset',+ name: 'Shared cases',+ });+ await db.insert(agentEvalTestCases).values(+ ['shared-case-1', 'shared-case-2'].map((id) => ({+ id,+ datasetId: 'shared-lifecycle-dataset',+ content: { input: id },+ userId: 'lifecycle-foreign',+ })),+ );+ await db.insert(agentEvalRuns).values({+ id: 'shared-case-run',+ datasetId: 'shared-lifecycle-dataset',+ userId: 'lifecycle-owner',+ config: { executionMode: 'external', k: 1 },+ status: 'pending',+ });+ await db+ .insert(topics)+ .values(+ ['shared-topic-1', 'shared-topic-2'].map((id) => ({ id, userId: 'lifecycle-owner' })),+ );+ await owner.claim('shared-case-run');+ await expect(+ owner.report('shared-case-run', 'shared-topic-1', {+ testCaseId: 'lifecycle-case',+ score: 1,+ correct: true,+ }),+ ).rejects.toMatchObject({ name: 'NotFoundError' });+ expect(+ await owner.report('shared-case-run', 'shared-topic-1', {+ testCaseId: 'shared-case-1',+ score: 1,+ correct: true,+ }),+ ).toMatchObject({ runStatus: 'running' });+ const first = (await db.select().from(agentEvalRuns)).find(+ (run) => run.id === 'shared-case-run',+ );+ expect(first?.metrics).toMatchObject({ totalCases: 2, completedCases: 1, passRate: 0.5 });+ await expect(owner.setStatus('shared-case-run', { status: 'completed' })).rejects.toMatchObject(+ {+ name: 'ConflictError',+ },+ );+ expect(+ await owner.report('shared-case-run', 'shared-topic-2', {+ testCaseId: 'shared-case-2',+ score: 1,+ correct: true,+ }),+ ).toMatchObject({ runStatus: 'completed' });+ });+ it('allows exactly one worker to claim, isolates ownership and rejects internal claims', async () => {+ await seedRun('claim-run');+ await expect(foreign.claim('claim-run')).rejects.toMatchObject({ name: 'NotFoundError' });+ const outcomes = await Promise.allSettled(+ Array.from({ length: 8 }, () => owner.claim('claim-run')),+ );+ expect(outcomes.filter((r) => r.status === 'fulfilled')).toHaveLength(1);+ for (const r of outcomes)+ if (r.status === 'rejected') expect(r.reason.name).toBe('ConflictError');+ await db.insert(agentEvalRuns).values({+ id: 'internal-run',+ datasetId: 'lifecycle-dataset',+ userId: 'lifecycle-owner',+ config: { executionMode: 'internal' },+ status: 'pending',+ });+ await expect(owner.claim('internal-run')).rejects.toMatchObject({ name: 'ConflictError' });+ });+ it('rejects unclaimed completion and preserves terminal state on repeated status updates', async () => {+ await seedRun('status-run');+ await expect(owner.setStatus('status-run', { status: 'completed' })).rejects.toMatchObject({+ name: 'ConflictError',+ });+ await owner.claim('status-run');+ await expect(owner.setStatus('status-run', { status: 'completed' })).rejects.toMatchObject({+ name: 'ConflictError',+ });+ expect(await owner.setStatus('status-run', { status: 'aborted' })).toMatchObject({+ status: 'aborted',+ });+ expect(await owner.setStatus('status-run', { status: 'aborted' })).toMatchObject({+ status: 'aborted',+ });+ await expect(owner.setStatus('status-run', { status: 'running' })).rejects.toMatchObject({+ name: 'ConflictError',+ });+ });+ it('rolls back failed batches and enforces idempotent result identity', async () => {+ await seedRun('report-run', 'running');+ await db.insert(topics).values({ id: 'report-topic', userId: 'lifecycle-owner' });+ await db.insert(agentEvalRunTopics).values({+ runId: 'report-run',+ topicId: 'report-topic',+ testCaseId: 'lifecycle-case',+ userId: 'lifecycle-owner',+ status: 'external',+ });+ const result = { topicId: 'report-topic', score: 1, correct: true, result: { answer: 'ok' } };+ await expect(+ owner.reportBatch('report-run', { items: [result, { ...result, topicId: 'foreign-topic' }] }),+ ).rejects.toMatchObject({ name: 'NotFoundError' });+ const row = await db.select().from(agentEvalRunTopics);+ expect(row.find((r) => r.runId === 'report-run')?.score).toBeNull();+ expect(await owner.reportBatch('report-run', { items: [result] })).toMatchObject({+ items: [{ idempotent: false }],+ runStatus: 'completed',+ });+ expect(await owner.reportBatch('report-run', { items: [result] })).toMatchObject({+ items: [{ idempotent: true }],+ });+ await expect(+ owner.reportBatch('report-run', { items: [{ ...result, score: 0 }] }),+ ).rejects.toMatchObject({ name: 'ConflictError' });+ await expect(foreign.reportBatch('report-run', { items: [result] })).rejects.toMatchObject({+ name: 'NotFoundError',+ });+ });+ it('lets an external worker attach its own public topic to a dataset case when reporting', async () => {+ await seedRun('worker-run', 'running');+ await db.insert(topics).values({ id: 'worker-topic', userId: 'lifecycle-owner' });+ const report = {+ topicId: 'worker-topic',+ testCaseId: 'lifecycle-case',+ score: 1,+ correct: true,+ };+ expect(await owner.reportBatch('worker-run', { items: [report] })).toMatchObject({+ runStatus: 'completed',+ });+ expect(await owner.reportBatch('worker-run', { items: [report] })).toMatchObject({+ items: [{ idempotent: true }],+ });+ });+ it('replays failed results without changing aggregates or reopening the run', async () => {+ await seedRun('error-run', 'running');+ await db.insert(topics).values({ id: 'error-topic', userId: 'lifecycle-owner' });+ const report = {+ topicId: 'error-topic',+ testCaseId: 'lifecycle-case',+ score: 0,+ correct: false,+ result: { error: 'Worker failed' },+ };+ expect(await owner.reportBatch('error-run', { items: [report] })).toMatchObject({+ runStatus: 'failed',+ });+ const before = (await db.select().from(agentEvalRuns)).find((run) => run.id === 'error-run');+ expect(await owner.reportBatch('error-run', { items: [report] })).toMatchObject({+ runStatus: 'failed',+ items: [{ idempotent: true }],+ });+ const after = (await db.select().from(agentEvalRuns)).find((run) => run.id === 'error-run');+ expect(after).toEqual(before);+ await expect(+ owner.reportBatch('error-run', { items: [{ ...report, score: 1 }] }),+ ).rejects.toMatchObject({ name: 'ConflictError' });+ });+});diff --git a/packages/openapi/src/services/eval-lifecycle.service.ts b/packages/openapi/src/services/eval-lifecycle.service.tsnew file mode 100644index 00000000000..d1e52d3bba9--- /dev/null+++ b/packages/openapi/src/services/eval-lifecycle.service.ts@@ -0,0 +1,250 @@+import { TRPCError } from '@trpc/server';+import { and, eq, inArray, isNull } from 'drizzle-orm';+import isEqual from 'fast-deep-equal';++import { AgentEvalRunModel, AgentEvalRunTopicModel } from '@/database/models/agentEval';+import { ThreadModel } from '@/database/models/thread';+import { agentEvalRuns, agentEvalRunTopics, threads, topics } from '@/database/schemas';+import type { LobeChatDatabase } from '@/database/type';+import { evaluateAndFinalizeRun } from '@/server/services/agentEvalRun/aggregate';+import {+ applyReportResult,+ recomputeRunAggregation,+} from '@/server/services/agentEvalRun/reportResults';+import { AgentEvalRunWorkflow } from '@/server/workflows/agentEvalRun';++import { BaseService } from '../common/base.service';+import { projectRun } from '../helpers/eval-run';+import type { EvalBatchReport, EvalReport, EvalSetStatus } from '../types/eval.type';+import { EvalResourceService } from './eval-resource.service';++export class EvalLifecycleService extends BaseService {+ private reportContext(db: LobeChatDatabase) {+ const resources = new EvalResourceService(db, this.userId, this.workspaceId);+ return {+ runModel: new AgentEvalRunModel(db, this.userId, this.workspaceId),+ runTopicModel: new AgentEvalRunTopicModel(db, this.userId, this.workspaceId),+ testCaseModel: {+ countByDatasetId: async (id: string) => (await resources.getDataset(id)).testCaseCount,+ },+ threadModel: new ThreadModel(db, this.userId, this.workspaceId),+ runService: { evaluateAndFinalizeRun },+ };+ }+ private async getRun(id: string) {+ const run = await new AgentEvalRunModel(this.db, this.userId, this.workspaceId).findById(id);+ if (!run) throw this.createNotFoundError('Eval run not found');+ return run;+ }+ async requiresInternalExecution(id: string) {+ return (await this.getRun(id)).config?.executionMode !== 'external';+ }+ async claim(id: string) {+ const run = await this.getRun(id);+ if (run.config?.executionMode !== 'external')+ throw this.createConflictError('Only external runs can be claimed');+ const claimed = await new AgentEvalRunModel(this.db, this.userId, this.workspaceId).claim(id);+ if (!claimed) throw this.createConflictError('Run is not pending or already claimed');+ return projectRun(claimed);+ }+ async report(id: string, topicId: string, input: EvalReport) {+ const batch = await this.reportBatch(id, { items: [{ ...input, topicId }] });+ return { ...batch.items[0], runStatus: batch.runStatus };+ }+ async reportBatch(id: string, input: EvalBatchReport) {+ try {+ return await this.db.transaction(async (tx) => {+ // Serialize the read/modify/write aggregation, including different threads+ // of the same topic. A rejected item rolls the entire batch back.+ const [run] = await tx+ .select()+ .from(agentEvalRuns)+ .where(and(eq(agentEvalRuns.id, id), this.buildWorkspaceWhere(agentEvalRuns)))+ .for('update');+ if (!run) throw this.createNotFoundError('Eval run not found');+ if (!['running', 'external', 'completed', 'failed'].includes(run.status))+ throw this.createConflictError('Run does not accept results in its current state');+ const ctx = this.reportContext(tx);+ const resources = new EvalResourceService(tx, this.userId, this.workspaceId);+ const receipts = [];+ for (const item of input.items) {+ let [topic] = await tx+ .select()+ .from(agentEvalRunTopics)+ .where(+ and(+ eq(agentEvalRunTopics.runId, id),+ eq(agentEvalRunTopics.topicId, item.topicId),+ this.buildWorkspaceWhere(agentEvalRunTopics),+ ),+ );+ if (!topic && run.config?.executionMode === 'external' && item.testCaseId) {+ const testCase = await resources.getTestCase(item.testCaseId);+ const [sourceTopic] = await tx+ .select({ id: topics.id })+ .from(topics)+ .where(+ and(+ eq(topics.id, item.topicId),+ isNull(topics.deletedAt),+ this.buildWorkspaceWhere(topics),+ ),+ );+ if (testCase.datasetId !== run.datasetId || !sourceTopic)+ throw this.createNotFoundError('Test case or topic not found');+ if (['completed', 'failed'].includes(run.status))+ throw this.createConflictError('Terminal runs cannot add results');+ const [created] = await tx+ .insert(agentEvalRunTopics)+ .values({+ ...this.buildWorkspacePayload({}),+ runId: id,+ topicId: item.topicId,+ testCaseId: item.testCaseId,+ status: 'external',+ })+ .onConflictDoNothing()+ .returning();+ if (!created)+ throw this.createConflictError('Test case already has a topic in this run');+ topic = created;+ }+ if (!topic) throw this.createNotFoundError('Run topic not found');+ if (item.testCaseId && item.testCaseId !== topic.testCaseId)+ throw this.createConflictError('Test case does not match the run topic');+ if (item.threadId) {+ const [thread] = await tx+ .select({ id: threads.id })+ .from(threads)+ .where(+ and(+ eq(threads.id, item.threadId),+ eq(threads.topicId, item.topicId),+ this.buildWorkspaceWhere(threads),+ ),+ );+ if (!thread) throw this.createNotFoundError('Thread not found for this topic');+ }+ const result = topic.evalResult as+ | (NonNullable<typeof topic.evalResult> & {+ externalResult?: unknown;+ externalThreadResults?: Record<string, unknown>;+ })+ | null;+ const threadResult =+ item.threadId && (run.config?.k ?? 1) > 1+ ? result?.threads?.find((t) => t.threadId === item.threadId)+ : undefined;+ const alreadyReported =+ threadResult?.status === 'completed' ||+ ((run.config?.k ?? 1) === 1 &&+ ['passed', 'failed', 'error'].includes(topic.status ?? ''));+ if (alreadyReported) {+ const score = threadResult ? threadResult.score : topic.score;+ const passed = threadResult ? threadResult.passed : topic.passed;+ const previous = threadResult+ ? result?.externalThreadResults?.[item.threadId!]+ : result?.externalResult;+ if (+ score !== item.score ||+ passed !== item.correct ||+ !isEqual(previous, item.result ?? {})+ )+ throw this.createConflictError('A different result has already been reported');+ } else if (['completed', 'failed'].includes(run.status))+ throw this.createConflictError('Terminal runs only accept identical result replays');+ receipts.push(await applyReportResult(ctx, { ...item, runId: id }, false));+ }+ const runStatus = receipts.every((receipt) => receipt.idempotent)+ ? run.status+ : await recomputeRunAggregation(ctx, id);+ return { items: receipts, runId: id, runStatus, success: true };+ });+ } catch (error) {+ if (error instanceof TRPCError) {+ if (error.code === 'NOT_FOUND') throw this.createNotFoundError(error.message);+ throw this.createValidationError(error.message);+ }+ throw error;+ }+ }+ async setStatus(id: string, input: EvalSetStatus) {+ return this.db.transaction(async (tx) => {+ const [run] = await tx+ .select()+ .from(agentEvalRuns)+ .where(and(eq(agentEvalRuns.id, id), this.buildWorkspaceWhere(agentEvalRuns)))+ .for('update');+ if (!run) throw this.createNotFoundError('Eval run not found');+ if (run.config?.executionMode !== 'external')+ throw this.createConflictError('Only external runs support worker status changes');+ if (run.status === input.status) return projectRun(run);+ if (['completed', 'failed', 'aborted'].includes(run.status))+ throw this.createConflictError('Terminal run cannot change status');+ if (input.status === 'running')+ throw this.createConflictError('Use claim to start a pending run');+ if (+ !['running', 'external'].includes(run.status) &&+ !['failed', 'aborted'].includes(input.status)+ )+ throw this.createConflictError('Run must be claimed first');+ const ctx = this.reportContext(tx);+ if (input.status === 'completed') {+ const status = await recomputeRunAggregation(ctx, id);+ if (status !== 'completed')+ throw this.createConflictError('Cannot complete a run with outstanding or failed cases');+ } else {+ if (['failed', 'aborted'].includes(input.status))+ await ctx.runTopicModel.batchMarkAborted(id);+ await ctx.runModel.update(id, { status: input.status });+ }+ return projectRun((await ctx.runModel.findById(id))!);+ });+ }+ async retryErrors(id: string) {+ const result = await this.db.transaction(async (tx) => {+ const [run] = await tx+ .select()+ .from(agentEvalRuns)+ .where(and(eq(agentEvalRuns.id, id), this.buildWorkspaceWhere(agentEvalRuns)))+ .for('update');+ if (!run) throw this.createNotFoundError('Eval run not found');+ if (!['completed', 'failed', 'aborted'].includes(run.status))+ throw this.createConflictError('Only terminal runs can retry errors');+ const model = new AgentEvalRunTopicModel(tx, this.userId, this.workspaceId);+ const errors = (await model.findByRunId(id)).filter(+ (t) => t.status === 'error' || t.status === 'timeout',+ );+ const external = run.config?.executionMode === 'external';+ if (!errors.length) return { retryCount: 0, external };+ if (external) {+ await tx+ .delete(agentEvalRunTopics)+ .where(+ and(+ eq(agentEvalRunTopics.runId, id),+ inArray(agentEvalRunTopics.status, ['error', 'timeout']),+ this.buildWorkspaceWhere(agentEvalRunTopics),+ ),+ );+ await new AgentEvalRunModel(tx, this.userId, this.workspaceId).update(id, {+ status: 'pending',+ });+ return { retryCount: errors.length, external };+ }+ const { AgentEvalRunService } = await import('@/server/services/agentEvalRun');+ const retried = await new AgentEvalRunService(+ tx,+ this.userId,+ this.workspaceId,+ ).retryErrorCases(id);+ await AgentEvalRunWorkflow.triggerRunBenchmark({+ force: true,+ runId: id,+ userId: this.userId,+ });+ return { ...retried, external };+ });+ return { runId: id, retryCount: result.retryCount };+ }+}diff --git a/packages/openapi/src/services/eval-resource.service.test.ts b/packages/openapi/src/services/eval-resource.service.test.tsnew file mode 100644index 00000000000..2daf1a4b1de--- /dev/null+++ b/packages/openapi/src/services/eval-resource.service.test.ts@@ -0,0 +1,140 @@+import { beforeAll, describe, expect, it } from 'vitest';++import { getTestDB } from '@/database/core/getTestDB';+import { users, workspaces } from '@/database/schemas';++import {+ CreateBenchmarkSchema,+ CreateTestCaseSchema,+ EvalPaginationSchema,+} from '../types/eval-resource.type';+import { EvalResourceService } from './eval-resource.service';++const db = await getTestDB();+const owner = new EvalResourceService(db, 'eval-api-owner', 'eval-api-workspace');+const member = new EvalResourceService(db, 'eval-api-member', 'eval-api-workspace');+const outsider = new EvalResourceService(db, 'eval-api-outsider');+beforeAll(async () => {+ await db+ .insert(users)+ .values(['eval-api-owner', 'eval-api-member', 'eval-api-outsider'].map((id) => ({ id })));+ await db.insert(workspaces).values({+ id: 'eval-api-workspace',+ name: 'Eval API',+ primaryOwnerId: 'eval-api-owner',+ slug: 'eval-api-workspace',+ });+});++describe('public eval resources', () => {+ it('round trips structured cases, paginates, isolates and supports ID replay', async () => {+ const input = {+ id: 'benchmark-api',+ identifier: 'benchmark-api',+ name: 'Public benchmark',+ rubrics: [],+ };+ const benchmark = await owner.createBenchmark(input);+ expect(benchmark).not.toHaveProperty('userId');+ expect(await owner.createBenchmark(input)).toEqual(benchmark);+ await expect(owner.createBenchmark({ ...input, name: 'conflict' })).rejects.toMatchObject({+ name: 'ConflictError',+ });+ await expect(outsider.getBenchmark(benchmark.id)).rejects.toMatchObject({+ name: 'NotFoundError',+ });+ expect(await member.getBenchmark(benchmark.id)).toEqual(benchmark);+ const dataset = await owner.createDataset({+ id: 'dataset-api',+ identifier: 'dataset-api',+ name: 'Cases',+ benchmarkId: benchmark.id,+ evalMode: 'external',+ });+ const content = {+ id: 'case-api',+ input: 'Question',+ expected: 'Answer',+ caseId: 'native-1',+ messages: [{ content: 'Context', role: 'user' as const }],+ environment: { envPrompt: 'Environment' },+ };+ const testCase = await owner.createTestCase(dataset.id, content);+ expect(await owner.createTestCase(dataset.id, content)).toEqual(testCase);+ expect(testCase).toMatchObject(content);+ expect(testCase).not.toHaveProperty('workspaceId');+ await owner.createTestCase(dataset.id, { input: 'Second' });+ expect(await owner.listTestCases(dataset.id, { limit: 1, offset: 1 })).toMatchObject({+ total: 2,+ testCases: [{ input: 'Second' }],+ });+ expect(await owner.getDataset(dataset.id)).toMatchObject({ testCaseCount: 2 });+ await expect(+ outsider.createTestCase(dataset.id, { input: 'Cross-scope' }),+ ).rejects.toMatchObject({ name: 'NotFoundError' });+ await expect(+ outsider.createDataset({+ identifier: 'foreign-parent',+ name: 'Invalid',+ benchmarkId: benchmark.id,+ }),+ ).rejects.toMatchObject({ name: 'NotFoundError' });+ expect(await member.updateTestCase(testCase.id, { expected: 'Updated' })).toMatchObject({+ input: 'Question',+ expected: 'Updated',+ messages: content.messages,+ });+ await member.deleteTestCase(testCase.id);+ await expect(owner.getTestCase(testCase.id)).rejects.toMatchObject({ name: 'NotFoundError' });+ await owner.deleteDataset(dataset.id);+ await owner.deleteBenchmark(benchmark.id);+ });+ it('rejects paths in messages and unbounded pagination', () => {+ expect(+ CreateTestCaseSchema.safeParse({ input: 'x', messages: '/tmp/history.json' }).success,+ ).toBe(false);+ for (const input of [{ limit: '101' }, { limit: '1.5' }, { offset: '-1' }])+ expect(EvalPaginationSchema.safeParse(input).success).toBe(false);+ });+ it('retains advanced rubric configuration instead of stripping evaluator options', () => {+ const input = {+ identifier: 'rubrics',+ name: 'Rubrics',+ rubrics: [+ {+ id: 'similar',+ name: 'Similarity',+ type: 'similar',+ weight: 1,+ config: { value: 'answer', threshold: 0.8 },+ },+ {+ id: 'llm',+ name: 'Judge',+ type: 'llm-rubric',+ weight: 1,+ config: { criteria: 'Correct', systemRole: 'Judge carefully' },+ },+ {+ id: 'any',+ name: 'Any',+ type: 'any-of',+ weight: 1,+ config: { values: ['A'], caseSensitive: false },+ },+ {+ id: 'extract',+ name: 'Extract',+ type: 'extract-match',+ weight: 1,+ extractor: { type: 'last-line', trim: true },+ config: {+ extractor: { type: 'regex', pattern: '(A)', group: 1 },+ innerMatcher: 'equals',+ },+ },+ ],+ };+ expect(CreateBenchmarkSchema.parse(input)).toEqual(input);+ });+});diff --git a/packages/openapi/src/services/eval-resource.service.ts b/packages/openapi/src/services/eval-resource.service.tsnew file mode 100644index 00000000000..7521e0561d2--- /dev/null+++ b/packages/openapi/src/services/eval-resource.service.ts@@ -0,0 +1,310 @@+import { and, asc, count, desc, eq, isNull, or } from 'drizzle-orm';+import isEqual from 'fast-deep-equal';++import type { AgentEvalBenchmarkItem, AgentEvalTestCaseItem } from '@/database/schemas';+import {+ agentEvalBenchmarks as benchmarks,+ agentEvalDatasets as datasets,+ agentEvalTestCases as cases,+} from '@/database/schemas';++import { BaseService } from '../common/base.service';+import { projectPublicEvalDataset, projectPublicEvalTestCase } from '../helpers/public-fields';+import type {+ CreateBenchmark,+ CreateDataset,+ CreateTestCase,+ EvalPagination,+} from '../types/eval-resource.type';+import { evalPagination } from '../types/eval-resource.type';++export const projectBenchmark = (row: AgentEvalBenchmarkItem) => ({+ id: row.id,+ identifier: row.identifier,+ name: row.name,+ description: row.description,+ rubrics: row.rubrics,+ referenceUrl: row.referenceUrl,+ metadata: row.metadata,+ isSystem: row.isSystem,+ createdAt: row.createdAt,+ updatedAt: row.updatedAt,+});+export const projectTestCase = (row: AgentEvalTestCaseItem) => ({+ ...projectPublicEvalTestCase(row),+ input: row.content.input,+ expected: row.content.expected,+ category: row.content.category,+ environment: row.content.environment,+ messages: row.content.messages,+ choices: row.content.choices,+ caseId: row.metadata?.caseId,+});++// Explicit IDs make creates retryable. A duplicate without an ID or with different+// supplied fields is a conflict; it never overwrites an existing resource.+const matches = (row: object, input: object) =>+ Object.entries(input).every(+ ([key, value]) => value === undefined || isEqual(Reflect.get(row, key), value),+ );++export class EvalResourceService extends BaseService {+ private writeError(error: unknown): never {+ const details = error as { code?: string; cause?: { code?: string } };+ const code = details?.code ?? details?.cause?.code;+ if (code === '23505')+ throw this.createConflictError('Eval resource id or identifier already exists');+ if (code === '23503') throw this.createNotFoundError('Referenced eval resource not found');+ throw new Error('Failed to write eval resource', { cause: error });+ }+ private benchmarkRead = () =>+ or(+ this.buildWorkspaceWhere(benchmarks),+ and(isNull(benchmarks.userId), isNull(benchmarks.workspaceId)),+ );+ private datasetRead = () =>+ or(+ this.buildWorkspaceWhere(datasets),+ and(isNull(datasets.userId), isNull(datasets.workspaceId)),+ );++ async getBenchmark(id: string, mutable = false) {+ const [row] = await this.db+ .select()+ .from(benchmarks)+ .where(+ and(+ eq(benchmarks.id, id),+ mutable ? this.buildWorkspaceWhere(benchmarks) : this.benchmarkRead(),+ ),+ )+ .limit(1);+ if (!row) throw this.createNotFoundError('Benchmark not found');+ if (mutable && row.isSystem)+ throw this.createAuthorizationError('System benchmarks are read-only');+ return projectBenchmark(row);+ }+ async listBenchmarks(query: EvalPagination) {+ const { limit, offset } = evalPagination(query);+ const [rows, totals] = await Promise.all([+ this.db+ .select()+ .from(benchmarks)+ .where(this.benchmarkRead())+ .orderBy(desc(benchmarks.createdAt), asc(benchmarks.id))+ .limit(limit)+ .offset(offset),+ this.db.select({ total: count() }).from(benchmarks).where(this.benchmarkRead()),+ ]);+ return { benchmarks: rows.map(projectBenchmark), total: totals[0].total };+ }+ async createBenchmark(input: CreateBenchmark) {+ const [row] = await this.db+ .insert(benchmarks)+ .values({ ...input, isSystem: false, ...this.buildWorkspacePayload({}) })+ .onConflictDoNothing()+ .returning()+ .catch((error) => this.writeError(error));+ if (row) return projectBenchmark(row);+ if (input.id) {+ const [existing] = await this.db+ .select()+ .from(benchmarks)+ .where(and(eq(benchmarks.id, input.id), this.buildWorkspaceWhere(benchmarks)));+ if (existing && matches(existing, input)) return projectBenchmark(existing);+ }+ throw this.createConflictError('Benchmark id or identifier already exists');+ }+ async updateBenchmark(id: string, input: Partial<Omit<CreateBenchmark, 'id'>>) {+ await this.getBenchmark(id, true);+ const [row] = await this.db+ .update(benchmarks)+ .set({ ...input, updatedAt: new Date() })+ .where(+ and(+ eq(benchmarks.id, id),+ this.buildWorkspaceWhere(benchmarks),+ eq(benchmarks.isSystem, false),+ ),+ )+ .returning()+ .catch((error) => this.writeError(error));+ if (!row) throw this.createNotFoundError('Benchmark not found');+ return projectBenchmark(row);+ }+ async deleteBenchmark(id: string) {+ await this.getBenchmark(id, true);+ await this.db+ .delete(benchmarks)+ .where(+ and(+ eq(benchmarks.id, id),+ this.buildWorkspaceWhere(benchmarks),+ eq(benchmarks.isSystem, false),+ ),+ );+ return { id };+ }+ async getDataset(id: string, mutable = false) {+ const [row] = await this.db+ .select()+ .from(datasets)+ .where(+ and(eq(datasets.id, id), mutable ? this.buildWorkspaceWhere(datasets) : this.datasetRead()),+ )+ .limit(1);+ if (!row) throw this.createNotFoundError('Dataset not found');+ const [total] = await this.db+ .select({ total: count() })+ .from(cases)+ .where(eq(cases.datasetId, id));+ return { ...projectPublicEvalDataset(row), testCaseCount: total.total };+ }+ async listDatasets(query: EvalPagination & { benchmarkId?: string }) {+ const { limit, offset } = evalPagination(query);+ const where = and(+ this.datasetRead(),+ query.benchmarkId ? eq(datasets.benchmarkId, query.benchmarkId) : undefined,+ );+ const [rows, totals] = await Promise.all([+ this.db+ .select({ dataset: datasets, testCaseCount: count(cases.id) })+ .from(datasets)+ .leftJoin(cases, eq(cases.datasetId, datasets.id))+ .where(where)+ .groupBy(datasets.id)+ .orderBy(desc(datasets.createdAt), asc(datasets.id))+ .limit(limit)+ .offset(offset),+ this.db.select({ total: count() }).from(datasets).where(where),+ ]);+ return {+ datasets: rows.map((row) => ({+ ...projectPublicEvalDataset(row.dataset),+ testCaseCount: row.testCaseCount,+ })),+ total: totals[0].total,+ };+ }+ async createDataset(input: CreateDataset) {+ if (input.benchmarkId) await this.getBenchmark(input.benchmarkId);+ const [row] = await this.db+ .insert(datasets)+ .values({ ...input, ...this.buildWorkspacePayload({}) })+ .onConflictDoNothing()+ .returning()+ .catch((error) => this.writeError(error));+ if (row) return this.getDataset(row.id);+ if (input.id) {+ const [existing] = await this.db+ .select()+ .from(datasets)+ .where(and(eq(datasets.id, input.id), this.buildWorkspaceWhere(datasets)));+ if (existing && matches(existing, input)) return this.getDataset(existing.id);+ }+ throw this.createConflictError('Dataset id or identifier already exists');+ }+ async updateDataset(id: string, input: Partial<Omit<CreateDataset, 'id'>>) {+ await this.getDataset(id, true);+ if (input.benchmarkId) await this.getBenchmark(input.benchmarkId);+ const [row] = await this.db+ .update(datasets)+ .set({ ...input, updatedAt: new Date() })+ .where(and(eq(datasets.id, id), this.buildWorkspaceWhere(datasets)))+ .returning()+ .catch((error) => this.writeError(error));+ if (!row) throw this.createNotFoundError('Dataset not found');+ return this.getDataset(row.id);+ }+ async deleteDataset(id: string) {+ await this.getDataset(id, true);+ await this.db+ .delete(datasets)+ .where(and(eq(datasets.id, id), this.buildWorkspaceWhere(datasets)));+ return { id };+ }+ async getTestCase(id: string, mutable = false) {+ const [row] = await this.db+ .select({ testCase: cases })+ .from(cases)+ .innerJoin(datasets, eq(cases.datasetId, datasets.id))+ .where(+ and(+ eq(cases.id, id),+ mutable+ ? and(this.buildWorkspaceWhere(cases), this.buildWorkspaceWhere(datasets))+ : this.datasetRead(),+ ),+ )+ .limit(1);+ if (!row) throw this.createNotFoundError('Test case not found');+ return projectTestCase(row.testCase);+ }+ async listTestCases(datasetId: string, query: EvalPagination) {+ await this.getDataset(datasetId);+ const { limit, offset } = evalPagination(query);+ const [rows, totals] = await Promise.all([+ this.db+ .select()+ .from(cases)+ .where(eq(cases.datasetId, datasetId))+ .orderBy(asc(cases.sortOrder), asc(cases.id))+ .limit(limit)+ .offset(offset),+ this.db.select({ total: count() }).from(cases).where(eq(cases.datasetId, datasetId)),+ ]);+ return { testCases: rows.map(projectTestCase), total: totals[0].total };+ }+ async createTestCase(datasetId: string, input: CreateTestCase) {+ await this.getDataset(datasetId, true);+ const { id, caseId, sortOrder, evalMode, evalConfig, ...content } = input;+ const value = {+ id,+ datasetId,+ content,+ sortOrder: sortOrder ?? 0,+ evalMode,+ evalConfig,+ metadata: caseId ? { caseId } : null,+ };+ const [row] = await this.db+ .insert(cases)+ .values({ ...value, ...this.buildWorkspacePayload({}) })+ .onConflictDoNothing()+ .returning()+ .catch((error) => this.writeError(error));+ if (row) return projectTestCase(row);+ if (id) {+ const [existing] = await this.db+ .select()+ .from(cases)+ .where(and(eq(cases.id, id), this.buildWorkspaceWhere(cases)));+ if (existing && matches(existing, value)) return projectTestCase(existing);+ }+ throw this.createConflictError('Test case id already exists');+ }+ async updateTestCase(id: string, input: Partial<Omit<CreateTestCase, 'id'>>) {+ const existing = await this.getTestCase(id, true);+ const { caseId, sortOrder, evalMode, evalConfig, ...content } = input;+ const [row] = await this.db+ .update(cases)+ .set({+ content: { ...existing.content, ...content },+ sortOrder,+ evalMode,+ evalConfig,+ ...(caseId !== undefined ? { metadata: { ...existing.metadata, caseId } } : {}),+ updatedAt: new Date(),+ })+ .where(and(eq(cases.id, id), this.buildWorkspaceWhere(cases)))+ .returning()+ .catch((error) => this.writeError(error));+ if (!row) throw this.createNotFoundError('Test case not found');+ return projectTestCase(row);+ }+ async deleteTestCase(id: string) {+ await this.getTestCase(id, true);+ await this.db.delete(cases).where(and(eq(cases.id, id), this.buildWorkspaceWhere(cases)));+ return { id };+ }+}diff --git a/packages/openapi/src/services/eval.service.ts b/packages/openapi/src/services/eval.service.tsindex 3f9ec70e5a0..feeb82497b7 100644--- a/packages/openapi/src/services/eval.service.ts+++ b/packages/openapi/src/services/eval.service.ts@@ -1,4 +1,5 @@import type { EvalRunTopicResult } from '@lobechat/types';+import { and, eq } from 'drizzle-orm';import {AgentEvalDatasetModel,@@ -6,15 +7,15 @@ import {AgentEvalRunTopicModel,} from '@/database/models/agentEval';import type { AgentEvalRunItem } from '@/database/schemas';+import { agentEvalExperiments, agents } from '@/database/schemas';import type { LobeChatDatabase } from '@/database/type';import { AgentEvalRunService, RUN_CREATE_ID_CONFLICT } from '@/server/services/agentEvalRun';import { AgentEvalRunWorkflow } from '@/server/workflows/agentEvalRun';import { BaseService } from '../common/base.service';-import { processPaginationConditions } from '../helpers/pagination';+import { projectRun } from '../helpers/eval-run';import {projectPublicEvalDataset,- projectPublicEvalRun,projectPublicEvalRunTopic,projectPublicEvalTestCase,} from '../helpers/public-fields';@@ -30,22 +31,20 @@ import type {EvalRunTopicListQuery,EvalRunTopicListResponse,} from '../types/eval.type';--const projectRun = (run: AgentEvalRunItem): EvalRunResponse => ({- createdAt: run.createdAt,- datasetId: run.datasetId,- id: run.id,- metrics: run.metrics,- name: run.name,- startedAt: run.startedAt,- status: run.status,- targetAgentId: run.targetAgentId,- updatedAt: run.updatedAt,-});+import { evalPagination as processPaginationConditions } from '../types/eval-resource.type';+import { EvalResourceService } from './eval-resource.service';const projectResult = (value: EvalRunTopicResult | null): EvalRunTopicResult | null => {if (!value) return null;+ const external = value as EvalRunTopicResult & {+ externalResult?: Record<string, unknown>;+ externalThreadResults?: Record<string, unknown>;+ };return {+ ...('externalResult' in external ? { externalResult: external.externalResult } : {}),+ ...('externalThreadResults' in external+ ? { externalThreadResults: external.externalThreadResults }+ : {}),awaitingExternalEval: value.awaitingExternalEval,completionReason: value.completionReason,cost: value.cost,@@ -97,8 +96,34 @@ export class EvalService extends BaseService {async createRun(request: CreateEvalRunRequest): Promise<EvalRunResponse> {let run: AgentEvalRunItem;try {- run = await this.runService.createRun({ ...request, mode: 'internal' });+ const resources = new EvalResourceService(this.db, this.userId, this.workspaceId);+ await resources.getDataset(request.datasetId);+ if (+ !(+ await this.db+ .select({ id: agents.id })+ .from(agents)+ .where(and(eq(agents.id, request.targetAgentId), this.buildWorkspaceWhere(agents)))+ .limit(1)+ )[0]+ )+ throw this.createNotFoundError('Agent not found');+ if (request.experimentId) {+ const [experiment] = await this.db+ .select({ id: agentEvalExperiments.id })+ .from(agentEvalExperiments)+ .where(+ and(+ eq(agentEvalExperiments.id, request.experimentId),+ this.buildWorkspaceWhere(agentEvalExperiments),+ ),+ );+ if (!experiment) throw this.createNotFoundError('Experiment not found');+ }+ const { executionMode, ...params } = request;+ run = await this.runService.createRun({ ...params, mode: executionMode ?? 'internal' });} catch (error) {+ if (error instanceof Error && error.name === 'NotFoundError') throw error;if (error instanceof Error && error.message === RUN_CREATE_ID_CONFLICT) {throw this.createConflictError('Eval run id already exists with different parameters');}@@ -107,6 +132,8 @@ export class EvalService extends BaseService {);}+ if (request.executionMode === 'external') return projectRun(run);+// queue() is conditional idle -> pending. An idempotent retry sees the// existing pending/running/terminal run and does not dispatch twice.const queued = await this.runModel.queue(run.id);@@ -127,14 +154,18 @@ export class EvalService extends BaseService {async listRuns(query: EvalRunListQuery): Promise<EvalRunListResponse> {const { limit, offset } = processPaginationConditions(query);- const filter = { datasetId: query.datasetId, status: query.status };+ const filter = {+ datasetId: query.datasetId,+ experimentId: query.experimentId,+ status: query.status,+ };const [runs, total] = await Promise.all([this.runModel.query({ ...filter, limit, offset }),this.runModel.count(filter),]);- return { runs: runs.map(projectPublicEvalRun), total };+ return { runs: runs.map(projectRun), total };}async listDatasets(query: EvalDatasetListQuery): Promise<EvalDatasetListResponse> {@@ -190,10 +221,16 @@ export class EvalService extends BaseService {return projectRun(detail);}- async getRunResults(id: string): Promise<EvalRunResultsResponse> {+ async getRunResults(+ id: string,+ query: EvalRunTopicListQuery = {},+ ): Promise<EvalRunResultsResponse> {const run = await this.runModel.findById(id);if (!run) throw this.createNotFoundError('Eval run not found');- const topics = await this.runTopicModel.findByRunId(id);+ const [topics, total] = await Promise.all([+ this.runTopicModel.findByRunId(id, processPaginationConditions(query)),+ this.runTopicModel.countByRunId(id),+ ]);return {results: topics.map((topic) => ({@@ -207,7 +244,7 @@ export class EvalService extends BaseService {topicId: topic.topicId,})),runId: id,- total: topics.length,+ total,};}}diff --git a/packages/openapi/src/services/message.service.ts b/packages/openapi/src/services/message.service.tsindex 8bf5a428c54..2d75e30f90f 100644--- a/packages/openapi/src/services/message.service.ts+++ b/packages/openapi/src/services/message.service.ts@@ -7,7 +7,6 @@ import { idGenerator } from '@/database/utils/idGenerator';import { FileService as CoreFileService } from '@/server/services/file';import { BaseService } from '../common/base.service';-import { processPaginationConditions } from '../helpers/pagination';import {projectPublicFile,projectPublicMessage,@@ -15,6 +14,7 @@ import {projectPublicTopic,} from '../helpers/public-fields';import type { ServiceResult } from '../types';+import { evalPagination as processPaginationConditions } from '../types/eval-resource.type';import type {MessageListResponse,MessageResponse,@@ -155,6 +155,27 @@ export class MessageService extends BaseService {this.log('info', '统计消息数量', { query, userId: this.userId });try {+ if (query.threadId || query.topicId) {+ if (!query.topicId) throw this.createValidationError('topicId is required with threadId');+ if (query.userId || query.topicIds)+ throw this.createValidationError('Use topicId without userId or topicIds');+ const permission = await this.resolveOperationPermission('MESSAGE_READ', {+ targetTopicId: query.topicId,+ });+ if (!permission.isPermitted)+ throw this.createAuthorizationError('No permission to read topic messages');+ const [row] = await this.db+ .select({ count: count() })+ .from(messages)+ .where(+ and(+ this.buildWorkspaceWhere(messages),+ eq(messages.topicId, query.topicId),+ query.threadId ? eq(messages.threadId, query.threadId) : undefined,+ ),+ );+ return { count: row.count };+ }// Count by user ID (requires special permission check)if (query.userId) {return await this.countMessagesByUserId(query.userId);@@ -291,6 +312,10 @@ export class MessageService extends BaseService {conditions.push(this.buildWorkspaceWhere(messages));}+ if (request.threadId) {+ if (!request.topicId) throw this.createValidationError('topicId is required with threadId');+ conditions.push(eq(messages.threadId, request.threadId));+ }if (request.role) {conditions.push(eq(messages.role, request.role));}@@ -308,7 +333,7 @@ export class MessageService extends BaseService {const listQuery = this.db.query.messages.findMany({limit,offset,- orderBy: asc(messages.createdAt),+ orderBy: [asc(messages.createdAt), asc(messages.id)],where: whereExpr,with: {filesToMessages: {diff --git a/packages/openapi/src/spec.test.ts b/packages/openapi/src/spec.test.tsnew file mode 100644index 00000000000..9960e51f3f6--- /dev/null+++ b/packages/openapi/src/spec.test.ts@@ -0,0 +1,28 @@+import { Hono } from 'hono';+import { describeRoute } from 'hono-openapi';+import { describe, expect, it } from 'vitest';++import { buildSpecDocument } from './spec';++describe('public eval creation response contracts', () => {+ it('documents resource creation and agent duplication as 201, and run acceptance as 202', async () => {+ const app = new Hono();+ const paths = [+ '/api/v1/eval/benchmarks',+ '/api/v1/eval/datasets',+ '/api/v1/eval/datasets/:datasetId/test-cases',+ '/api/v1/agents/:id/duplicate',+ ];+ for (const path of paths)+ app.post(path, describeRoute({ summary: 'Create resource' }), (c) => c.json({}, 201));+ app.post('/api/v1/eval/runs', describeRoute({ summary: 'Create run' }), (c) => c.json({}, 202));+ const spec = await buildSpecDocument(app);+ for (const path of paths) {+ const key = path.replaceAll(/:([^/]+)/g, '{$1}');+ const responses = spec.paths![key].post!.responses!;+ expect(responses).toHaveProperty('201');+ expect(responses).not.toHaveProperty('200');+ }+ expect(spec.paths!['/api/v1/eval/runs'].post!.responses).toHaveProperty('202');+ });+});diff --git a/packages/openapi/src/spec.ts b/packages/openapi/src/spec.tsindex 2b480651374..a08fb59bc9f 100644--- a/packages/openapi/src/spec.ts+++ b/packages/openapi/src/spec.ts@@ -3,6 +3,8 @@ import { generateSpecs } from 'hono-openapi';import { API_KEY_SCOPES } from '@/const/apiKeyScope';+import { evalResponseSchema } from './types/eval-response.type';+const HTTP_METHODS = new Set(['DELETE', 'GET', 'PATCH', 'POST', 'PUT']);type GenerateSpecsApp = Parameters<typeof generateSpecs>[0];@@ -47,6 +49,18 @@ const resourceSchemas: Record<string, SchemaObject> = {id: { type: 'string' },model: nullableString,params: nullableObject,+ plugins: {+ type: 'array',+ items: {+ type: 'object',+ additionalProperties: false,+ properties: {+ identifier: { type: 'string' },+ mode: { type: 'string', enum: ['pinned', 'auto', 'disabled'] },+ },+ required: ['identifier', 'mode'],+ },+ },provider: nullableString,slug: nullableString,systemRole: nullableString,@@ -481,21 +495,54 @@ const getSuccessSchema = (group: string, rest: string, method: string): SchemaObreturn successEnvelope(ref('ChatResponse'));}- if (group === 'eval') {- if (rest.endsWith('/results')) {- return successEnvelope({- additionalProperties: false,- properties: {- results: { items: ref('EvalRunResult'), type: 'array' },- runId: { type: 'string' },- total: { minimum: 0, type: 'integer' },+ if (group === 'eval') return successEnvelope(evalResponseSchema(method, rest));++ if (group === 'topics' && rest.endsWith('/threads'))+ return successEnvelope({+ type: 'object',+ properties: {+ threads: {+ type: 'array',+ items: {+ type: 'object',+ additionalProperties: false,+ properties: {+ id: { type: 'string' },+ topicId: { type: 'string' },+ title: nullableString,+ type: { type: 'string' },+ status: nullableString,+ parentThreadId: nullableString,+ createdAt: dateTime,+ updatedAt: dateTime,+ },+ },},- required: ['runId', 'total', 'results'],- type: 'object',- });- }- return successEnvelope(ref('EvalRun'));- }+ total: { type: 'integer' },+ },+ required: ['threads', 'total'],+ });+ if (group === 'plugins')+ return successEnvelope({+ type: 'object',+ properties: {+ plugins: {+ type: 'array',+ items: {+ type: 'object',+ additionalProperties: false,+ properties: {+ identifier: { type: 'string' },+ type: { type: 'string' },+ createdAt: dateTime,+ updatedAt: dateTime,+ },+ },+ },+ total: { type: 'integer' },+ },+ required: ['plugins', 'total'],+ });const resource = groupResources[group];if (!resource) return successEnvelope({ additionalProperties: true, type: 'object' });@@ -736,9 +783,11 @@ export const buildSpecDocument = async (app: GenerateSpecsApp) => {const successStatus =group === 'eval' && method === 'post' && rest === 'runs'? 202- : ['agent-groups', 'api-keys', 'mcp-servers'].includes(group) &&- method === 'post' &&- rest === ''+ : method === 'post' &&+ ((['agent-groups', 'api-keys', 'mcp-servers'].includes(group) && rest === '') ||+ (group === 'agents' && rest === '{id}/duplicate') ||+ (group === 'eval' &&+ ['benchmarks', 'datasets', 'datasets/{datasetId}/test-cases'].includes(rest)))? 201: 200;const currentSuccess = (op.responses[successStatus] ?? {}) as Record<string, unknown>;diff --git a/packages/openapi/src/types/agent.type.ts b/packages/openapi/src/types/agent.type.tsindex 18076f88b7e..ede88873a16 100644--- a/packages/openapi/src/types/agent.type.ts+++ b/packages/openapi/src/types/agent.type.ts@@ -17,6 +17,7 @@ export interface CreateAgentRequest {description?: string;model?: string;params?: Record<string, unknown>;+ plugins?: Array<{ identifier: string; mode?: 'pinned' | 'auto' | 'disabled' }>;provider?: string;systemRole?: string;title: string;@@ -51,6 +52,21 @@ export const CreateAgentRequestSchema = z.object({.nullish(),description: z.string().nullish(),model: z.string().nullish(),+ plugins: z+ .array(+ z+ .object({+ identifier: z.string().min(1).max(255),+ mode: z.enum(['pinned', 'auto', 'disabled']).optional(),+ })+ .strict(),+ )+ .max(100)+ .refine(+ (items) => new Set(items.map((item) => item.identifier)).size === items.length,+ 'Duplicate plugin identifiers',+ )+ .optional(),params: z.record(z.string(), z.unknown()).nullish(),provider: z.string().nullish(),systemRole: z.string().nullish(),@@ -180,3 +196,7 @@ export interface AgentDetailResponse extends PublicAgent {export const AgentIdParamSchema = z.object({id: z.string().min(1, 'Agent ID cannot be empty'),});++export const DuplicateAgentSchema = z+ .object({ title: z.string().trim().min(1).max(255).optional() })+ .strict();diff --git a/packages/openapi/src/types/eval-resource.type.ts b/packages/openapi/src/types/eval-resource.type.tsnew file mode 100644index 00000000000..dc64809be91--- /dev/null+++ b/packages/openapi/src/types/eval-resource.type.ts@@ -0,0 +1,180 @@+import { z } from 'zod';++export const EvalIdSchema = z.string().min(1).max(128);+export const EvalResourceIdSchema = z.object({ id: EvalIdSchema });+export const EvalDatasetPathSchema = z.object({ datasetId: EvalIdSchema });+export const EvalPaginationSchema = z.object({+ limit: z.coerce.number().int().min(1).max(100).optional(),+ offset: z.coerce.number().int().min(0).max(1000000).optional(),+ page: z.coerce.number().int().min(1).max(1000000).optional(),+ pageSize: z.coerce.number().int().min(1).max(100).optional(),+});+export const evalPagination = (query: z.infer<typeof EvalPaginationSchema>) => ({+ limit: query.limit ?? query.pageSize ?? 20,+ offset: query.offset ?? ((query.page ?? 1) - 1) * (query.limit ?? query.pageSize ?? 20),+});+export const EvalModeSchema = z.enum([+ 'equals',+ 'contains',+ 'regex',+ 'starts-with',+ 'ends-with',+ 'any-of',+ 'numeric',+ 'extract-match',+ 'json-schema',+ 'javascript',+ 'python',+ 'llm-rubric',+ 'factuality',+ 'answer-relevance',+ 'similar',+ 'levenshtein',+ 'rubric',+ 'external',+]);+const json = z.record(z.string(), z.unknown());+const name = z.string().trim().min(1).max(255);+const AnswerExtractorSchema = z.discriminatedUnion('type', [+ z+ .object({+ type: z.literal('regex'),+ pattern: z.string(),+ group: z.number().int().min(0).optional(),+ })+ .strict(),+ z+ .object({+ type: z.literal('delimiter'),+ delimiter: z.string(),+ position: z.enum(['first', 'last']).optional(),+ })+ .strict(),+ z.object({ type: z.literal('last-line'), trim: z.boolean().optional() }).strict(),+ z+ .object({+ type: z.literal('choice-index'),+ labels: z.array(z.string()).optional(),+ pattern: z.string().optional(),+ })+ .strict(),+]);+export const CreateBenchmarkSchema = z+ .object({+ id: EvalIdSchema.optional(),+ identifier: name,+ name,+ description: z.string().max(10000).nullable().optional(),+ metadata: json.nullable().optional(),+ referenceUrl: z.url().nullable().optional(),+ rubrics: z+ .array(+ z+ .object({+ id: EvalIdSchema,+ name,+ type: EvalModeSchema,+ weight: z.number().min(0),+ threshold: z.number().optional(),+ extractor: AnswerExtractorSchema.optional(),+ config: z.union([+ z.object({ value: z.string(), threshold: z.number().optional() }).strict(),+ z.object({ value: z.number(), tolerance: z.number().optional() }),+ z.object({ pattern: z.string() }),+ z.object({ code: z.string() }),+ z.object({+ criteria: z.string(),+ model: z.string().optional(),+ provider: z.string().optional(),+ systemRole: z.string().optional(),+ }),+ z+ .object({ values: z.array(z.string()), caseSensitive: z.boolean().optional() })+ .strict(),+ z.object({ schema: json }).strict(),+ z+ .object({+ extractor: AnswerExtractorSchema,+ innerMatcher: EvalModeSchema.optional(),+ })+ .strict(),+ ]),+ })+ .strict(),+ )+ .max(100)+ .default([]),+ })+ .strict();+export const UpdateBenchmarkSchema = CreateBenchmarkSchema.omit({ id: true }).partial();+export const CreateDatasetSchema = z+ .object({+ id: EvalIdSchema.optional(),+ identifier: name,+ name,+ benchmarkId: EvalIdSchema.nullable().optional(),+ description: z.string().max(10000).nullable().optional(),+ metadata: json.nullable().optional(),+ evalConfig: json.nullable().optional(),+ evalMode: EvalModeSchema.nullable().optional(),+ })+ .strict();+export const UpdateDatasetSchema = CreateDatasetSchema.omit({ id: true }).partial();+export const ListDatasetsSchema = EvalPaginationSchema.extend({+ benchmarkId: EvalIdSchema.optional(),+});+export const EvalMessageSchema = z+ .object({+ content: z.string(),+ role: z.enum(['user', 'assistant', 'system', 'tool']),+ id: EvalIdSchema.optional(),+ parentId: EvalIdSchema.nullable().optional(),+ model: z.string().optional(),+ provider: z.string().optional(),+ createdAt: z.union([z.string(), z.number()]).optional(),+ updatedAt: z.union([z.string(), z.number()]).optional(),+ tools: z.array(json).optional(),+ tool_call_id: z.string().optional(),+ metadata: json.optional(),+ reasoning: json.optional(),+ plugin: json.optional(),+ pluginState: json.optional(),+ pluginError: json.optional(),+ pluginIntervention: json.optional(),+ error: json.optional(),+ search: json.optional(),+ })+ .strict();+export const CreateTestCaseSchema = z+ .object({+ id: EvalIdSchema.optional(),+ input: z.string(),+ expected: z.string().optional(),+ category: z.string().optional(),+ choices: z.array(z.string()).optional(),+ environment: z+ .object({+ envPrompt: z.string().optional(),+ toolForwarding: z+ .record(+ z.string(),+ z+ .object({ endpoint: z.url(), timeoutMs: z.number().int().positive().optional() })+ .strict(),+ )+ .optional(),+ })+ .strict()+ .optional(),+ messages: z.array(EvalMessageSchema).max(1000).optional(),+ caseId: EvalIdSchema.optional(),+ sortOrder: z.number().int().min(0).optional(),+ evalMode: EvalModeSchema.nullable().optional(),+ evalConfig: json.nullable().optional(),+ })+ .strict();+export const UpdateTestCaseSchema = CreateTestCaseSchema.omit({ id: true }).partial();+export type CreateBenchmark = z.infer<typeof CreateBenchmarkSchema>;+export type CreateDataset = z.infer<typeof CreateDatasetSchema>;+export type CreateTestCase = z.infer<typeof CreateTestCaseSchema>;+export type EvalPagination = z.infer<typeof EvalPaginationSchema>;diff --git a/packages/openapi/src/types/eval-response.type.ts b/packages/openapi/src/types/eval-response.type.tsnew file mode 100644index 00000000000..c1a045b71f2--- /dev/null+++ b/packages/openapi/src/types/eval-response.type.ts@@ -0,0 +1,116 @@+import { z } from 'zod';++import {+ CreateBenchmarkSchema,+ CreateDatasetSchema,+ CreateTestCaseSchema,+} from './eval-resource.type';++const id = z.string();+const timestamp = z.iso.datetime();+const json = z.record(z.string(), z.unknown());+const dates = { createdAt: timestamp, updatedAt: timestamp };+const nullable = z.string().nullable();+const benchmark = CreateBenchmarkSchema.extend({+ id,+ ...dates,+ isSystem: z.boolean(),+ description: nullable,+ metadata: json.nullable(),+ referenceUrl: nullable,+});+const dataset = CreateDatasetSchema.extend({+ id,+ ...dates,+ benchmarkId: nullable,+ sourceExperimentId: nullable,+ description: nullable,+ evalMode: nullable,+ evalConfig: json.nullable(),+ metadata: json.nullable(),+ testCaseCount: z.number().int(),+});+const testCase = CreateTestCaseSchema.extend({+ id,+ ...dates,+ datasetId: id,+ content: json,+ metadata: json.nullable(),+ sortOrder: z.number().nullable(),+});+const run = z+ .object({+ id,+ ...dates,+ config: json,+ executionMode: z.enum(['internal', 'external']),+ datasetId: id,+ experimentId: nullable,+ parentRunId: nullable,+ status: z.enum(['idle', 'pending', 'running', 'external', 'completed', 'failed', 'aborted']),+ targetAgentId: nullable,+ name: nullable,+ metrics: json.nullable(),+ startedAt: timestamp.nullable(),+ })+ .strict();+const runTopic = z+ .object({+ createdAt: timestamp,+ evalResult: json.nullable(),+ passed: z.boolean().nullable(),+ runId: id,+ score: z.number().nullable(),+ status: nullable,+ testCaseId: id,+ topicId: id,+ input: z.string(),+ })+ .strict();+const runResult = runTopic+ .omit({ evalResult: true, runId: true })+ .extend({ result: json.nullable() });+const receipt = z+ .object({+ idempotent: z.boolean(),+ reportedThreads: z.number(),+ runId: id,+ runStatus: z.string().optional(),+ success: z.boolean(),+ threadId: id.optional(),+ topicFinalized: z.boolean(),+ topicId: id,+ totalThreads: z.number(),+ })+ .strict();+const page = (key: string, schema: z.ZodType) =>+ z.object({ [key]: z.array(schema), total: z.number().int().min(0) });++export const evalResponseSchema = (method: string, rest: string) => {+ if (method === 'delete') return z.toJSONSchema(z.object({ id }).strict());+ if (rest.endsWith('/retry-errors'))+ return z.toJSONSchema(z.object({ runId: id, retryCount: z.number() }).strict());+ if (rest.endsWith('/result')) return z.toJSONSchema(receipt);+ if (rest.endsWith('/results') && method === 'post')+ return z.toJSONSchema(+ z+ .object({ items: z.array(receipt), runId: id, runStatus: z.string(), success: z.boolean() })+ .strict(),+ );+ if (rest.endsWith('/results'))+ return z.toJSONSchema(page('results', runResult).extend({ runId: id }));+ if (rest.endsWith('/topics'))+ return z.toJSONSchema(page('topics', runTopic).extend({ runId: id }));+ if (rest.endsWith('/test-cases'))+ return z.toJSONSchema(method === 'get' ? page('testCases', testCase) : testCase);+ if (rest.startsWith('test-cases/')) return z.toJSONSchema(testCase);+ if (rest.startsWith('benchmarks'))+ return z.toJSONSchema(+ rest === 'benchmarks' && method === 'get' ? page('benchmarks', benchmark) : benchmark,+ );+ if (rest.startsWith('datasets'))+ return z.toJSONSchema(+ rest === 'datasets' && method === 'get' ? page('datasets', dataset) : dataset,+ );+ return z.toJSONSchema(rest === 'runs' && method === 'get' ? page('runs', run) : run);+};diff --git a/packages/openapi/src/types/eval.type.ts b/packages/openapi/src/types/eval.type.tsindex f84834c4963..7f562f8585f 100644--- a/packages/openapi/src/types/eval.type.ts+++ b/packages/openapi/src/types/eval.type.ts@@ -3,17 +3,32 @@ import { z } from 'zod';import type {PublicEvalDataset,- PublicEvalRun,PublicEvalRunTopic,PublicEvalTestCase,} from '../helpers/public-fields';import type { PaginationQueryResponse } from './common.type';-import { PaginationQuerySchema } from './common.type';+import { EvalPaginationSchema } from './eval-resource.type';export const CreateEvalRunRequestSchema = z.object({config: z.object({+ maxConcurrency: z.number().int().min(1).max(100).optional(),+ caseSelection: z+ .discriminatedUnion('mode', [+ z.object({ mode: z.literal('all') }).strict(),+ z+ .object({+ mode: z.enum(['include', 'exclude']),+ caseIds: z+ .array(z.string().trim().min(1))+ .min(1)+ .max(10000)+ .refine((ids) => new Set(ids).size === ids.length),+ })+ .strict(),+ ])+ .optional(),k: z.number().int().min(1).max(10).optional(),maxSteps: z.number().int().min(1).max(1000).optional(),timeout: z@@ -25,20 +40,40 @@ export const CreateEvalRunRequestSchema = z}).strict().optional(),+ executionMode: z.enum(['internal', 'external']).optional(),+ experimentId: z.string().min(1).max(128).optional(),datasetId: z.string().min(1).max(128),id: z.string().min(1).max(128).optional(),name: z.string().trim().min(1).max(255).optional(),targetAgentId: z.string().min(1).max(128),})- .strict();+ .strict()+ .superRefine((value, ctx) => {+ if (+ value.executionMode !== 'external' &&+ (value.config?.caseSelection || value.config?.maxConcurrency !== undefined)+ )+ ctx.addIssue({+ code: 'custom',+ message: 'caseSelection and maxConcurrency require external executionMode',+ path: ['config'],+ });+ if (value.executionMode === 'external' && (value.config?.k ?? 1) > 1)+ ctx.addIssue({+ code: 'custom',+ message: 'External runs only support k=1',+ path: ['config', 'k'],+ });+ });export const EvalRunIdParamSchema = z.object({ id: z.string().min(1).max(128) });export const EvalDatasetIdParamSchema = z.object({ id: z.string().min(1).max(128) });-const EvalPaginationQuerySchema = PaginationQuerySchema.pick({ page: true, pageSize: true });+const EvalPaginationQuerySchema = EvalPaginationSchema;export const EvalRunListQuerySchema = EvalPaginationQuerySchema.extend({+ experimentId: z.string().min(1).max(128).optional(),datasetId: z.string().min(1).max(128).optional(),status: z.enum(['idle', 'pending', 'running', 'completed', 'failed', 'aborted', 'external'])@@ -57,11 +92,15 @@ export type EvalDatasetListQuery = z.infer<typeof EvalDatasetListQuerySchema>;export type EvalRunTopicListQuery = z.infer<typeof EvalRunTopicListQuerySchema>;export interface EvalRunResponse {+ config: Record<string, unknown>;createdAt: Date;datasetId: string;+ executionMode: 'internal' | 'external';+ experimentId: string | null;id: string;metrics: EvalRunMetrics | null;name: null | string;+ parentRunId: string | null;startedAt: Date | null;status: string;targetAgentId: null | string;@@ -85,7 +124,7 @@ export interface EvalRunResultsResponse {total: number;}-export type EvalRunListResponse = PaginationQueryResponse<{ runs: PublicEvalRun[] }>;+export type EvalRunListResponse = PaginationQueryResponse<{ runs: EvalRunResponse[] }>;export type EvalDatasetListResponse = PaginationQueryResponse<{ datasets: PublicEvalDataset[] }>;@@ -101,3 +140,31 @@ export type EvalRunTopicListResponse = PaginationQueryResponse<{runId: string;topics: EvalRunTopicResponse[];}>;++export const EvalRunTopicPathSchema = z.object({+ runId: z.string().min(1).max(128),+ topicId: z.string().min(1).max(128),+});+export const EvalReportSchema = z+ .object({+ testCaseId: z.string().min(1).max(128).optional(),+ correct: z.boolean(),+ score: z.number(),+ result: z.record(z.string(), z.unknown()).optional(),+ threadId: z.string().min(1).max(128).optional(),+ })+ .strict();+export const EvalBatchReportSchema = z+ .object({+ items: z+ .array(EvalReportSchema.extend({ topicId: z.string().min(1).max(128) }))+ .min(1)+ .max(100),+ })+ .strict();+export const EvalSetStatusSchema = z+ .object({ status: z.enum(['running', 'external', 'completed', 'failed', 'aborted']) })+ .strict();+export type EvalReport = z.infer<typeof EvalReportSchema>;+export type EvalBatchReport = z.infer<typeof EvalBatchReportSchema>;+export type EvalSetStatus = z.infer<typeof EvalSetStatusSchema>;diff --git a/packages/openapi/src/types/message.type.ts b/packages/openapi/src/types/message.type.tsindex 1586b6d5d07..dbd9994b84f 100644--- a/packages/openapi/src/types/message.type.ts+++ b/packages/openapi/src/types/message.type.ts@@ -8,6 +8,7 @@ import type {} from '../helpers/public-fields';import type { IPaginationQuery, PaginationQueryResponse } from './common.type';import { PaginationQuerySchema } from './common.type';+import { EvalPaginationSchema } from './eval-resource.type';// ==================== Message Query Types ====================@@ -23,11 +24,15 @@ export const MessagesQueryByTopicRequestSchema = z.object({* Message count statistics query parameters*/export interface MessagesCountQuery {+ threadId?: string;+ topicId?: string;topicIds?: string[];userId?: string;}export const MessagesCountQuerySchema = z.object({+ topicId: z.string().min(1).optional(),+ threadId: z.string().min(1).optional(),// Count by topic ID array (comma-separated string, e.g., "topic1,topic2,topic3")topicIds: z.string().nullish(),// Count by user ID (admin only)@@ -56,19 +61,24 @@ export const CountByUserRequestSchema = z.object({* Message list query parameters*/export interface MessagesListQuery extends IPaginationQuery {+ limit?: number;+ offset?: number;role?: 'user' | 'system' | 'assistant' | 'tool';+ threadId?: string;topicId?: string;userId?: string;}export const MessagesListQuerySchema = z.object({+ threadId: z.string().min(1).optional(),// Filter parameterstopicId: z.string().nullish(),userId: z.string().nullish(),role: z.enum(['user', 'system', 'assistant', 'tool']).nullish(),}).extend(PaginationQuerySchema.shape)+ .extend(EvalPaginationSchema.shape).refine((data) => Boolean(data.topicId || data.userId), {message: 'At least one filter parameter must be provided: topicId or userId',});diff --git a/packages/sdk/src/generated/index.ts b/packages/sdk/src/generated/index.tsindex 436db02553d..574c8fc4fec 100644--- a/packages/sdk/src/generated/index.ts+++ b/packages/sdk/src/generated/index.ts@@ -1,4 +1,4 @@// This file is auto-generated by @hey-api/openapi-ts-export { AgentGroups, Agents, ApiKeys, Chat, Eval, Files, Health, KnowledgeBases, LobeHub, McpServers, Messages, MessageTranslations, Models, type Options, Permissions, Providers, Responses, Roles, Topics, Usage as Usage2, Users } from './sdk.gen';-export type { Agent, AgentGroup, ApiError, ApiKey, ChatResponse, ClientOptions, DeleteApiV1AgentGroupsByIdData, DeleteApiV1AgentGroupsByIdError, DeleteApiV1AgentGroupsByIdErrors, DeleteApiV1AgentGroupsByIdResponse, DeleteApiV1AgentGroupsByIdResponses, DeleteApiV1AgentsByIdData, DeleteApiV1AgentsByIdError, DeleteApiV1AgentsByIdErrors, DeleteApiV1AgentsByIdResponse, DeleteApiV1AgentsByIdResponses, DeleteApiV1ApiKeysByIdData, DeleteApiV1ApiKeysByIdError, DeleteApiV1ApiKeysByIdErrors, DeleteApiV1ApiKeysByIdResponse, DeleteApiV1ApiKeysByIdResponses, DeleteApiV1FilesByIdData, DeleteApiV1FilesByIdError, DeleteApiV1FilesByIdErrors, DeleteApiV1FilesByIdResponse, DeleteApiV1FilesByIdResponses, DeleteApiV1KnowledgeBasesByIdData, DeleteApiV1KnowledgeBasesByIdError, DeleteApiV1KnowledgeBasesByIdErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchData, DeleteApiV1KnowledgeBasesByIdFilesBatchError, DeleteApiV1KnowledgeBasesByIdFilesBatchErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchResponse, DeleteApiV1KnowledgeBasesByIdFilesBatchResponses, DeleteApiV1KnowledgeBasesByIdResponse, DeleteApiV1KnowledgeBasesByIdResponses, DeleteApiV1McpServersByIdData, DeleteApiV1McpServersByIdError, DeleteApiV1McpServersByIdErrors, DeleteApiV1McpServersByIdResponse, DeleteApiV1McpServersByIdResponses, DeleteApiV1MessagesByIdData, DeleteApiV1MessagesByIdError, DeleteApiV1MessagesByIdErrors, DeleteApiV1MessagesByIdResponse, DeleteApiV1MessagesByIdResponses, DeleteApiV1MessagesData, DeleteApiV1MessagesError, DeleteApiV1MessagesErrors, DeleteApiV1MessagesResponse, DeleteApiV1MessagesResponses, DeleteApiV1MessageTranslationsByMessageIdData, DeleteApiV1MessageTranslationsByMessageIdError, DeleteApiV1MessageTranslationsByMessageIdErrors, DeleteApiV1MessageTranslationsByMessageIdResponse, DeleteApiV1MessageTranslationsByMessageIdResponses, DeleteApiV1PermissionsByIdData, DeleteApiV1PermissionsByIdError, DeleteApiV1PermissionsByIdErrors, DeleteApiV1PermissionsByIdResponse, DeleteApiV1PermissionsByIdResponses, DeleteApiV1ProvidersByIdData, DeleteApiV1ProvidersByIdError, DeleteApiV1ProvidersByIdErrors, DeleteApiV1ProvidersByIdResponse, DeleteApiV1ProvidersByIdResponses, DeleteApiV1RolesByIdData, DeleteApiV1RolesByIdError, DeleteApiV1RolesByIdErrors, DeleteApiV1RolesByIdPermissionsData, DeleteApiV1RolesByIdPermissionsError, DeleteApiV1RolesByIdPermissionsErrors, DeleteApiV1RolesByIdPermissionsResponse, DeleteApiV1RolesByIdPermissionsResponses, DeleteApiV1RolesByIdResponse, DeleteApiV1RolesByIdResponses, DeleteApiV1TopicsByIdData, DeleteApiV1TopicsByIdError, DeleteApiV1TopicsByIdErrors, DeleteApiV1TopicsByIdResponse, DeleteApiV1TopicsByIdResponses, DeleteApiV1UsersByIdData, DeleteApiV1UsersByIdError, DeleteApiV1UsersByIdErrors, DeleteApiV1UsersByIdResponse, DeleteApiV1UsersByIdResponses, DeleteApiV1UsersByIdRolesData, DeleteApiV1UsersByIdRolesError, DeleteApiV1UsersByIdRolesErrors, DeleteApiV1UsersByIdRolesResponse, DeleteApiV1UsersByIdRolesResponses, EvalRun, EvalRunResult, File, GetApiV1AgentGroupsByIdData, GetApiV1AgentGroupsByIdError, GetApiV1AgentGroupsByIdErrors, GetApiV1AgentGroupsByIdResponse, GetApiV1AgentGroupsByIdResponses, GetApiV1AgentGroupsData, GetApiV1AgentGroupsError, GetApiV1AgentGroupsErrors, GetApiV1AgentGroupsResponse, GetApiV1AgentGroupsResponses, GetApiV1AgentsByIdData, GetApiV1AgentsByIdError, GetApiV1AgentsByIdErrors, GetApiV1AgentsByIdResponse, GetApiV1AgentsByIdResponses, GetApiV1AgentsData, GetApiV1AgentsError, GetApiV1AgentsErrors, GetApiV1AgentsResponse, GetApiV1AgentsResponses, GetApiV1ApiKeysByIdData, GetApiV1ApiKeysByIdError, GetApiV1ApiKeysByIdErrors, GetApiV1ApiKeysByIdResponse, GetApiV1ApiKeysByIdResponses, GetApiV1ApiKeysData, GetApiV1ApiKeysError, GetApiV1ApiKeysErrors, GetApiV1ApiKeysResponse, GetApiV1ApiKeysResponses, GetApiV1EvalRunsByIdData, GetApiV1EvalRunsByIdError, GetApiV1EvalRunsByIdErrors, GetApiV1EvalRunsByIdResponse, GetApiV1EvalRunsByIdResponses, GetApiV1EvalRunsByIdResultsData, GetApiV1EvalRunsByIdResultsError, GetApiV1EvalRunsByIdResultsErrors, GetApiV1EvalRunsByIdResultsResponse, GetApiV1EvalRunsByIdResultsResponses, GetApiV1FilesByIdChunksData, GetApiV1FilesByIdChunksError, GetApiV1FilesByIdChunksErrors, GetApiV1FilesByIdChunksResponse, GetApiV1FilesByIdChunksResponses, GetApiV1FilesByIdData, GetApiV1FilesByIdError, GetApiV1FilesByIdErrors, GetApiV1FilesByIdResponse, GetApiV1FilesByIdResponses, GetApiV1FilesByIdUrlData, GetApiV1FilesByIdUrlError, GetApiV1FilesByIdUrlErrors, GetApiV1FilesByIdUrlResponse, GetApiV1FilesByIdUrlResponses, GetApiV1FilesData, GetApiV1FilesError, GetApiV1FilesErrors, GetApiV1FilesResponse, GetApiV1FilesResponses, GetApiV1HealthData, GetApiV1HealthError, GetApiV1HealthErrors, GetApiV1HealthResponse, GetApiV1HealthResponses, GetApiV1KnowledgeBasesByIdData, GetApiV1KnowledgeBasesByIdError, GetApiV1KnowledgeBasesByIdErrors, GetApiV1KnowledgeBasesByIdFilesData, GetApiV1KnowledgeBasesByIdFilesError, GetApiV1KnowledgeBasesByIdFilesErrors, GetApiV1KnowledgeBasesByIdFilesResponse, GetApiV1KnowledgeBasesByIdFilesResponses, GetApiV1KnowledgeBasesByIdResponse, GetApiV1KnowledgeBasesByIdResponses, GetApiV1KnowledgeBasesData, GetApiV1KnowledgeBasesError, GetApiV1KnowledgeBasesErrors, GetApiV1KnowledgeBasesResponse, GetApiV1KnowledgeBasesResponses, GetApiV1McpServersByIdData, GetApiV1McpServersByIdError, GetApiV1McpServersByIdErrors, GetApiV1McpServersByIdResponse, GetApiV1McpServersByIdResponses, GetApiV1McpServersData, GetApiV1McpServersError, GetApiV1McpServersErrors, GetApiV1McpServersResponse, GetApiV1McpServersResponses, GetApiV1MessagesByIdData, GetApiV1MessagesByIdError, GetApiV1MessagesByIdErrors, GetApiV1MessagesByIdResponse, GetApiV1MessagesByIdResponses, GetApiV1MessagesCountData, GetApiV1MessagesCountError, GetApiV1MessagesCountErrors, GetApiV1MessagesCountResponse, GetApiV1MessagesCountResponses, GetApiV1MessagesData, GetApiV1MessagesError, GetApiV1MessagesErrors, GetApiV1MessagesResponse, GetApiV1MessagesResponses, GetApiV1MessageTranslationsByMessageIdData, GetApiV1MessageTranslationsByMessageIdError, GetApiV1MessageTranslationsByMessageIdErrors, GetApiV1MessageTranslationsByMessageIdResponse, GetApiV1MessageTranslationsByMessageIdResponses, GetApiV1ModelsByProviderIdByModelIdData, GetApiV1ModelsByProviderIdByModelIdError, GetApiV1ModelsByProviderIdByModelIdErrors, GetApiV1ModelsByProviderIdByModelIdResponse, GetApiV1ModelsByProviderIdByModelIdResponses, GetApiV1ModelsData, GetApiV1ModelsError, GetApiV1ModelsErrors, GetApiV1ModelsResponse, GetApiV1ModelsResponses, GetApiV1PermissionsByIdData, GetApiV1PermissionsByIdError, GetApiV1PermissionsByIdErrors, GetApiV1PermissionsByIdResponse, GetApiV1PermissionsByIdResponses, GetApiV1PermissionsData, GetApiV1PermissionsError, GetApiV1PermissionsErrors, GetApiV1PermissionsResponse, GetApiV1PermissionsResponses, GetApiV1ProvidersByIdData, GetApiV1ProvidersByIdError, GetApiV1ProvidersByIdErrors, GetApiV1ProvidersByIdResponse, GetApiV1ProvidersByIdResponses, GetApiV1ProvidersData, GetApiV1ProvidersError, GetApiV1ProvidersErrors, GetApiV1ProvidersResponse, GetApiV1ProvidersResponses, GetApiV1RolesByIdData, GetApiV1RolesByIdError, GetApiV1RolesByIdErrors, GetApiV1RolesByIdPermissionsData, GetApiV1RolesByIdPermissionsError, GetApiV1RolesByIdPermissionsErrors, GetApiV1RolesByIdPermissionsResponse, GetApiV1RolesByIdPermissionsResponses, GetApiV1RolesByIdResponse, GetApiV1RolesByIdResponses, GetApiV1RolesData, GetApiV1RolesError, GetApiV1RolesErrors, GetApiV1RolesResponse, GetApiV1RolesResponses, GetApiV1TopicsByIdData, GetApiV1TopicsByIdError, GetApiV1TopicsByIdErrors, GetApiV1TopicsByIdResponse, GetApiV1TopicsByIdResponses, GetApiV1TopicsData, GetApiV1TopicsError, GetApiV1TopicsErrors, GetApiV1TopicsResponse, GetApiV1TopicsResponses, GetApiV1UsageData, GetApiV1UsageError, GetApiV1UsageErrors, GetApiV1UsageResponse, GetApiV1UsageResponses, GetApiV1UsersByIdData, GetApiV1UsersByIdError, GetApiV1UsersByIdErrors, GetApiV1UsersByIdResponse, GetApiV1UsersByIdResponses, GetApiV1UsersByIdRolesData, GetApiV1UsersByIdRolesError, GetApiV1UsersByIdRolesErrors, GetApiV1UsersByIdRolesResponse, GetApiV1UsersByIdRolesResponses, GetApiV1UsersData, GetApiV1UsersError, GetApiV1UsersErrors, GetApiV1UsersMeData, GetApiV1UsersMeError, GetApiV1UsersMeErrors, GetApiV1UsersMeResponse, GetApiV1UsersMeResponses, GetApiV1UsersResponse, GetApiV1UsersResponses, KnowledgeBase, McpServer, Message, Model, PatchApiV1AgentGroupsByIdData, PatchApiV1AgentGroupsByIdError, PatchApiV1AgentGroupsByIdErrors, PatchApiV1AgentGroupsByIdResponse, PatchApiV1AgentGroupsByIdResponses, PatchApiV1AgentsByIdData, PatchApiV1AgentsByIdError, PatchApiV1AgentsByIdErrors, PatchApiV1AgentsByIdResponse, PatchApiV1AgentsByIdResponses, PatchApiV1ApiKeysByIdData, PatchApiV1ApiKeysByIdError, PatchApiV1ApiKeysByIdErrors, PatchApiV1ApiKeysByIdResponse, PatchApiV1ApiKeysByIdResponses, PatchApiV1FilesByIdData, PatchApiV1FilesByIdError, PatchApiV1FilesByIdErrors, PatchApiV1FilesByIdResponse, PatchApiV1FilesByIdResponses, PatchApiV1KnowledgeBasesByIdData, PatchApiV1KnowledgeBasesByIdError, PatchApiV1KnowledgeBasesByIdErrors, PatchApiV1KnowledgeBasesByIdResponse, PatchApiV1KnowledgeBasesByIdResponses, PatchApiV1McpServersByIdData, PatchApiV1McpServersByIdError, PatchApiV1McpServersByIdErrors, PatchApiV1McpServersByIdResponse, PatchApiV1McpServersByIdResponses, PatchApiV1MessageTranslationsByMessageIdData, PatchApiV1MessageTranslationsByMessageIdError, PatchApiV1MessageTranslationsByMessageIdErrors, PatchApiV1MessageTranslationsByMessageIdResponse, PatchApiV1MessageTranslationsByMessageIdResponses, PatchApiV1ModelsByProviderIdByModelIdData, PatchApiV1ModelsByProviderIdByModelIdError, PatchApiV1ModelsByProviderIdByModelIdErrors, PatchApiV1ModelsByProviderIdByModelIdResponse, PatchApiV1ModelsByProviderIdByModelIdResponses, PatchApiV1PermissionsByIdData, PatchApiV1PermissionsByIdError, PatchApiV1PermissionsByIdErrors, PatchApiV1PermissionsByIdResponse, PatchApiV1PermissionsByIdResponses, PatchApiV1ProvidersByIdData, PatchApiV1ProvidersByIdError, PatchApiV1ProvidersByIdErrors, PatchApiV1ProvidersByIdResponse, PatchApiV1ProvidersByIdResponses, PatchApiV1RolesByIdData, PatchApiV1RolesByIdError, PatchApiV1RolesByIdErrors, PatchApiV1RolesByIdPermissionsData, PatchApiV1RolesByIdPermissionsError, PatchApiV1RolesByIdPermissionsErrors, PatchApiV1RolesByIdPermissionsResponse, PatchApiV1RolesByIdPermissionsResponses, PatchApiV1RolesByIdResponse, PatchApiV1RolesByIdResponses, PatchApiV1TopicsByIdData, PatchApiV1TopicsByIdError, PatchApiV1TopicsByIdErrors, PatchApiV1TopicsByIdResponse, PatchApiV1TopicsByIdResponses, PatchApiV1UsersByIdData, PatchApiV1UsersByIdError, PatchApiV1UsersByIdErrors, PatchApiV1UsersByIdResponse, PatchApiV1UsersByIdResponses, PatchApiV1UsersByIdRolesData, PatchApiV1UsersByIdRolesError, PatchApiV1UsersByIdRolesErrors, PatchApiV1UsersByIdRolesResponse, PatchApiV1UsersByIdRolesResponses, Permission, PostApiV1AgentGroupsData, PostApiV1AgentGroupsError, PostApiV1AgentGroupsErrors, PostApiV1AgentGroupsResponse, PostApiV1AgentGroupsResponses, PostApiV1AgentsData, PostApiV1AgentsError, PostApiV1AgentsErrors, PostApiV1AgentsResponse, PostApiV1AgentsResponses, PostApiV1ApiKeysData, PostApiV1ApiKeysError, PostApiV1ApiKeysErrors, PostApiV1ApiKeysResponse, PostApiV1ApiKeysResponses, PostApiV1ChatData, PostApiV1ChatError, PostApiV1ChatErrors, PostApiV1ChatGenerateReplyData, PostApiV1ChatGenerateReplyError, PostApiV1ChatGenerateReplyErrors, PostApiV1ChatGenerateReplyResponse, PostApiV1ChatGenerateReplyResponses, PostApiV1ChatResponse, PostApiV1ChatResponses, PostApiV1ChatTranslateData, PostApiV1ChatTranslateError, PostApiV1ChatTranslateErrors, PostApiV1ChatTranslateResponse, PostApiV1ChatTranslateResponses, PostApiV1EvalRunsData, PostApiV1EvalRunsError, PostApiV1EvalRunsErrors, PostApiV1EvalRunsResponse, PostApiV1EvalRunsResponses, PostApiV1FilesBatchesData, PostApiV1FilesBatchesError, PostApiV1FilesBatchesErrors, PostApiV1FilesBatchesResponse, PostApiV1FilesBatchesResponses, PostApiV1FilesByIdChunksData, PostApiV1FilesByIdChunksError, PostApiV1FilesByIdChunksErrors, PostApiV1FilesByIdChunksResponse, PostApiV1FilesByIdChunksResponses, PostApiV1FilesByIdParsesData, PostApiV1FilesByIdParsesError, PostApiV1FilesByIdParsesErrors, PostApiV1FilesByIdParsesResponse, PostApiV1FilesByIdParsesResponses, PostApiV1FilesData, PostApiV1FilesError, PostApiV1FilesErrors, PostApiV1FilesQueriesData, PostApiV1FilesQueriesError, PostApiV1FilesQueriesErrors, PostApiV1FilesQueriesResponse, PostApiV1FilesQueriesResponses, PostApiV1FilesResponse, PostApiV1FilesResponses, PostApiV1KnowledgeBasesByIdFilesBatchData, PostApiV1KnowledgeBasesByIdFilesBatchError, PostApiV1KnowledgeBasesByIdFilesBatchErrors, PostApiV1KnowledgeBasesByIdFilesBatchResponse, PostApiV1KnowledgeBasesByIdFilesBatchResponses, PostApiV1KnowledgeBasesByIdFilesMoveData, PostApiV1KnowledgeBasesByIdFilesMoveError, PostApiV1KnowledgeBasesByIdFilesMoveErrors, PostApiV1KnowledgeBasesByIdFilesMoveResponse, PostApiV1KnowledgeBasesByIdFilesMoveResponses, PostApiV1KnowledgeBasesData, PostApiV1KnowledgeBasesError, PostApiV1KnowledgeBasesErrors, PostApiV1KnowledgeBasesResponse, PostApiV1KnowledgeBasesResponses, PostApiV1McpServersByIdSyncData, PostApiV1McpServersByIdSyncError, PostApiV1McpServersByIdSyncErrors, PostApiV1McpServersByIdSyncResponse, PostApiV1McpServersByIdSyncResponses, PostApiV1McpServersData, PostApiV1McpServersError, PostApiV1McpServersErrors, PostApiV1McpServersResponse, PostApiV1McpServersResponses, PostApiV1MessagesData, PostApiV1MessagesError, PostApiV1MessagesErrors, PostApiV1MessagesRepliesData, PostApiV1MessagesRepliesError, PostApiV1MessagesRepliesErrors, PostApiV1MessagesRepliesResponse, PostApiV1MessagesRepliesResponses, PostApiV1MessagesResponse, PostApiV1MessagesResponses, PostApiV1MessageTranslationsByMessageIdData, PostApiV1MessageTranslationsByMessageIdError, PostApiV1MessageTranslationsByMessageIdErrors, PostApiV1MessageTranslationsByMessageIdResponse, PostApiV1MessageTranslationsByMessageIdResponses, PostApiV1ModelsData, PostApiV1ModelsError, PostApiV1ModelsErrors, PostApiV1ModelsResponse, PostApiV1ModelsResponses, PostApiV1PermissionsData, PostApiV1PermissionsError, PostApiV1PermissionsErrors, PostApiV1PermissionsResponse, PostApiV1PermissionsResponses, PostApiV1ProvidersData, PostApiV1ProvidersError, PostApiV1ProvidersErrors, PostApiV1ProvidersResponse, PostApiV1ProvidersResponses, PostApiV1ResponsesData, PostApiV1ResponsesError, PostApiV1ResponsesErrors, PostApiV1ResponsesResponse, PostApiV1ResponsesResponses, PostApiV1RolesData, PostApiV1RolesError, PostApiV1RolesErrors, PostApiV1RolesResponse, PostApiV1RolesResponses, PostApiV1TopicsData, PostApiV1TopicsError, PostApiV1TopicsErrors, PostApiV1TopicsResponse, PostApiV1TopicsResponses, PostApiV1UsersData, PostApiV1UsersError, PostApiV1UsersErrors, PostApiV1UsersResponse, PostApiV1UsersResponses, Provider, Role, Topic, Usage, User } from './types.gen';+export { AgentGroups, Agents, ApiKeys, Chat, Eval, Files, Health, KnowledgeBases, LobeHub, McpServers, Messages, MessageTranslations, Models, type Options, Permissions, Plugins, Providers, Responses, Roles, Topics, Usage as Usage2, Users } from './sdk.gen';+export type { Agent, AgentGroup, ApiError, ApiKey, ChatResponse, ClientOptions, DeleteApiV1AgentGroupsByIdData, DeleteApiV1AgentGroupsByIdError, DeleteApiV1AgentGroupsByIdErrors, DeleteApiV1AgentGroupsByIdResponse, DeleteApiV1AgentGroupsByIdResponses, DeleteApiV1AgentsByIdData, DeleteApiV1AgentsByIdError, DeleteApiV1AgentsByIdErrors, DeleteApiV1AgentsByIdResponse, DeleteApiV1AgentsByIdResponses, DeleteApiV1ApiKeysByIdData, DeleteApiV1ApiKeysByIdError, DeleteApiV1ApiKeysByIdErrors, DeleteApiV1ApiKeysByIdResponse, DeleteApiV1ApiKeysByIdResponses, DeleteApiV1EvalBenchmarksByIdData, DeleteApiV1EvalBenchmarksByIdError, DeleteApiV1EvalBenchmarksByIdErrors, DeleteApiV1EvalBenchmarksByIdResponse, DeleteApiV1EvalBenchmarksByIdResponses, DeleteApiV1EvalDatasetsByIdData, DeleteApiV1EvalDatasetsByIdError, DeleteApiV1EvalDatasetsByIdErrors, DeleteApiV1EvalDatasetsByIdResponse, DeleteApiV1EvalDatasetsByIdResponses, DeleteApiV1EvalTestCasesByIdData, DeleteApiV1EvalTestCasesByIdError, DeleteApiV1EvalTestCasesByIdErrors, DeleteApiV1EvalTestCasesByIdResponse, DeleteApiV1EvalTestCasesByIdResponses, DeleteApiV1FilesByIdData, DeleteApiV1FilesByIdError, DeleteApiV1FilesByIdErrors, DeleteApiV1FilesByIdResponse, DeleteApiV1FilesByIdResponses, DeleteApiV1KnowledgeBasesByIdData, DeleteApiV1KnowledgeBasesByIdError, DeleteApiV1KnowledgeBasesByIdErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchData, DeleteApiV1KnowledgeBasesByIdFilesBatchError, DeleteApiV1KnowledgeBasesByIdFilesBatchErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchResponse, DeleteApiV1KnowledgeBasesByIdFilesBatchResponses, DeleteApiV1KnowledgeBasesByIdResponse, DeleteApiV1KnowledgeBasesByIdResponses, DeleteApiV1McpServersByIdData, DeleteApiV1McpServersByIdError, DeleteApiV1McpServersByIdErrors, DeleteApiV1McpServersByIdResponse, DeleteApiV1McpServersByIdResponses, DeleteApiV1MessagesByIdData, DeleteApiV1MessagesByIdError, DeleteApiV1MessagesByIdErrors, DeleteApiV1MessagesByIdResponse, DeleteApiV1MessagesByIdResponses, DeleteApiV1MessagesData, DeleteApiV1MessagesError, DeleteApiV1MessagesErrors, DeleteApiV1MessagesResponse, DeleteApiV1MessagesResponses, DeleteApiV1MessageTranslationsByMessageIdData, DeleteApiV1MessageTranslationsByMessageIdError, DeleteApiV1MessageTranslationsByMessageIdErrors, DeleteApiV1MessageTranslationsByMessageIdResponse, DeleteApiV1MessageTranslationsByMessageIdResponses, DeleteApiV1PermissionsByIdData, DeleteApiV1PermissionsByIdError, DeleteApiV1PermissionsByIdErrors, DeleteApiV1PermissionsByIdResponse, DeleteApiV1PermissionsByIdResponses, DeleteApiV1ProvidersByIdData, DeleteApiV1ProvidersByIdError, DeleteApiV1ProvidersByIdErrors, DeleteApiV1ProvidersByIdResponse, DeleteApiV1ProvidersByIdResponses, DeleteApiV1RolesByIdData, DeleteApiV1RolesByIdError, DeleteApiV1RolesByIdErrors, DeleteApiV1RolesByIdPermissionsData, DeleteApiV1RolesByIdPermissionsError, DeleteApiV1RolesByIdPermissionsErrors, DeleteApiV1RolesByIdPermissionsResponse, DeleteApiV1RolesByIdPermissionsResponses, DeleteApiV1RolesByIdResponse, DeleteApiV1RolesByIdResponses, DeleteApiV1TopicsByIdData, DeleteApiV1TopicsByIdError, DeleteApiV1TopicsByIdErrors, DeleteApiV1TopicsByIdResponse, DeleteApiV1TopicsByIdResponses, DeleteApiV1UsersByIdData, DeleteApiV1UsersByIdError, DeleteApiV1UsersByIdErrors, DeleteApiV1UsersByIdResponse, DeleteApiV1UsersByIdResponses, DeleteApiV1UsersByIdRolesData, DeleteApiV1UsersByIdRolesError, DeleteApiV1UsersByIdRolesErrors, DeleteApiV1UsersByIdRolesResponse, DeleteApiV1UsersByIdRolesResponses, EvalRun, EvalRunResult, File, GetApiV1AgentGroupsByIdData, GetApiV1AgentGroupsByIdError, GetApiV1AgentGroupsByIdErrors, GetApiV1AgentGroupsByIdResponse, GetApiV1AgentGroupsByIdResponses, GetApiV1AgentGroupsData, GetApiV1AgentGroupsError, GetApiV1AgentGroupsErrors, GetApiV1AgentGroupsResponse, GetApiV1AgentGroupsResponses, GetApiV1AgentsByIdData, GetApiV1AgentsByIdError, GetApiV1AgentsByIdErrors, GetApiV1AgentsByIdResponse, GetApiV1AgentsByIdResponses, GetApiV1AgentsData, GetApiV1AgentsError, GetApiV1AgentsErrors, GetApiV1AgentsResponse, GetApiV1AgentsResponses, GetApiV1ApiKeysByIdData, GetApiV1ApiKeysByIdError, GetApiV1ApiKeysByIdErrors, GetApiV1ApiKeysByIdResponse, GetApiV1ApiKeysByIdResponses, GetApiV1ApiKeysData, GetApiV1ApiKeysError, GetApiV1ApiKeysErrors, GetApiV1ApiKeysResponse, GetApiV1ApiKeysResponses, GetApiV1EvalBenchmarksByIdData, GetApiV1EvalBenchmarksByIdError, GetApiV1EvalBenchmarksByIdErrors, GetApiV1EvalBenchmarksByIdResponse, GetApiV1EvalBenchmarksByIdResponses, GetApiV1EvalBenchmarksData, GetApiV1EvalBenchmarksError, GetApiV1EvalBenchmarksErrors, GetApiV1EvalBenchmarksResponse, GetApiV1EvalBenchmarksResponses, GetApiV1EvalDatasetsByDatasetIdTestCasesData, GetApiV1EvalDatasetsByDatasetIdTestCasesError, GetApiV1EvalDatasetsByDatasetIdTestCasesErrors, GetApiV1EvalDatasetsByDatasetIdTestCasesResponse, GetApiV1EvalDatasetsByDatasetIdTestCasesResponses, GetApiV1EvalDatasetsByIdData, GetApiV1EvalDatasetsByIdError, GetApiV1EvalDatasetsByIdErrors, GetApiV1EvalDatasetsByIdResponse, GetApiV1EvalDatasetsByIdResponses, GetApiV1EvalDatasetsData, GetApiV1EvalDatasetsError, GetApiV1EvalDatasetsErrors, GetApiV1EvalDatasetsResponse, GetApiV1EvalDatasetsResponses, GetApiV1EvalRunsByIdData, GetApiV1EvalRunsByIdError, GetApiV1EvalRunsByIdErrors, GetApiV1EvalRunsByIdResponse, GetApiV1EvalRunsByIdResponses, GetApiV1EvalRunsByIdResultsData, GetApiV1EvalRunsByIdResultsError, GetApiV1EvalRunsByIdResultsErrors, GetApiV1EvalRunsByIdResultsResponse, GetApiV1EvalRunsByIdResultsResponses, GetApiV1EvalRunsByIdTopicsData, GetApiV1EvalRunsByIdTopicsError, GetApiV1EvalRunsByIdTopicsErrors, GetApiV1EvalRunsByIdTopicsResponse, GetApiV1EvalRunsByIdTopicsResponses, GetApiV1EvalRunsData, GetApiV1EvalRunsError, GetApiV1EvalRunsErrors, GetApiV1EvalRunsResponse, GetApiV1EvalRunsResponses, GetApiV1EvalTestCasesByIdData, GetApiV1EvalTestCasesByIdError, GetApiV1EvalTestCasesByIdErrors, GetApiV1EvalTestCasesByIdResponse, GetApiV1EvalTestCasesByIdResponses, GetApiV1FilesByIdChunksData, GetApiV1FilesByIdChunksError, GetApiV1FilesByIdChunksErrors, GetApiV1FilesByIdChunksResponse, GetApiV1FilesByIdChunksResponses, GetApiV1FilesByIdData, GetApiV1FilesByIdError, GetApiV1FilesByIdErrors, GetApiV1FilesByIdResponse, GetApiV1FilesByIdResponses, GetApiV1FilesByIdUrlData, GetApiV1FilesByIdUrlError, GetApiV1FilesByIdUrlErrors, GetApiV1FilesByIdUrlResponse, GetApiV1FilesByIdUrlResponses, GetApiV1FilesData, GetApiV1FilesError, GetApiV1FilesErrors, GetApiV1FilesResponse, GetApiV1FilesResponses, GetApiV1HealthData, GetApiV1HealthError, GetApiV1HealthErrors, GetApiV1HealthResponse, GetApiV1HealthResponses, GetApiV1KnowledgeBasesByIdData, GetApiV1KnowledgeBasesByIdError, GetApiV1KnowledgeBasesByIdErrors, GetApiV1KnowledgeBasesByIdFilesData, GetApiV1KnowledgeBasesByIdFilesError, GetApiV1KnowledgeBasesByIdFilesErrors, GetApiV1KnowledgeBasesByIdFilesResponse, GetApiV1KnowledgeBasesByIdFilesResponses, GetApiV1KnowledgeBasesByIdResponse, GetApiV1KnowledgeBasesByIdResponses, GetApiV1KnowledgeBasesData, GetApiV1KnowledgeBasesError, GetApiV1KnowledgeBasesErrors, GetApiV1KnowledgeBasesResponse, GetApiV1KnowledgeBasesResponses, GetApiV1McpServersByIdData, GetApiV1McpServersByIdError, GetApiV1McpServersByIdErrors, GetApiV1McpServersByIdResponse, GetApiV1McpServersByIdResponses, GetApiV1McpServersData, GetApiV1McpServersError, GetApiV1McpServersErrors, GetApiV1McpServersResponse, GetApiV1McpServersResponses, GetApiV1MessagesByIdData, GetApiV1MessagesByIdError, GetApiV1MessagesByIdErrors, GetApiV1MessagesByIdResponse, GetApiV1MessagesByIdResponses, GetApiV1MessagesCountData, GetApiV1MessagesCountError, GetApiV1MessagesCountErrors, GetApiV1MessagesCountResponse, GetApiV1MessagesCountResponses, GetApiV1MessagesData, GetApiV1MessagesError, GetApiV1MessagesErrors, GetApiV1MessagesResponse, GetApiV1MessagesResponses, GetApiV1MessageTranslationsByMessageIdData, GetApiV1MessageTranslationsByMessageIdError, GetApiV1MessageTranslationsByMessageIdErrors, GetApiV1MessageTranslationsByMessageIdResponse, GetApiV1MessageTranslationsByMessageIdResponses, GetApiV1ModelsByProviderIdByModelIdData, GetApiV1ModelsByProviderIdByModelIdError, GetApiV1ModelsByProviderIdByModelIdErrors, GetApiV1ModelsByProviderIdByModelIdResponse, GetApiV1ModelsByProviderIdByModelIdResponses, GetApiV1ModelsData, GetApiV1ModelsError, GetApiV1ModelsErrors, GetApiV1ModelsResponse, GetApiV1ModelsResponses, GetApiV1PermissionsByIdData, GetApiV1PermissionsByIdError, GetApiV1PermissionsByIdErrors, GetApiV1PermissionsByIdResponse, GetApiV1PermissionsByIdResponses, GetApiV1PermissionsData, GetApiV1PermissionsError, GetApiV1PermissionsErrors, GetApiV1PermissionsResponse, GetApiV1PermissionsResponses, GetApiV1PluginsData, GetApiV1PluginsError, GetApiV1PluginsErrors, GetApiV1PluginsResponse, GetApiV1PluginsResponses, GetApiV1ProvidersByIdData, GetApiV1ProvidersByIdError, GetApiV1ProvidersByIdErrors, GetApiV1ProvidersByIdResponse, GetApiV1ProvidersByIdResponses, GetApiV1ProvidersData, GetApiV1ProvidersError, GetApiV1ProvidersErrors, GetApiV1ProvidersResponse, GetApiV1ProvidersResponses, GetApiV1RolesByIdData, GetApiV1RolesByIdError, GetApiV1RolesByIdErrors, GetApiV1RolesByIdPermissionsData, GetApiV1RolesByIdPermissionsError, GetApiV1RolesByIdPermissionsErrors, GetApiV1RolesByIdPermissionsResponse, GetApiV1RolesByIdPermissionsResponses, GetApiV1RolesByIdResponse, GetApiV1RolesByIdResponses, GetApiV1RolesData, GetApiV1RolesError, GetApiV1RolesErrors, GetApiV1RolesResponse, GetApiV1RolesResponses, GetApiV1TopicsByIdData, GetApiV1TopicsByIdError, GetApiV1TopicsByIdErrors, GetApiV1TopicsByIdResponse, GetApiV1TopicsByIdResponses, GetApiV1TopicsByTopicIdThreadsData, GetApiV1TopicsByTopicIdThreadsError, GetApiV1TopicsByTopicIdThreadsErrors, GetApiV1TopicsByTopicIdThreadsResponse, GetApiV1TopicsByTopicIdThreadsResponses, GetApiV1TopicsData, GetApiV1TopicsError, GetApiV1TopicsErrors, GetApiV1TopicsResponse, GetApiV1TopicsResponses, GetApiV1UsageData, GetApiV1UsageError, GetApiV1UsageErrors, GetApiV1UsageResponse, GetApiV1UsageResponses, GetApiV1UsersByIdData, GetApiV1UsersByIdError, GetApiV1UsersByIdErrors, GetApiV1UsersByIdResponse, GetApiV1UsersByIdResponses, GetApiV1UsersByIdRolesData, GetApiV1UsersByIdRolesError, GetApiV1UsersByIdRolesErrors, GetApiV1UsersByIdRolesResponse, GetApiV1UsersByIdRolesResponses, GetApiV1UsersData, GetApiV1UsersError, GetApiV1UsersErrors, GetApiV1UsersMeData, GetApiV1UsersMeError, GetApiV1UsersMeErrors, GetApiV1UsersMeResponse, GetApiV1UsersMeResponses, GetApiV1UsersResponse, GetApiV1UsersResponses, KnowledgeBase, McpServer, Message, Model, PatchApiV1AgentGroupsByIdData, PatchApiV1AgentGroupsByIdError, PatchApiV1AgentGroupsByIdErrors, PatchApiV1AgentGroupsByIdResponse, PatchApiV1AgentGroupsByIdResponses, PatchApiV1AgentsByIdData, PatchApiV1AgentsByIdError, PatchApiV1AgentsByIdErrors, PatchApiV1AgentsByIdResponse, PatchApiV1AgentsByIdResponses, PatchApiV1ApiKeysByIdData, PatchApiV1ApiKeysByIdError, PatchApiV1ApiKeysByIdErrors, PatchApiV1ApiKeysByIdResponse, PatchApiV1ApiKeysByIdResponses, PatchApiV1EvalBenchmarksByIdData, PatchApiV1EvalBenchmarksByIdError, PatchApiV1EvalBenchmarksByIdErrors, PatchApiV1EvalBenchmarksByIdResponse, PatchApiV1EvalBenchmarksByIdResponses, PatchApiV1EvalDatasetsByIdData, PatchApiV1EvalDatasetsByIdError, PatchApiV1EvalDatasetsByIdErrors, PatchApiV1EvalDatasetsByIdResponse, PatchApiV1EvalDatasetsByIdResponses, PatchApiV1EvalRunsByIdStatusData, PatchApiV1EvalRunsByIdStatusError, PatchApiV1EvalRunsByIdStatusErrors, PatchApiV1EvalRunsByIdStatusResponse, PatchApiV1EvalRunsByIdStatusResponses, PatchApiV1EvalTestCasesByIdData, PatchApiV1EvalTestCasesByIdError, PatchApiV1EvalTestCasesByIdErrors, PatchApiV1EvalTestCasesByIdResponse, PatchApiV1EvalTestCasesByIdResponses, PatchApiV1FilesByIdData, PatchApiV1FilesByIdError, PatchApiV1FilesByIdErrors, PatchApiV1FilesByIdResponse, PatchApiV1FilesByIdResponses, PatchApiV1KnowledgeBasesByIdData, PatchApiV1KnowledgeBasesByIdError, PatchApiV1KnowledgeBasesByIdErrors, PatchApiV1KnowledgeBasesByIdResponse, PatchApiV1KnowledgeBasesByIdResponses, PatchApiV1McpServersByIdData, PatchApiV1McpServersByIdError, PatchApiV1McpServersByIdErrors, PatchApiV1McpServersByIdResponse, PatchApiV1McpServersByIdResponses, PatchApiV1MessageTranslationsByMessageIdData, PatchApiV1MessageTranslationsByMessageIdError, PatchApiV1MessageTranslationsByMessageIdErrors, PatchApiV1MessageTranslationsByMessageIdResponse, PatchApiV1MessageTranslationsByMessageIdResponses, PatchApiV1ModelsByProviderIdByModelIdData, PatchApiV1ModelsByProviderIdByModelIdError, PatchApiV1ModelsByProviderIdByModelIdErrors, PatchApiV1ModelsByProviderIdByModelIdResponse, PatchApiV1ModelsByProviderIdByModelIdResponses, PatchApiV1PermissionsByIdData, PatchApiV1PermissionsByIdError, PatchApiV1PermissionsByIdErrors, PatchApiV1PermissionsByIdResponse, PatchApiV1PermissionsByIdResponses, PatchApiV1ProvidersByIdData, PatchApiV1ProvidersByIdError, PatchApiV1ProvidersByIdErrors, PatchApiV1ProvidersByIdResponse, PatchApiV1ProvidersByIdResponses, PatchApiV1RolesByIdData, PatchApiV1RolesByIdError, PatchApiV1RolesByIdErrors, PatchApiV1RolesByIdPermissionsData, PatchApiV1RolesByIdPermissionsError, PatchApiV1RolesByIdPermissionsErrors, PatchApiV1RolesByIdPermissionsResponse, PatchApiV1RolesByIdPermissionsResponses, PatchApiV1RolesByIdResponse, PatchApiV1RolesByIdResponses, PatchApiV1TopicsByIdData, PatchApiV1TopicsByIdError, PatchApiV1TopicsByIdErrors, PatchApiV1TopicsByIdResponse, PatchApiV1TopicsByIdResponses, PatchApiV1UsersByIdData, PatchApiV1UsersByIdError, PatchApiV1UsersByIdErrors, PatchApiV1UsersByIdResponse, PatchApiV1UsersByIdResponses, PatchApiV1UsersByIdRolesData, PatchApiV1UsersByIdRolesError, PatchApiV1UsersByIdRolesErrors, PatchApiV1UsersByIdRolesResponse, PatchApiV1UsersByIdRolesResponses, Permission, PostApiV1AgentGroupsData, PostApiV1AgentGroupsError, PostApiV1AgentGroupsErrors, PostApiV1AgentGroupsResponse, PostApiV1AgentGroupsResponses, PostApiV1AgentsByIdDuplicateData, PostApiV1AgentsByIdDuplicateError, PostApiV1AgentsByIdDuplicateErrors, PostApiV1AgentsByIdDuplicateResponse, PostApiV1AgentsByIdDuplicateResponses, PostApiV1AgentsData, PostApiV1AgentsError, PostApiV1AgentsErrors, PostApiV1AgentsResponse, PostApiV1AgentsResponses, PostApiV1ApiKeysData, PostApiV1ApiKeysError, PostApiV1ApiKeysErrors, PostApiV1ApiKeysResponse, PostApiV1ApiKeysResponses, PostApiV1ChatData, PostApiV1ChatError, PostApiV1ChatErrors, PostApiV1ChatGenerateReplyData, PostApiV1ChatGenerateReplyError, PostApiV1ChatGenerateReplyErrors, PostApiV1ChatGenerateReplyResponse, PostApiV1ChatGenerateReplyResponses, PostApiV1ChatResponse, PostApiV1ChatResponses, PostApiV1ChatTranslateData, PostApiV1ChatTranslateError, PostApiV1ChatTranslateErrors, PostApiV1ChatTranslateResponse, PostApiV1ChatTranslateResponses, PostApiV1EvalBenchmarksData, PostApiV1EvalBenchmarksError, PostApiV1EvalBenchmarksErrors, PostApiV1EvalBenchmarksResponse, PostApiV1EvalBenchmarksResponses, PostApiV1EvalDatasetsByDatasetIdTestCasesData, PostApiV1EvalDatasetsByDatasetIdTestCasesError, PostApiV1EvalDatasetsByDatasetIdTestCasesErrors, PostApiV1EvalDatasetsByDatasetIdTestCasesResponse, PostApiV1EvalDatasetsByDatasetIdTestCasesResponses, PostApiV1EvalDatasetsData, PostApiV1EvalDatasetsError, PostApiV1EvalDatasetsErrors, PostApiV1EvalDatasetsResponse, PostApiV1EvalDatasetsResponses, PostApiV1EvalRunsByIdClaimData, PostApiV1EvalRunsByIdClaimError, PostApiV1EvalRunsByIdClaimErrors, PostApiV1EvalRunsByIdClaimResponse, PostApiV1EvalRunsByIdClaimResponses, PostApiV1EvalRunsByIdResultsData, PostApiV1EvalRunsByIdResultsError, PostApiV1EvalRunsByIdResultsErrors, PostApiV1EvalRunsByIdResultsResponse, PostApiV1EvalRunsByIdResultsResponses, PostApiV1EvalRunsByIdRetryErrorsData, PostApiV1EvalRunsByIdRetryErrorsError, PostApiV1EvalRunsByIdRetryErrorsErrors, PostApiV1EvalRunsByIdRetryErrorsResponse, PostApiV1EvalRunsByIdRetryErrorsResponses, PostApiV1EvalRunsData, PostApiV1EvalRunsError, PostApiV1EvalRunsErrors, PostApiV1EvalRunsResponse, PostApiV1EvalRunsResponses, PostApiV1FilesBatchesData, PostApiV1FilesBatchesError, PostApiV1FilesBatchesErrors, PostApiV1FilesBatchesResponse, PostApiV1FilesBatchesResponses, PostApiV1FilesByIdChunksData, PostApiV1FilesByIdChunksError, PostApiV1FilesByIdChunksErrors, PostApiV1FilesByIdChunksResponse, PostApiV1FilesByIdChunksResponses, PostApiV1FilesByIdParsesData, PostApiV1FilesByIdParsesError, PostApiV1FilesByIdParsesErrors, PostApiV1FilesByIdParsesResponse, PostApiV1FilesByIdParsesResponses, PostApiV1FilesData, PostApiV1FilesError, PostApiV1FilesErrors, PostApiV1FilesQueriesData, PostApiV1FilesQueriesError, PostApiV1FilesQueriesErrors, PostApiV1FilesQueriesResponse, PostApiV1FilesQueriesResponses, PostApiV1FilesResponse, PostApiV1FilesResponses, PostApiV1KnowledgeBasesByIdFilesBatchData, PostApiV1KnowledgeBasesByIdFilesBatchError, PostApiV1KnowledgeBasesByIdFilesBatchErrors, PostApiV1KnowledgeBasesByIdFilesBatchResponse, PostApiV1KnowledgeBasesByIdFilesBatchResponses, PostApiV1KnowledgeBasesByIdFilesMoveData, PostApiV1KnowledgeBasesByIdFilesMoveError, PostApiV1KnowledgeBasesByIdFilesMoveErrors, PostApiV1KnowledgeBasesByIdFilesMoveResponse, PostApiV1KnowledgeBasesByIdFilesMoveResponses, PostApiV1KnowledgeBasesData, PostApiV1KnowledgeBasesError, PostApiV1KnowledgeBasesErrors, PostApiV1KnowledgeBasesResponse, PostApiV1KnowledgeBasesResponses, PostApiV1McpServersByIdSyncData, PostApiV1McpServersByIdSyncError, PostApiV1McpServersByIdSyncErrors, PostApiV1McpServersByIdSyncResponse, PostApiV1McpServersByIdSyncResponses, PostApiV1McpServersData, PostApiV1McpServersError, PostApiV1McpServersErrors, PostApiV1McpServersResponse, PostApiV1McpServersResponses, PostApiV1MessagesData, PostApiV1MessagesError, PostApiV1MessagesErrors, PostApiV1MessagesRepliesData, PostApiV1MessagesRepliesError, PostApiV1MessagesRepliesErrors, PostApiV1MessagesRepliesResponse, PostApiV1MessagesRepliesResponses, PostApiV1MessagesResponse, PostApiV1MessagesResponses, PostApiV1MessageTranslationsByMessageIdData, PostApiV1MessageTranslationsByMessageIdError, PostApiV1MessageTranslationsByMessageIdErrors, PostApiV1MessageTranslationsByMessageIdResponse, PostApiV1MessageTranslationsByMessageIdResponses, PostApiV1ModelsData, PostApiV1ModelsError, PostApiV1ModelsErrors, PostApiV1ModelsResponse, PostApiV1ModelsResponses, PostApiV1PermissionsData, PostApiV1PermissionsError, PostApiV1PermissionsErrors, PostApiV1PermissionsResponse, PostApiV1PermissionsResponses, PostApiV1ProvidersData, PostApiV1ProvidersError, PostApiV1ProvidersErrors, PostApiV1ProvidersResponse, PostApiV1ProvidersResponses, PostApiV1ResponsesData, PostApiV1ResponsesError, PostApiV1ResponsesErrors, PostApiV1ResponsesResponse, PostApiV1ResponsesResponses, PostApiV1RolesData, PostApiV1RolesError, PostApiV1RolesErrors, PostApiV1RolesResponse, PostApiV1RolesResponses, PostApiV1TopicsData, PostApiV1TopicsError, PostApiV1TopicsErrors, PostApiV1TopicsResponse, PostApiV1TopicsResponses, PostApiV1UsersData, PostApiV1UsersError, PostApiV1UsersErrors, PostApiV1UsersResponse, PostApiV1UsersResponses, Provider, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultData, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultError, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponse, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses, Role, Topic, Usage, User } from './types.gen';diff --git a/packages/sdk/src/generated/sdk.gen.ts b/packages/sdk/src/generated/sdk.gen.tsindex e73c6e6d181..46c33107610 100644--- a/packages/sdk/src/generated/sdk.gen.ts+++ b/packages/sdk/src/generated/sdk.gen.ts@@ -2,7 +2,7 @@import { type Client, type ClientMeta, formDataBodySerializer, type Options as Options2, type RequestResult, type TDataShape } from './client';import { client } from './client.gen';-import type { DeleteApiV1AgentGroupsByIdData, DeleteApiV1AgentGroupsByIdErrors, DeleteApiV1AgentGroupsByIdResponses, DeleteApiV1AgentsByIdData, DeleteApiV1AgentsByIdErrors, DeleteApiV1AgentsByIdResponses, DeleteApiV1ApiKeysByIdData, DeleteApiV1ApiKeysByIdErrors, DeleteApiV1ApiKeysByIdResponses, DeleteApiV1FilesByIdData, DeleteApiV1FilesByIdErrors, DeleteApiV1FilesByIdResponses, DeleteApiV1KnowledgeBasesByIdData, DeleteApiV1KnowledgeBasesByIdErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchData, DeleteApiV1KnowledgeBasesByIdFilesBatchErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchResponses, DeleteApiV1KnowledgeBasesByIdResponses, DeleteApiV1McpServersByIdData, DeleteApiV1McpServersByIdErrors, DeleteApiV1McpServersByIdResponses, DeleteApiV1MessagesByIdData, DeleteApiV1MessagesByIdErrors, DeleteApiV1MessagesByIdResponses, DeleteApiV1MessagesData, DeleteApiV1MessagesErrors, DeleteApiV1MessagesResponses, DeleteApiV1MessageTranslationsByMessageIdData, DeleteApiV1MessageTranslationsByMessageIdErrors, DeleteApiV1MessageTranslationsByMessageIdResponses, DeleteApiV1PermissionsByIdData, DeleteApiV1PermissionsByIdErrors, DeleteApiV1PermissionsByIdResponses, DeleteApiV1ProvidersByIdData, DeleteApiV1ProvidersByIdErrors, DeleteApiV1ProvidersByIdResponses, DeleteApiV1RolesByIdData, DeleteApiV1RolesByIdErrors, DeleteApiV1RolesByIdPermissionsData, DeleteApiV1RolesByIdPermissionsErrors, DeleteApiV1RolesByIdPermissionsResponses, DeleteApiV1RolesByIdResponses, DeleteApiV1TopicsByIdData, DeleteApiV1TopicsByIdErrors, DeleteApiV1TopicsByIdResponses, DeleteApiV1UsersByIdData, DeleteApiV1UsersByIdErrors, DeleteApiV1UsersByIdResponses, DeleteApiV1UsersByIdRolesData, DeleteApiV1UsersByIdRolesErrors, DeleteApiV1UsersByIdRolesResponses, GetApiV1AgentGroupsByIdData, GetApiV1AgentGroupsByIdErrors, GetApiV1AgentGroupsByIdResponses, GetApiV1AgentGroupsData, GetApiV1AgentGroupsErrors, GetApiV1AgentGroupsResponses, GetApiV1AgentsByIdData, GetApiV1AgentsByIdErrors, GetApiV1AgentsByIdResponses, GetApiV1AgentsData, GetApiV1AgentsErrors, GetApiV1AgentsResponses, GetApiV1ApiKeysByIdData, GetApiV1ApiKeysByIdErrors, GetApiV1ApiKeysByIdResponses, GetApiV1ApiKeysData, GetApiV1ApiKeysErrors, GetApiV1ApiKeysResponses, GetApiV1EvalRunsByIdData, GetApiV1EvalRunsByIdErrors, GetApiV1EvalRunsByIdResponses, GetApiV1EvalRunsByIdResultsData, GetApiV1EvalRunsByIdResultsErrors, GetApiV1EvalRunsByIdResultsResponses, GetApiV1FilesByIdChunksData, GetApiV1FilesByIdChunksErrors, GetApiV1FilesByIdChunksResponses, GetApiV1FilesByIdData, GetApiV1FilesByIdErrors, GetApiV1FilesByIdResponses, GetApiV1FilesByIdUrlData, GetApiV1FilesByIdUrlErrors, GetApiV1FilesByIdUrlResponses, GetApiV1FilesData, GetApiV1FilesErrors, GetApiV1FilesResponses, GetApiV1HealthData, GetApiV1HealthErrors, GetApiV1HealthResponses, GetApiV1KnowledgeBasesByIdData, GetApiV1KnowledgeBasesByIdErrors, GetApiV1KnowledgeBasesByIdFilesData, GetApiV1KnowledgeBasesByIdFilesErrors, GetApiV1KnowledgeBasesByIdFilesResponses, GetApiV1KnowledgeBasesByIdResponses, GetApiV1KnowledgeBasesData, GetApiV1KnowledgeBasesErrors, GetApiV1KnowledgeBasesResponses, GetApiV1McpServersByIdData, GetApiV1McpServersByIdErrors, GetApiV1McpServersByIdResponses, GetApiV1McpServersData, GetApiV1McpServersErrors, GetApiV1McpServersResponses, GetApiV1MessagesByIdData, GetApiV1MessagesByIdErrors, GetApiV1MessagesByIdResponses, GetApiV1MessagesCountData, GetApiV1MessagesCountErrors, GetApiV1MessagesCountResponses, GetApiV1MessagesData, GetApiV1MessagesErrors, GetApiV1MessagesResponses, GetApiV1MessageTranslationsByMessageIdData, GetApiV1MessageTranslationsByMessageIdErrors, GetApiV1MessageTranslationsByMessageIdResponses, GetApiV1ModelsByProviderIdByModelIdData, GetApiV1ModelsByProviderIdByModelIdErrors, GetApiV1ModelsByProviderIdByModelIdResponses, GetApiV1ModelsData, GetApiV1ModelsErrors, GetApiV1ModelsResponses, GetApiV1PermissionsByIdData, GetApiV1PermissionsByIdErrors, GetApiV1PermissionsByIdResponses, GetApiV1PermissionsData, GetApiV1PermissionsErrors, GetApiV1PermissionsResponses, GetApiV1ProvidersByIdData, GetApiV1ProvidersByIdErrors, GetApiV1ProvidersByIdResponses, GetApiV1ProvidersData, GetApiV1ProvidersErrors, GetApiV1ProvidersResponses, GetApiV1RolesByIdData, GetApiV1RolesByIdErrors, GetApiV1RolesByIdPermissionsData, GetApiV1RolesByIdPermissionsErrors, GetApiV1RolesByIdPermissionsResponses, GetApiV1RolesByIdResponses, GetApiV1RolesData, GetApiV1RolesErrors, GetApiV1RolesResponses, GetApiV1TopicsByIdData, GetApiV1TopicsByIdErrors, GetApiV1TopicsByIdResponses, GetApiV1TopicsData, GetApiV1TopicsErrors, GetApiV1TopicsResponses, GetApiV1UsageData, GetApiV1UsageErrors, GetApiV1UsageResponses, GetApiV1UsersByIdData, GetApiV1UsersByIdErrors, GetApiV1UsersByIdResponses, GetApiV1UsersByIdRolesData, GetApiV1UsersByIdRolesErrors, GetApiV1UsersByIdRolesResponses, GetApiV1UsersData, GetApiV1UsersErrors, GetApiV1UsersMeData, GetApiV1UsersMeErrors, GetApiV1UsersMeResponses, GetApiV1UsersResponses, PatchApiV1AgentGroupsByIdData, PatchApiV1AgentGroupsByIdErrors, PatchApiV1AgentGroupsByIdResponses, PatchApiV1AgentsByIdData, PatchApiV1AgentsByIdErrors, PatchApiV1AgentsByIdResponses, PatchApiV1ApiKeysByIdData, PatchApiV1ApiKeysByIdErrors, PatchApiV1ApiKeysByIdResponses, PatchApiV1FilesByIdData, PatchApiV1FilesByIdErrors, PatchApiV1FilesByIdResponses, PatchApiV1KnowledgeBasesByIdData, PatchApiV1KnowledgeBasesByIdErrors, PatchApiV1KnowledgeBasesByIdResponses, PatchApiV1McpServersByIdData, PatchApiV1McpServersByIdErrors, PatchApiV1McpServersByIdResponses, PatchApiV1MessageTranslationsByMessageIdData, PatchApiV1MessageTranslationsByMessageIdErrors, PatchApiV1MessageTranslationsByMessageIdResponses, PatchApiV1ModelsByProviderIdByModelIdData, PatchApiV1ModelsByProviderIdByModelIdErrors, PatchApiV1ModelsByProviderIdByModelIdResponses, PatchApiV1PermissionsByIdData, PatchApiV1PermissionsByIdErrors, PatchApiV1PermissionsByIdResponses, PatchApiV1ProvidersByIdData, PatchApiV1ProvidersByIdErrors, PatchApiV1ProvidersByIdResponses, PatchApiV1RolesByIdData, PatchApiV1RolesByIdErrors, PatchApiV1RolesByIdPermissionsData, PatchApiV1RolesByIdPermissionsErrors, PatchApiV1RolesByIdPermissionsResponses, PatchApiV1RolesByIdResponses, PatchApiV1TopicsByIdData, PatchApiV1TopicsByIdErrors, PatchApiV1TopicsByIdResponses, PatchApiV1UsersByIdData, PatchApiV1UsersByIdErrors, PatchApiV1UsersByIdResponses, PatchApiV1UsersByIdRolesData, PatchApiV1UsersByIdRolesErrors, PatchApiV1UsersByIdRolesResponses, PostApiV1AgentGroupsData, PostApiV1AgentGroupsErrors, PostApiV1AgentGroupsResponses, PostApiV1AgentsData, PostApiV1AgentsErrors, PostApiV1AgentsResponses, PostApiV1ApiKeysData, PostApiV1ApiKeysErrors, PostApiV1ApiKeysResponses, PostApiV1ChatData, PostApiV1ChatErrors, PostApiV1ChatGenerateReplyData, PostApiV1ChatGenerateReplyErrors, PostApiV1ChatGenerateReplyResponses, PostApiV1ChatResponses, PostApiV1ChatTranslateData, PostApiV1ChatTranslateErrors, PostApiV1ChatTranslateResponses, PostApiV1EvalRunsData, PostApiV1EvalRunsErrors, PostApiV1EvalRunsResponses, PostApiV1FilesBatchesData, PostApiV1FilesBatchesErrors, PostApiV1FilesBatchesResponses, PostApiV1FilesByIdChunksData, PostApiV1FilesByIdChunksErrors, PostApiV1FilesByIdChunksResponses, PostApiV1FilesByIdParsesData, PostApiV1FilesByIdParsesErrors, PostApiV1FilesByIdParsesResponses, PostApiV1FilesData, PostApiV1FilesErrors, PostApiV1FilesQueriesData, PostApiV1FilesQueriesErrors, PostApiV1FilesQueriesResponses, PostApiV1FilesResponses, PostApiV1KnowledgeBasesByIdFilesBatchData, PostApiV1KnowledgeBasesByIdFilesBatchErrors, PostApiV1KnowledgeBasesByIdFilesBatchResponses, PostApiV1KnowledgeBasesByIdFilesMoveData, PostApiV1KnowledgeBasesByIdFilesMoveErrors, PostApiV1KnowledgeBasesByIdFilesMoveResponses, PostApiV1KnowledgeBasesData, PostApiV1KnowledgeBasesErrors, PostApiV1KnowledgeBasesResponses, PostApiV1McpServersByIdSyncData, PostApiV1McpServersByIdSyncErrors, PostApiV1McpServersByIdSyncResponses, PostApiV1McpServersData, PostApiV1McpServersErrors, PostApiV1McpServersResponses, PostApiV1MessagesData, PostApiV1MessagesErrors, PostApiV1MessagesRepliesData, PostApiV1MessagesRepliesErrors, PostApiV1MessagesRepliesResponses, PostApiV1MessagesResponses, PostApiV1MessageTranslationsByMessageIdData, PostApiV1MessageTranslationsByMessageIdErrors, PostApiV1MessageTranslationsByMessageIdResponses, PostApiV1ModelsData, PostApiV1ModelsErrors, PostApiV1ModelsResponses, PostApiV1PermissionsData, PostApiV1PermissionsErrors, PostApiV1PermissionsResponses, PostApiV1ProvidersData, PostApiV1ProvidersErrors, PostApiV1ProvidersResponses, PostApiV1ResponsesData, PostApiV1ResponsesErrors, PostApiV1ResponsesResponses, PostApiV1RolesData, PostApiV1RolesErrors, PostApiV1RolesResponses, PostApiV1TopicsData, PostApiV1TopicsErrors, PostApiV1TopicsResponses, PostApiV1UsersData, PostApiV1UsersErrors, PostApiV1UsersResponses } from './types.gen';+import type { DeleteApiV1AgentGroupsByIdData, DeleteApiV1AgentGroupsByIdErrors, DeleteApiV1AgentGroupsByIdResponses, DeleteApiV1AgentsByIdData, DeleteApiV1AgentsByIdErrors, DeleteApiV1AgentsByIdResponses, DeleteApiV1ApiKeysByIdData, DeleteApiV1ApiKeysByIdErrors, DeleteApiV1ApiKeysByIdResponses, DeleteApiV1EvalBenchmarksByIdData, DeleteApiV1EvalBenchmarksByIdErrors, DeleteApiV1EvalBenchmarksByIdResponses, DeleteApiV1EvalDatasetsByIdData, DeleteApiV1EvalDatasetsByIdErrors, DeleteApiV1EvalDatasetsByIdResponses, DeleteApiV1EvalTestCasesByIdData, DeleteApiV1EvalTestCasesByIdErrors, DeleteApiV1EvalTestCasesByIdResponses, DeleteApiV1FilesByIdData, DeleteApiV1FilesByIdErrors, DeleteApiV1FilesByIdResponses, DeleteApiV1KnowledgeBasesByIdData, DeleteApiV1KnowledgeBasesByIdErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchData, DeleteApiV1KnowledgeBasesByIdFilesBatchErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchResponses, DeleteApiV1KnowledgeBasesByIdResponses, DeleteApiV1McpServersByIdData, DeleteApiV1McpServersByIdErrors, DeleteApiV1McpServersByIdResponses, DeleteApiV1MessagesByIdData, DeleteApiV1MessagesByIdErrors, DeleteApiV1MessagesByIdResponses, DeleteApiV1MessagesData, DeleteApiV1MessagesErrors, DeleteApiV1MessagesResponses, DeleteApiV1MessageTranslationsByMessageIdData, DeleteApiV1MessageTranslationsByMessageIdErrors, DeleteApiV1MessageTranslationsByMessageIdResponses, DeleteApiV1PermissionsByIdData, DeleteApiV1PermissionsByIdErrors, DeleteApiV1PermissionsByIdResponses, DeleteApiV1ProvidersByIdData, DeleteApiV1ProvidersByIdErrors, DeleteApiV1ProvidersByIdResponses, DeleteApiV1RolesByIdData, DeleteApiV1RolesByIdErrors, DeleteApiV1RolesByIdPermissionsData, DeleteApiV1RolesByIdPermissionsErrors, DeleteApiV1RolesByIdPermissionsResponses, DeleteApiV1RolesByIdResponses, DeleteApiV1TopicsByIdData, DeleteApiV1TopicsByIdErrors, DeleteApiV1TopicsByIdResponses, DeleteApiV1UsersByIdData, DeleteApiV1UsersByIdErrors, DeleteApiV1UsersByIdResponses, DeleteApiV1UsersByIdRolesData, DeleteApiV1UsersByIdRolesErrors, DeleteApiV1UsersByIdRolesResponses, GetApiV1AgentGroupsByIdData, GetApiV1AgentGroupsByIdErrors, GetApiV1AgentGroupsByIdResponses, GetApiV1AgentGroupsData, GetApiV1AgentGroupsErrors, GetApiV1AgentGroupsResponses, GetApiV1AgentsByIdData, GetApiV1AgentsByIdErrors, GetApiV1AgentsByIdResponses, GetApiV1AgentsData, GetApiV1AgentsErrors, GetApiV1AgentsResponses, GetApiV1ApiKeysByIdData, GetApiV1ApiKeysByIdErrors, GetApiV1ApiKeysByIdResponses, GetApiV1ApiKeysData, GetApiV1ApiKeysErrors, GetApiV1ApiKeysResponses, GetApiV1EvalBenchmarksByIdData, GetApiV1EvalBenchmarksByIdErrors, GetApiV1EvalBenchmarksByIdResponses, GetApiV1EvalBenchmarksData, GetApiV1EvalBenchmarksErrors, GetApiV1EvalBenchmarksResponses, GetApiV1EvalDatasetsByDatasetIdTestCasesData, GetApiV1EvalDatasetsByDatasetIdTestCasesErrors, GetApiV1EvalDatasetsByDatasetIdTestCasesResponses, GetApiV1EvalDatasetsByIdData, GetApiV1EvalDatasetsByIdErrors, GetApiV1EvalDatasetsByIdResponses, GetApiV1EvalDatasetsData, GetApiV1EvalDatasetsErrors, GetApiV1EvalDatasetsResponses, GetApiV1EvalRunsByIdData, GetApiV1EvalRunsByIdErrors, GetApiV1EvalRunsByIdResponses, GetApiV1EvalRunsByIdResultsData, GetApiV1EvalRunsByIdResultsErrors, GetApiV1EvalRunsByIdResultsResponses, GetApiV1EvalRunsByIdTopicsData, GetApiV1EvalRunsByIdTopicsErrors, GetApiV1EvalRunsByIdTopicsResponses, GetApiV1EvalRunsData, GetApiV1EvalRunsErrors, GetApiV1EvalRunsResponses, GetApiV1EvalTestCasesByIdData, GetApiV1EvalTestCasesByIdErrors, GetApiV1EvalTestCasesByIdResponses, GetApiV1FilesByIdChunksData, GetApiV1FilesByIdChunksErrors, GetApiV1FilesByIdChunksResponses, GetApiV1FilesByIdData, GetApiV1FilesByIdErrors, GetApiV1FilesByIdResponses, GetApiV1FilesByIdUrlData, GetApiV1FilesByIdUrlErrors, GetApiV1FilesByIdUrlResponses, GetApiV1FilesData, GetApiV1FilesErrors, GetApiV1FilesResponses, GetApiV1HealthData, GetApiV1HealthErrors, GetApiV1HealthResponses, GetApiV1KnowledgeBasesByIdData, GetApiV1KnowledgeBasesByIdErrors, GetApiV1KnowledgeBasesByIdFilesData, GetApiV1KnowledgeBasesByIdFilesErrors, GetApiV1KnowledgeBasesByIdFilesResponses, GetApiV1KnowledgeBasesByIdResponses, GetApiV1KnowledgeBasesData, GetApiV1KnowledgeBasesErrors, GetApiV1KnowledgeBasesResponses, GetApiV1McpServersByIdData, GetApiV1McpServersByIdErrors, GetApiV1McpServersByIdResponses, GetApiV1McpServersData, GetApiV1McpServersErrors, GetApiV1McpServersResponses, GetApiV1MessagesByIdData, GetApiV1MessagesByIdErrors, GetApiV1MessagesByIdResponses, GetApiV1MessagesCountData, GetApiV1MessagesCountErrors, GetApiV1MessagesCountResponses, GetApiV1MessagesData, GetApiV1MessagesErrors, GetApiV1MessagesResponses, GetApiV1MessageTranslationsByMessageIdData, GetApiV1MessageTranslationsByMessageIdErrors, GetApiV1MessageTranslationsByMessageIdResponses, GetApiV1ModelsByProviderIdByModelIdData, GetApiV1ModelsByProviderIdByModelIdErrors, GetApiV1ModelsByProviderIdByModelIdResponses, GetApiV1ModelsData, GetApiV1ModelsErrors, GetApiV1ModelsResponses, GetApiV1PermissionsByIdData, GetApiV1PermissionsByIdErrors, GetApiV1PermissionsByIdResponses, GetApiV1PermissionsData, GetApiV1PermissionsErrors, GetApiV1PermissionsResponses, GetApiV1PluginsData, GetApiV1PluginsErrors, GetApiV1PluginsResponses, GetApiV1ProvidersByIdData, GetApiV1ProvidersByIdErrors, GetApiV1ProvidersByIdResponses, GetApiV1ProvidersData, GetApiV1ProvidersErrors, GetApiV1ProvidersResponses, GetApiV1RolesByIdData, GetApiV1RolesByIdErrors, GetApiV1RolesByIdPermissionsData, GetApiV1RolesByIdPermissionsErrors, GetApiV1RolesByIdPermissionsResponses, GetApiV1RolesByIdResponses, GetApiV1RolesData, GetApiV1RolesErrors, GetApiV1RolesResponses, GetApiV1TopicsByIdData, GetApiV1TopicsByIdErrors, GetApiV1TopicsByIdResponses, GetApiV1TopicsByTopicIdThreadsData, GetApiV1TopicsByTopicIdThreadsErrors, GetApiV1TopicsByTopicIdThreadsResponses, GetApiV1TopicsData, GetApiV1TopicsErrors, GetApiV1TopicsResponses, GetApiV1UsageData, GetApiV1UsageErrors, GetApiV1UsageResponses, GetApiV1UsersByIdData, GetApiV1UsersByIdErrors, GetApiV1UsersByIdResponses, GetApiV1UsersByIdRolesData, GetApiV1UsersByIdRolesErrors, GetApiV1UsersByIdRolesResponses, GetApiV1UsersData, GetApiV1UsersErrors, GetApiV1UsersMeData, GetApiV1UsersMeErrors, GetApiV1UsersMeResponses, GetApiV1UsersResponses, PatchApiV1AgentGroupsByIdData, PatchApiV1AgentGroupsByIdErrors, PatchApiV1AgentGroupsByIdResponses, PatchApiV1AgentsByIdData, PatchApiV1AgentsByIdErrors, PatchApiV1AgentsByIdResponses, PatchApiV1ApiKeysByIdData, PatchApiV1ApiKeysByIdErrors, PatchApiV1ApiKeysByIdResponses, PatchApiV1EvalBenchmarksByIdData, PatchApiV1EvalBenchmarksByIdErrors, PatchApiV1EvalBenchmarksByIdResponses, PatchApiV1EvalDatasetsByIdData, PatchApiV1EvalDatasetsByIdErrors, PatchApiV1EvalDatasetsByIdResponses, PatchApiV1EvalRunsByIdStatusData, PatchApiV1EvalRunsByIdStatusErrors, PatchApiV1EvalRunsByIdStatusResponses, PatchApiV1EvalTestCasesByIdData, PatchApiV1EvalTestCasesByIdErrors, PatchApiV1EvalTestCasesByIdResponses, PatchApiV1FilesByIdData, PatchApiV1FilesByIdErrors, PatchApiV1FilesByIdResponses, PatchApiV1KnowledgeBasesByIdData, PatchApiV1KnowledgeBasesByIdErrors, PatchApiV1KnowledgeBasesByIdResponses, PatchApiV1McpServersByIdData, PatchApiV1McpServersByIdErrors, PatchApiV1McpServersByIdResponses, PatchApiV1MessageTranslationsByMessageIdData, PatchApiV1MessageTranslationsByMessageIdErrors, PatchApiV1MessageTranslationsByMessageIdResponses, PatchApiV1ModelsByProviderIdByModelIdData, PatchApiV1ModelsByProviderIdByModelIdErrors, PatchApiV1ModelsByProviderIdByModelIdResponses, PatchApiV1PermissionsByIdData, PatchApiV1PermissionsByIdErrors, PatchApiV1PermissionsByIdResponses, PatchApiV1ProvidersByIdData, PatchApiV1ProvidersByIdErrors, PatchApiV1ProvidersByIdResponses, PatchApiV1RolesByIdData, PatchApiV1RolesByIdErrors, PatchApiV1RolesByIdPermissionsData, PatchApiV1RolesByIdPermissionsErrors, PatchApiV1RolesByIdPermissionsResponses, PatchApiV1RolesByIdResponses, PatchApiV1TopicsByIdData, PatchApiV1TopicsByIdErrors, PatchApiV1TopicsByIdResponses, PatchApiV1UsersByIdData, PatchApiV1UsersByIdErrors, PatchApiV1UsersByIdResponses, PatchApiV1UsersByIdRolesData, PatchApiV1UsersByIdRolesErrors, PatchApiV1UsersByIdRolesResponses, PostApiV1AgentGroupsData, PostApiV1AgentGroupsErrors, PostApiV1AgentGroupsResponses, PostApiV1AgentsByIdDuplicateData, PostApiV1AgentsByIdDuplicateErrors, PostApiV1AgentsByIdDuplicateResponses, PostApiV1AgentsData, PostApiV1AgentsErrors, PostApiV1AgentsResponses, PostApiV1ApiKeysData, PostApiV1ApiKeysErrors, PostApiV1ApiKeysResponses, PostApiV1ChatData, PostApiV1ChatErrors, PostApiV1ChatGenerateReplyData, PostApiV1ChatGenerateReplyErrors, PostApiV1ChatGenerateReplyResponses, PostApiV1ChatResponses, PostApiV1ChatTranslateData, PostApiV1ChatTranslateErrors, PostApiV1ChatTranslateResponses, PostApiV1EvalBenchmarksData, PostApiV1EvalBenchmarksErrors, PostApiV1EvalBenchmarksResponses, PostApiV1EvalDatasetsByDatasetIdTestCasesData, PostApiV1EvalDatasetsByDatasetIdTestCasesErrors, PostApiV1EvalDatasetsByDatasetIdTestCasesResponses, PostApiV1EvalDatasetsData, PostApiV1EvalDatasetsErrors, PostApiV1EvalDatasetsResponses, PostApiV1EvalRunsByIdClaimData, PostApiV1EvalRunsByIdClaimErrors, PostApiV1EvalRunsByIdClaimResponses, PostApiV1EvalRunsByIdResultsData, PostApiV1EvalRunsByIdResultsErrors, PostApiV1EvalRunsByIdResultsResponses, PostApiV1EvalRunsByIdRetryErrorsData, PostApiV1EvalRunsByIdRetryErrorsErrors, PostApiV1EvalRunsByIdRetryErrorsResponses, PostApiV1EvalRunsData, PostApiV1EvalRunsErrors, PostApiV1EvalRunsResponses, PostApiV1FilesBatchesData, PostApiV1FilesBatchesErrors, PostApiV1FilesBatchesResponses, PostApiV1FilesByIdChunksData, PostApiV1FilesByIdChunksErrors, PostApiV1FilesByIdChunksResponses, PostApiV1FilesByIdParsesData, PostApiV1FilesByIdParsesErrors, PostApiV1FilesByIdParsesResponses, PostApiV1FilesData, PostApiV1FilesErrors, PostApiV1FilesQueriesData, PostApiV1FilesQueriesErrors, PostApiV1FilesQueriesResponses, PostApiV1FilesResponses, PostApiV1KnowledgeBasesByIdFilesBatchData, PostApiV1KnowledgeBasesByIdFilesBatchErrors, PostApiV1KnowledgeBasesByIdFilesBatchResponses, PostApiV1KnowledgeBasesByIdFilesMoveData, PostApiV1KnowledgeBasesByIdFilesMoveErrors, PostApiV1KnowledgeBasesByIdFilesMoveResponses, PostApiV1KnowledgeBasesData, PostApiV1KnowledgeBasesErrors, PostApiV1KnowledgeBasesResponses, PostApiV1McpServersByIdSyncData, PostApiV1McpServersByIdSyncErrors, PostApiV1McpServersByIdSyncResponses, PostApiV1McpServersData, PostApiV1McpServersErrors, PostApiV1McpServersResponses, PostApiV1MessagesData, PostApiV1MessagesErrors, PostApiV1MessagesRepliesData, PostApiV1MessagesRepliesErrors, PostApiV1MessagesRepliesResponses, PostApiV1MessagesResponses, PostApiV1MessageTranslationsByMessageIdData, PostApiV1MessageTranslationsByMessageIdErrors, PostApiV1MessageTranslationsByMessageIdResponses, PostApiV1ModelsData, PostApiV1ModelsErrors, PostApiV1ModelsResponses, PostApiV1PermissionsData, PostApiV1PermissionsErrors, PostApiV1PermissionsResponses, PostApiV1ProvidersData, PostApiV1ProvidersErrors, PostApiV1ProvidersResponses, PostApiV1ResponsesData, PostApiV1ResponsesErrors, PostApiV1ResponsesResponses, PostApiV1RolesData, PostApiV1RolesErrors, PostApiV1RolesResponses, PostApiV1TopicsData, PostApiV1TopicsErrors, PostApiV1TopicsResponses, PostApiV1UsersData, PostApiV1UsersErrors, PostApiV1UsersResponses, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultData, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses } from './types.gen';const mergeMethodHeaders = (defaults: Record<string, unknown>,@@ -163,6 +163,18 @@ export class Agents extends HeyApiClient {headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)});}++ /**+ * Duplicate agent+ */+ public createDuplicate<ThrowOnError extends boolean = false>(options: Options<PostApiV1AgentsByIdDuplicateData, ThrowOnError>): RequestResult<PostApiV1AgentsByIdDuplicateResponses, PostApiV1AgentsByIdDuplicateErrors, ThrowOnError> {+ return (options.client ?? this.client).post<PostApiV1AgentsByIdDuplicateResponses, PostApiV1AgentsByIdDuplicateErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/agents/{id}/duplicate',+ ...options,+ headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)+ });+ }}export class ApiKeys extends HeyApiClient {@@ -242,6 +254,17 @@ export class Chat extends HeyApiClient {}export class Eval extends HeyApiClient {+ /**+ * List eval runs+ */+ public listRuns<ThrowOnError extends boolean = false>(options?: Options<GetApiV1EvalRunsData, ThrowOnError>): RequestResult<GetApiV1EvalRunsResponses, GetApiV1EvalRunsErrors, ThrowOnError> {+ return (options?.client ?? this.client).get<GetApiV1EvalRunsResponses, GetApiV1EvalRunsErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/runs',+ ...options+ });+ }+/*** Create an eval run*@@ -256,6 +279,17 @@ export class Eval extends HeyApiClient {});}+ /**+ * List topic results of an eval run+ */+ public listRunsTopics<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalRunsByIdTopicsData, ThrowOnError>): RequestResult<GetApiV1EvalRunsByIdTopicsResponses, GetApiV1EvalRunsByIdTopicsErrors, ThrowOnError> {+ return (options.client ?? this.client).get<GetApiV1EvalRunsByIdTopicsResponses, GetApiV1EvalRunsByIdTopicsErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/runs/{id}/topics',+ ...options+ });+ }+public getRuns<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalRunsByIdData, ThrowOnError>): RequestResult<GetApiV1EvalRunsByIdResponses, GetApiV1EvalRunsByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1EvalRunsByIdResponses, GetApiV1EvalRunsByIdErrors, ThrowOnError>({security: [{ scheme: 'bearer', type: 'http' }],@@ -271,6 +305,288 @@ export class Eval extends HeyApiClient {...options});}++ /**+ * reportBatch+ *+ * Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.+ */+ public createRunsResults<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalRunsByIdResultsData, ThrowOnError>): RequestResult<PostApiV1EvalRunsByIdResultsResponses, PostApiV1EvalRunsByIdResultsErrors, ThrowOnError> {+ return (options.client ?? this.client).post<PostApiV1EvalRunsByIdResultsResponses, PostApiV1EvalRunsByIdResultsErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/runs/{id}/results',+ ...options,+ headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)+ });+ }++ /**+ * listBenchmarks+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public listBenchmarks<ThrowOnError extends boolean = false>(options?: Options<GetApiV1EvalBenchmarksData, ThrowOnError>): RequestResult<GetApiV1EvalBenchmarksResponses, GetApiV1EvalBenchmarksErrors, ThrowOnError> {+ return (options?.client ?? this.client).get<GetApiV1EvalBenchmarksResponses, GetApiV1EvalBenchmarksErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/benchmarks',+ ...options+ });+ }++ /**+ * createBenchmark+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public createBenchmarks<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalBenchmarksData, ThrowOnError>): RequestResult<PostApiV1EvalBenchmarksResponses, PostApiV1EvalBenchmarksErrors, ThrowOnError> {+ return (options.client ?? this.client).post<PostApiV1EvalBenchmarksResponses, PostApiV1EvalBenchmarksErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/benchmarks',+ ...options,+ headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)+ });+ }++ /**+ * deleteBenchmark+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public deleteBenchmarks<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1EvalBenchmarksByIdData, ThrowOnError>): RequestResult<DeleteApiV1EvalBenchmarksByIdResponses, DeleteApiV1EvalBenchmarksByIdErrors, ThrowOnError> {+ return (options.client ?? this.client).delete<DeleteApiV1EvalBenchmarksByIdResponses, DeleteApiV1EvalBenchmarksByIdErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/benchmarks/{id}',+ ...options+ });+ }++ /**+ * getBenchmark+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public getBenchmarks<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalBenchmarksByIdData, ThrowOnError>): RequestResult<GetApiV1EvalBenchmarksByIdResponses, GetApiV1EvalBenchmarksByIdErrors, ThrowOnError> {+ return (options.client ?? this.client).get<GetApiV1EvalBenchmarksByIdResponses, GetApiV1EvalBenchmarksByIdErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/benchmarks/{id}',+ ...options+ });+ }++ /**+ * updateBenchmark+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public updateBenchmarks<ThrowOnError extends boolean = false>(options: Options<PatchApiV1EvalBenchmarksByIdData, ThrowOnError>): RequestResult<PatchApiV1EvalBenchmarksByIdResponses, PatchApiV1EvalBenchmarksByIdErrors, ThrowOnError> {+ return (options.client ?? this.client).patch<PatchApiV1EvalBenchmarksByIdResponses, PatchApiV1EvalBenchmarksByIdErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/benchmarks/{id}',+ ...options,+ headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)+ });+ }++ /**+ * listDatasets+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public listDatasets<ThrowOnError extends boolean = false>(options?: Options<GetApiV1EvalDatasetsData, ThrowOnError>): RequestResult<GetApiV1EvalDatasetsResponses, GetApiV1EvalDatasetsErrors, ThrowOnError> {+ return (options?.client ?? this.client).get<GetApiV1EvalDatasetsResponses, GetApiV1EvalDatasetsErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/datasets',+ ...options+ });+ }++ /**+ * createDataset+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public createDatasets<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalDatasetsData, ThrowOnError>): RequestResult<PostApiV1EvalDatasetsResponses, PostApiV1EvalDatasetsErrors, ThrowOnError> {+ return (options.client ?? this.client).post<PostApiV1EvalDatasetsResponses, PostApiV1EvalDatasetsErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/datasets',+ ...options,+ headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)+ });+ }++ /**+ * deleteDataset+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public deleteDatasets<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1EvalDatasetsByIdData, ThrowOnError>): RequestResult<DeleteApiV1EvalDatasetsByIdResponses, DeleteApiV1EvalDatasetsByIdErrors, ThrowOnError> {+ return (options.client ?? this.client).delete<DeleteApiV1EvalDatasetsByIdResponses, DeleteApiV1EvalDatasetsByIdErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/datasets/{id}',+ ...options+ });+ }++ /**+ * getDataset+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public getDatasets<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalDatasetsByIdData, ThrowOnError>): RequestResult<GetApiV1EvalDatasetsByIdResponses, GetApiV1EvalDatasetsByIdErrors, ThrowOnError> {+ return (options.client ?? this.client).get<GetApiV1EvalDatasetsByIdResponses, GetApiV1EvalDatasetsByIdErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/datasets/{id}',+ ...options+ });+ }++ /**+ * updateDataset+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public updateDatasets<ThrowOnError extends boolean = false>(options: Options<PatchApiV1EvalDatasetsByIdData, ThrowOnError>): RequestResult<PatchApiV1EvalDatasetsByIdResponses, PatchApiV1EvalDatasetsByIdErrors, ThrowOnError> {+ return (options.client ?? this.client).patch<PatchApiV1EvalDatasetsByIdResponses, PatchApiV1EvalDatasetsByIdErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/datasets/{id}',+ ...options,+ headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)+ });+ }++ /**+ * listTestCases+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public listDatasetsTestCases<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalDatasetsByDatasetIdTestCasesData, ThrowOnError>): RequestResult<GetApiV1EvalDatasetsByDatasetIdTestCasesResponses, GetApiV1EvalDatasetsByDatasetIdTestCasesErrors, ThrowOnError> {+ return (options.client ?? this.client).get<GetApiV1EvalDatasetsByDatasetIdTestCasesResponses, GetApiV1EvalDatasetsByDatasetIdTestCasesErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/datasets/{datasetId}/test-cases',+ ...options+ });+ }++ /**+ * createTestCase+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public createDatasetsTestCases<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalDatasetsByDatasetIdTestCasesData, ThrowOnError>): RequestResult<PostApiV1EvalDatasetsByDatasetIdTestCasesResponses, PostApiV1EvalDatasetsByDatasetIdTestCasesErrors, ThrowOnError> {+ return (options.client ?? this.client).post<PostApiV1EvalDatasetsByDatasetIdTestCasesResponses, PostApiV1EvalDatasetsByDatasetIdTestCasesErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/datasets/{datasetId}/test-cases',+ ...options,+ headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)+ });+ }++ /**+ * deleteTestCase+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public deleteTestCases<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1EvalTestCasesByIdData, ThrowOnError>): RequestResult<DeleteApiV1EvalTestCasesByIdResponses, DeleteApiV1EvalTestCasesByIdErrors, ThrowOnError> {+ return (options.client ?? this.client).delete<DeleteApiV1EvalTestCasesByIdResponses, DeleteApiV1EvalTestCasesByIdErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/test-cases/{id}',+ ...options+ });+ }++ /**+ * getTestCase+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public getTestCases<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalTestCasesByIdData, ThrowOnError>): RequestResult<GetApiV1EvalTestCasesByIdResponses, GetApiV1EvalTestCasesByIdErrors, ThrowOnError> {+ return (options.client ?? this.client).get<GetApiV1EvalTestCasesByIdResponses, GetApiV1EvalTestCasesByIdErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/test-cases/{id}',+ ...options+ });+ }++ /**+ * updateTestCase+ *+ * Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ */+ public updateTestCases<ThrowOnError extends boolean = false>(options: Options<PatchApiV1EvalTestCasesByIdData, ThrowOnError>): RequestResult<PatchApiV1EvalTestCasesByIdResponses, PatchApiV1EvalTestCasesByIdErrors, ThrowOnError> {+ return (options.client ?? this.client).patch<PatchApiV1EvalTestCasesByIdResponses, PatchApiV1EvalTestCasesByIdErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/test-cases/{id}',+ ...options,+ headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)+ });+ }++ /**+ * claim+ *+ * Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.+ */+ public createRunsClaim<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalRunsByIdClaimData, ThrowOnError>): RequestResult<PostApiV1EvalRunsByIdClaimResponses, PostApiV1EvalRunsByIdClaimErrors, ThrowOnError> {+ return (options.client ?? this.client).post<PostApiV1EvalRunsByIdClaimResponses, PostApiV1EvalRunsByIdClaimErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/runs/{id}/claim',+ ...options+ });+ }++ /**+ * setStatus+ *+ * Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.+ */+ public updateRunsStatus<ThrowOnError extends boolean = false>(options: Options<PatchApiV1EvalRunsByIdStatusData, ThrowOnError>): RequestResult<PatchApiV1EvalRunsByIdStatusResponses, PatchApiV1EvalRunsByIdStatusErrors, ThrowOnError> {+ return (options.client ?? this.client).patch<PatchApiV1EvalRunsByIdStatusResponses, PatchApiV1EvalRunsByIdStatusErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/runs/{id}/status',+ ...options,+ headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)+ });+ }++ /**+ * retryErrors+ *+ * Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.+ */+ public createRunsRetryErrors<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalRunsByIdRetryErrorsData, ThrowOnError>): RequestResult<PostApiV1EvalRunsByIdRetryErrorsResponses, PostApiV1EvalRunsByIdRetryErrorsErrors, ThrowOnError> {+ return (options.client ?? this.client).post<PostApiV1EvalRunsByIdRetryErrorsResponses, PostApiV1EvalRunsByIdRetryErrorsErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/runs/{id}/retry-errors',+ ...options+ });+ }++ /**+ * report+ *+ * Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.+ */+ public updateRunsTopicsResult<ThrowOnError extends boolean = false>(options: Options<PutApiV1EvalRunsByRunIdTopicsByTopicIdResultData, ThrowOnError>): RequestResult<PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors, ThrowOnError> {+ return (options.client ?? this.client).put<PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/eval/runs/{runId}/topics/{topicId}/result',+ ...options,+ headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)+ });+ }+}++export class Plugins extends HeyApiClient {+ /**+ * List installed plugins in the current workspace or personal scope+ */+ public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1PluginsData, ThrowOnError>): RequestResult<GetApiV1PluginsResponses, GetApiV1PluginsErrors, ThrowOnError> {+ return (options?.client ?? this.client).get<GetApiV1PluginsResponses, GetApiV1PluginsErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/plugins',+ ...options+ });+ }}export class Files extends HeyApiClient {@@ -859,6 +1175,17 @@ export class Topics extends HeyApiClient {headers: mergeMethodHeaders({ 'Content-Type': 'application/json' }, options.headers)});}++ /**+ * List topic threads+ */+ public listThreads<ThrowOnError extends boolean = false>(options: Options<GetApiV1TopicsByTopicIdThreadsData, ThrowOnError>): RequestResult<GetApiV1TopicsByTopicIdThreadsResponses, GetApiV1TopicsByTopicIdThreadsErrors, ThrowOnError> {+ return (options.client ?? this.client).get<GetApiV1TopicsByTopicIdThreadsResponses, GetApiV1TopicsByTopicIdThreadsErrors, ThrowOnError>({+ security: [{ scheme: 'bearer', type: 'http' }],+ url: '/api/v1/topics/{topicId}/threads',+ ...options+ });+ }}export class Users extends HeyApiClient {@@ -995,6 +1322,11 @@ export class LobeHub extends HeyApiClient {return this._eval ??= new Eval({ client: this.client });}+ private _plugins?: Plugins;+ get plugins(): Plugins {+ return this._plugins ??= new Plugins({ client: this.client });+ }+private _files?: Files;get files(): Files {return this._files ??= new Files({ client: this.client });diff --git a/packages/sdk/src/generated/types.gen.ts b/packages/sdk/src/generated/types.gen.tsindex 32e5a48389f..71309053a17 100644--- a/packages/sdk/src/generated/types.gen.ts+++ b/packages/sdk/src/generated/types.gen.ts@@ -17,7 +17,7 @@ export type ApiKey = {id: string;lastUsedAt?: string | null;name: string;- scopes?: Array<'*' | 'agent:read' | 'agent:write' | 'chat:read' | 'chat:write' | 'model:invoke' | 'model:read' | 'model:write' | 'file:read' | 'file:write' | 'knowledge:read' | 'knowledge:write' | 'mcp:read' | 'mcp:write' | 'usage:read' | 'workspace:read' | 'workspace:write' | 'user:read' | 'user:write'> | null;+ scopes?: Array<'*' | 'agent:read' | 'agent:write' | 'eval:read' | 'eval:write' | 'chat:read' | 'chat:write' | 'model:invoke' | 'model:read' | 'model:write' | 'file:read' | 'file:write' | 'knowledge:read' | 'knowledge:write' | 'mcp:read' | 'mcp:write' | 'usage:read' | 'workspace:read' | 'workspace:write' | 'user:read' | 'user:write'> | null;updatedAt: string;};@@ -33,6 +33,10 @@ export type Agent = {params?: {[key: string]: unknown;} | null;+ plugins?: Array<{+ identifier: string;+ mode: 'pinned' | 'auto' | 'disabled';+ }>;provider?: string | null;slug?: string | null;systemRole?: string | null;@@ -437,9 +441,13 @@ export type PostApiV1AgentGroupsData = {export type PostApiV1AgentGroupsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -499,9 +507,13 @@ export type DeleteApiV1AgentGroupsByIdData = {export type DeleteApiV1AgentGroupsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -557,9 +569,13 @@ export type GetApiV1AgentGroupsByIdData = {export type GetApiV1AgentGroupsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -616,9 +632,13 @@ export type PatchApiV1AgentGroupsByIdData = {export type PatchApiV1AgentGroupsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -674,9 +694,13 @@ export type GetApiV1AgentsData = {export type GetApiV1AgentsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -794,6 +818,10 @@ export type PostApiV1AgentsData = {} | null;description?: string | null;model?: string | null;+ plugins?: Array<{+ identifier: string;+ mode?: 'pinned' | 'auto' | 'disabled';+ }>;params?: {[key: string]: unknown;} | null;@@ -808,9 +836,13 @@ export type PostApiV1AgentsData = {export type PostApiV1AgentsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -864,9 +896,13 @@ export type DeleteApiV1AgentsByIdData = {export type DeleteApiV1AgentsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -922,9 +958,13 @@ export type GetApiV1AgentsByIdData = {export type GetApiV1AgentsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1038,6 +1078,10 @@ export type PatchApiV1AgentsByIdData = {} | null;description?: string | null;model?: string | null;+ plugins?: Array<{+ identifier: string;+ mode?: 'pinned' | 'auto' | 'disabled';+ }>;params?: {[key: string]: unknown;} | null;@@ -1054,9 +1098,13 @@ export type PatchApiV1AgentsByIdData = {export type PatchApiV1AgentsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1099,6 +1147,70 @@ export type PatchApiV1AgentsByIdResponses = {export type PatchApiV1AgentsByIdResponse = PatchApiV1AgentsByIdResponses[keyof PatchApiV1AgentsByIdResponses];+export type PostApiV1AgentsByIdDuplicateData = {+ body: {+ title?: string;+ };+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/agents/{id}/duplicate';+};++export type PostApiV1AgentsByIdDuplicateErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PostApiV1AgentsByIdDuplicateError = PostApiV1AgentsByIdDuplicateErrors[keyof PostApiV1AgentsByIdDuplicateErrors];++export type PostApiV1AgentsByIdDuplicateResponses = {+ /**+ * Successful response+ */+ 201: {+ data?: {+ [key: string]: unknown;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PostApiV1AgentsByIdDuplicateResponse = PostApiV1AgentsByIdDuplicateResponses[keyof PostApiV1AgentsByIdDuplicateResponses];+export type GetApiV1ApiKeysData = {body?: never;path?: never;@@ -1157,7 +1269,7 @@ export type PostApiV1ApiKeysData = {body: {expiresAt?: string | null;name: string;- scopes?: Array<'*' | 'agent:read' | 'agent:write' | 'chat:read' | 'chat:write' | 'model:invoke' | 'model:read' | 'model:write' | 'file:read' | 'file:write' | 'knowledge:read' | 'knowledge:write' | 'mcp:read' | 'mcp:write' | 'usage:read' | 'workspace:read' | 'workspace:write' | 'user:read' | 'user:write'> | null;+ scopes?: Array<'*' | 'agent:read' | 'agent:write' | 'eval:read' | 'eval:write' | 'chat:read' | 'chat:write' | 'model:invoke' | 'model:read' | 'model:write' | 'file:read' | 'file:write' | 'knowledge:read' | 'knowledge:write' | 'mcp:read' | 'mcp:write' | 'usage:read' | 'workspace:read' | 'workspace:write' | 'user:read' | 'user:write'> | null;};path?: never;query?: never;@@ -1166,9 +1278,13 @@ export type PostApiV1ApiKeysData = {export type PostApiV1ApiKeysErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1213,7 +1329,7 @@ export type PostApiV1ApiKeysResponses = {id: string;lastUsedAt?: string | null;name: string;- scopes?: Array<'*' | 'agent:read' | 'agent:write' | 'chat:read' | 'chat:write' | 'model:invoke' | 'model:read' | 'model:write' | 'file:read' | 'file:write' | 'knowledge:read' | 'knowledge:write' | 'mcp:read' | 'mcp:write' | 'usage:read' | 'workspace:read' | 'workspace:write' | 'user:read' | 'user:write'> | null;+ scopes?: Array<'*' | 'agent:read' | 'agent:write' | 'eval:read' | 'eval:write' | 'chat:read' | 'chat:write' | 'model:invoke' | 'model:read' | 'model:write' | 'file:read' | 'file:write' | 'knowledge:read' | 'knowledge:write' | 'mcp:read' | 'mcp:write' | 'usage:read' | 'workspace:read' | 'workspace:write' | 'user:read' | 'user:write'> | null;updatedAt: string;key: string;};@@ -1236,9 +1352,13 @@ export type DeleteApiV1ApiKeysByIdData = {export type DeleteApiV1ApiKeysByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1294,9 +1414,13 @@ export type GetApiV1ApiKeysByIdData = {export type GetApiV1ApiKeysByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1354,9 +1478,13 @@ export type PatchApiV1ApiKeysByIdData = {export type PatchApiV1ApiKeysByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1421,9 +1549,13 @@ export type PostApiV1ChatData = {export type PostApiV1ChatErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1481,9 +1613,13 @@ export type PostApiV1ChatTranslateData = {export type PostApiV1ChatTranslateErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1563,9 +1699,13 @@ export type PostApiV1ChatGenerateReplyData = {export type PostApiV1ChatGenerateReplyErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1610,13 +1750,109 @@ export type PostApiV1ChatGenerateReplyResponses = {export type PostApiV1ChatGenerateReplyResponse = PostApiV1ChatGenerateReplyResponses[keyof PostApiV1ChatGenerateReplyResponses];+export type GetApiV1EvalRunsData = {+ body?: never;+ path?: never;+ query?: {+ limit?: number;+ offset?: number;+ page?: number;+ pageSize?: number;+ experimentId?: string;+ datasetId?: string;+ status?: 'idle' | 'pending' | 'running' | 'completed' | 'failed' | 'aborted' | 'external';+ };+ url: '/api/v1/eval/runs';+};++export type GetApiV1EvalRunsErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type GetApiV1EvalRunsError = GetApiV1EvalRunsErrors[keyof GetApiV1EvalRunsErrors];++export type GetApiV1EvalRunsResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ runs: Array<{+ id: string;+ createdAt: string;+ updatedAt: string;+ config: {+ [key: string]: unknown;+ };+ executionMode: 'internal' | 'external';+ datasetId: string;+ experimentId: string | null;+ parentRunId: string | null;+ status: 'idle' | 'pending' | 'running' | 'external' | 'completed' | 'failed' | 'aborted';+ targetAgentId: string | null;+ name: string | null;+ metrics: {+ [key: string]: unknown;+ } | null;+ startedAt: string | null;+ }>;+ total: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type GetApiV1EvalRunsResponse = GetApiV1EvalRunsResponses[keyof GetApiV1EvalRunsResponses];+export type PostApiV1EvalRunsData = {body: {config?: {+ maxConcurrency?: number;+ caseSelection?: {+ mode: 'all';+ } | {+ mode: 'include' | 'exclude';+ caseIds: Array<string>;+ };k?: number;maxSteps?: number;timeout?: number;};+ executionMode?: 'internal' | 'external';+ experimentId?: string;datasetId: string;id?: string;name?: string;@@ -1629,9 +1865,13 @@ export type PostApiV1EvalRunsData = {export type PostApiV1EvalRunsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1665,7 +1905,25 @@ export type PostApiV1EvalRunsResponses = {* Successful response*/202: {- data?: EvalRun;+ data?: {+ id: string;+ createdAt: string;+ updatedAt: string;+ config: {+ [key: string]: unknown;+ };+ executionMode: 'internal' | 'external';+ datasetId: string;+ experimentId: string | null;+ parentRunId: string | null;+ status: 'idle' | 'pending' | 'running' | 'external' | 'completed' | 'failed' | 'aborted';+ targetAgentId: string | null;+ name: string | null;+ metrics: {+ [key: string]: unknown;+ } | null;+ startedAt: string | null;+ };message?: string;success: true;timestamp: string;@@ -1674,20 +1932,29 @@ export type PostApiV1EvalRunsResponses = {export type PostApiV1EvalRunsResponse = PostApiV1EvalRunsResponses[keyof PostApiV1EvalRunsResponses];-export type GetApiV1EvalRunsByIdData = {+export type GetApiV1EvalRunsByIdTopicsData = {body?: never;path: {id: string;};- query?: never;- url: '/api/v1/eval/runs/{id}';+ query?: {+ limit?: number;+ offset?: number;+ page?: number;+ pageSize?: number;+ };+ url: '/api/v1/eval/runs/{id}/topics';};-export type GetApiV1EvalRunsByIdErrors = {+export type GetApiV1EvalRunsByIdTopicsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1714,36 +1981,56 @@ export type GetApiV1EvalRunsByIdErrors = {500: ApiError;};-export type GetApiV1EvalRunsByIdError = GetApiV1EvalRunsByIdErrors[keyof GetApiV1EvalRunsByIdErrors];+export type GetApiV1EvalRunsByIdTopicsError = GetApiV1EvalRunsByIdTopicsErrors[keyof GetApiV1EvalRunsByIdTopicsErrors];-export type GetApiV1EvalRunsByIdResponses = {+export type GetApiV1EvalRunsByIdTopicsResponses = {/*** Successful response*/200: {- data?: EvalRun;+ data?: {+ topics: Array<{+ createdAt: string;+ evalResult: {+ [key: string]: unknown;+ } | null;+ passed: boolean | null;+ runId: string;+ score: number | null;+ status: string | null;+ testCaseId: string;+ topicId: string;+ input: string;+ }>;+ total: number;+ runId: string;+ };message?: string;success: true;timestamp: string;};};-export type GetApiV1EvalRunsByIdResponse = GetApiV1EvalRunsByIdResponses[keyof GetApiV1EvalRunsByIdResponses];+export type GetApiV1EvalRunsByIdTopicsResponse = GetApiV1EvalRunsByIdTopicsResponses[keyof GetApiV1EvalRunsByIdTopicsResponses];-export type GetApiV1EvalRunsByIdResultsData = {+export type GetApiV1EvalRunsByIdData = {body?: never;path: {id: string;};query?: never;- url: '/api/v1/eval/runs/{id}/results';+ url: '/api/v1/eval/runs/{id}';};-export type GetApiV1EvalRunsByIdResultsErrors = {+export type GetApiV1EvalRunsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1770,17 +2057,31 @@ export type GetApiV1EvalRunsByIdResultsErrors = {500: ApiError;};-export type GetApiV1EvalRunsByIdResultsError = GetApiV1EvalRunsByIdResultsErrors[keyof GetApiV1EvalRunsByIdResultsErrors];+export type GetApiV1EvalRunsByIdError = GetApiV1EvalRunsByIdErrors[keyof GetApiV1EvalRunsByIdErrors];-export type GetApiV1EvalRunsByIdResultsResponses = {+export type GetApiV1EvalRunsByIdResponses = {/*** Successful response*/200: {data?: {- results: Array<EvalRunResult>;- runId: string;- total: number;+ id: string;+ createdAt: string;+ updatedAt: string;+ config: {+ [key: string]: unknown;+ };+ executionMode: 'internal' | 'external';+ datasetId: string;+ experimentId: string | null;+ parentRunId: string | null;+ status: 'idle' | 'pending' | 'running' | 'external' | 'completed' | 'failed' | 'aborted';+ targetAgentId: string | null;+ name: string | null;+ metrics: {+ [key: string]: unknown;+ } | null;+ startedAt: string | null;};message?: string;success: true;@@ -1788,30 +2089,31 @@ export type GetApiV1EvalRunsByIdResultsResponses = {};};-export type GetApiV1EvalRunsByIdResultsResponse = GetApiV1EvalRunsByIdResultsResponses[keyof GetApiV1EvalRunsByIdResultsResponses];+export type GetApiV1EvalRunsByIdResponse = GetApiV1EvalRunsByIdResponses[keyof GetApiV1EvalRunsByIdResponses];-export type GetApiV1FilesData = {+export type GetApiV1EvalRunsByIdResultsData = {body?: never;- path?: never;+ path: {+ id: string;+ };query?: {- keyword?: string;- page?: string;- pageSize?: string;- fileType?: string;- knowledgeBaseId?: string;- queryAll?: string;- updatedAtEnd?: string;- updatedAtStart?: string;- userId?: string;+ limit?: number;+ offset?: number;+ page?: number;+ pageSize?: number;};- url: '/api/v1/files';+ url: '/api/v1/eval/runs/{id}/results';};-export type GetApiV1FilesErrors = {+export type GetApiV1EvalRunsByIdResultsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1838,17 +2140,28 @@ export type GetApiV1FilesErrors = {500: ApiError;};-export type GetApiV1FilesError = GetApiV1FilesErrors[keyof GetApiV1FilesErrors];+export type GetApiV1EvalRunsByIdResultsError = GetApiV1EvalRunsByIdResultsErrors[keyof GetApiV1EvalRunsByIdResultsErrors];-export type GetApiV1FilesResponses = {+export type GetApiV1EvalRunsByIdResultsResponses = {/*** Successful response*/200: {data?: {- files: Array<File>;- total?: number;- [key: string]: unknown;+ results: Array<{+ createdAt: string;+ passed: boolean | null;+ score: number | null;+ status: string | null;+ testCaseId: string;+ topicId: string;+ input: string;+ result: {+ [key: string]: unknown;+ } | null;+ }>;+ total: number;+ runId: string;};message?: string;success: true;@@ -1856,14 +2169,2397 @@ export type GetApiV1FilesResponses = {};};-export type GetApiV1FilesResponse = GetApiV1FilesResponses[keyof GetApiV1FilesResponses];+export type GetApiV1EvalRunsByIdResultsResponse = GetApiV1EvalRunsByIdResultsResponses[keyof GetApiV1EvalRunsByIdResultsResponses];-export type PostApiV1FilesData = {+export type PostApiV1EvalRunsByIdResultsData = {body: {- agentId?: string;- directory?: string;- file: Blob | File;- knowledgeBaseId?: string;+ items: Array<{+ testCaseId?: string;+ correct: boolean;+ score: number;+ result?: {+ [key: string]: unknown;+ };+ threadId?: string;+ topicId: string;+ }>;+ };+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/runs/{id}/results';+};++export type PostApiV1EvalRunsByIdResultsErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PostApiV1EvalRunsByIdResultsError = PostApiV1EvalRunsByIdResultsErrors[keyof PostApiV1EvalRunsByIdResultsErrors];++export type PostApiV1EvalRunsByIdResultsResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ items: Array<{+ idempotent: boolean;+ reportedThreads: number;+ runId: string;+ runStatus?: string;+ success: boolean;+ threadId?: string;+ topicFinalized: boolean;+ topicId: string;+ totalThreads: number;+ }>;+ runId: string;+ runStatus: string;+ success: boolean;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PostApiV1EvalRunsByIdResultsResponse = PostApiV1EvalRunsByIdResultsResponses[keyof PostApiV1EvalRunsByIdResultsResponses];++export type GetApiV1EvalBenchmarksData = {+ body?: never;+ path?: never;+ query?: {+ limit?: number;+ offset?: number;+ page?: number;+ pageSize?: number;+ };+ url: '/api/v1/eval/benchmarks';+};++export type GetApiV1EvalBenchmarksErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type GetApiV1EvalBenchmarksError = GetApiV1EvalBenchmarksErrors[keyof GetApiV1EvalBenchmarksErrors];++export type GetApiV1EvalBenchmarksResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ benchmarks: Array<{+ id: string;+ identifier: string;+ name: string;+ description: string | null;+ metadata: {+ [key: string]: unknown;+ } | null;+ referenceUrl: string | null;+ rubrics: Array<{+ id: string;+ name: string;+ type: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ weight: number;+ threshold?: number;+ extractor?: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ config: {+ value: string;+ threshold?: number;+ } | {+ value: number;+ tolerance?: number;+ } | {+ pattern: string;+ } | {+ code: string;+ } | {+ criteria: string;+ model?: string;+ provider?: string;+ systemRole?: string;+ } | {+ values: Array<string>;+ caseSensitive?: boolean;+ } | {+ schema: {+ [key: string]: unknown;+ };+ } | {+ extractor: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ innerMatcher?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ };+ }>;+ createdAt: string;+ updatedAt: string;+ isSystem: boolean;+ }>;+ total: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type GetApiV1EvalBenchmarksResponse = GetApiV1EvalBenchmarksResponses[keyof GetApiV1EvalBenchmarksResponses];++export type PostApiV1EvalBenchmarksData = {+ body: {+ id?: string;+ identifier: string;+ name: string;+ description?: string | null;+ metadata?: {+ [key: string]: unknown;+ } | null;+ referenceUrl?: string | null;+ rubrics?: Array<{+ id: string;+ name: string;+ type: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ weight: number;+ threshold?: number;+ extractor?: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ config: {+ value: string;+ threshold?: number;+ } | {+ value: number;+ tolerance?: number;+ } | {+ pattern: string;+ } | {+ code: string;+ } | {+ criteria: string;+ model?: string;+ provider?: string;+ systemRole?: string;+ } | {+ values: Array<string>;+ caseSensitive?: boolean;+ } | {+ schema: {+ [key: string]: unknown;+ };+ } | {+ extractor: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ innerMatcher?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ };+ }>;+ };+ path?: never;+ query?: never;+ url: '/api/v1/eval/benchmarks';+};++export type PostApiV1EvalBenchmarksErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PostApiV1EvalBenchmarksError = PostApiV1EvalBenchmarksErrors[keyof PostApiV1EvalBenchmarksErrors];++export type PostApiV1EvalBenchmarksResponses = {+ /**+ * Successful response+ */+ 201: {+ data?: {+ id: string;+ identifier: string;+ name: string;+ description: string | null;+ metadata: {+ [key: string]: unknown;+ } | null;+ referenceUrl: string | null;+ rubrics: Array<{+ id: string;+ name: string;+ type: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ weight: number;+ threshold?: number;+ extractor?: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ config: {+ value: string;+ threshold?: number;+ } | {+ value: number;+ tolerance?: number;+ } | {+ pattern: string;+ } | {+ code: string;+ } | {+ criteria: string;+ model?: string;+ provider?: string;+ systemRole?: string;+ } | {+ values: Array<string>;+ caseSensitive?: boolean;+ } | {+ schema: {+ [key: string]: unknown;+ };+ } | {+ extractor: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ innerMatcher?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ };+ }>;+ createdAt: string;+ updatedAt: string;+ isSystem: boolean;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PostApiV1EvalBenchmarksResponse = PostApiV1EvalBenchmarksResponses[keyof PostApiV1EvalBenchmarksResponses];++export type DeleteApiV1EvalBenchmarksByIdData = {+ body?: never;+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/benchmarks/{id}';+};++export type DeleteApiV1EvalBenchmarksByIdErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type DeleteApiV1EvalBenchmarksByIdError = DeleteApiV1EvalBenchmarksByIdErrors[keyof DeleteApiV1EvalBenchmarksByIdErrors];++export type DeleteApiV1EvalBenchmarksByIdResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type DeleteApiV1EvalBenchmarksByIdResponse = DeleteApiV1EvalBenchmarksByIdResponses[keyof DeleteApiV1EvalBenchmarksByIdResponses];++export type GetApiV1EvalBenchmarksByIdData = {+ body?: never;+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/benchmarks/{id}';+};++export type GetApiV1EvalBenchmarksByIdErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type GetApiV1EvalBenchmarksByIdError = GetApiV1EvalBenchmarksByIdErrors[keyof GetApiV1EvalBenchmarksByIdErrors];++export type GetApiV1EvalBenchmarksByIdResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ identifier: string;+ name: string;+ description: string | null;+ metadata: {+ [key: string]: unknown;+ } | null;+ referenceUrl: string | null;+ rubrics: Array<{+ id: string;+ name: string;+ type: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ weight: number;+ threshold?: number;+ extractor?: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ config: {+ value: string;+ threshold?: number;+ } | {+ value: number;+ tolerance?: number;+ } | {+ pattern: string;+ } | {+ code: string;+ } | {+ criteria: string;+ model?: string;+ provider?: string;+ systemRole?: string;+ } | {+ values: Array<string>;+ caseSensitive?: boolean;+ } | {+ schema: {+ [key: string]: unknown;+ };+ } | {+ extractor: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ innerMatcher?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ };+ }>;+ createdAt: string;+ updatedAt: string;+ isSystem: boolean;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type GetApiV1EvalBenchmarksByIdResponse = GetApiV1EvalBenchmarksByIdResponses[keyof GetApiV1EvalBenchmarksByIdResponses];++export type PatchApiV1EvalBenchmarksByIdData = {+ body: {+ identifier?: string;+ name?: string;+ description?: string | null;+ metadata?: {+ [key: string]: unknown;+ } | null;+ referenceUrl?: string | null;+ rubrics?: Array<{+ id: string;+ name: string;+ type: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ weight: number;+ threshold?: number;+ extractor?: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ config: {+ value: string;+ threshold?: number;+ } | {+ value: number;+ tolerance?: number;+ } | {+ pattern: string;+ } | {+ code: string;+ } | {+ criteria: string;+ model?: string;+ provider?: string;+ systemRole?: string;+ } | {+ values: Array<string>;+ caseSensitive?: boolean;+ } | {+ schema: {+ [key: string]: unknown;+ };+ } | {+ extractor: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ innerMatcher?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ };+ }>;+ };+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/benchmarks/{id}';+};++export type PatchApiV1EvalBenchmarksByIdErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PatchApiV1EvalBenchmarksByIdError = PatchApiV1EvalBenchmarksByIdErrors[keyof PatchApiV1EvalBenchmarksByIdErrors];++export type PatchApiV1EvalBenchmarksByIdResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ identifier: string;+ name: string;+ description: string | null;+ metadata: {+ [key: string]: unknown;+ } | null;+ referenceUrl: string | null;+ rubrics: Array<{+ id: string;+ name: string;+ type: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ weight: number;+ threshold?: number;+ extractor?: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ config: {+ value: string;+ threshold?: number;+ } | {+ value: number;+ tolerance?: number;+ } | {+ pattern: string;+ } | {+ code: string;+ } | {+ criteria: string;+ model?: string;+ provider?: string;+ systemRole?: string;+ } | {+ values: Array<string>;+ caseSensitive?: boolean;+ } | {+ schema: {+ [key: string]: unknown;+ };+ } | {+ extractor: {+ type: 'regex';+ pattern: string;+ group?: number;+ } | {+ type: 'delimiter';+ delimiter: string;+ position?: 'first' | 'last';+ } | {+ type: 'last-line';+ trim?: boolean;+ } | {+ type: 'choice-index';+ labels?: Array<string>;+ pattern?: string;+ };+ innerMatcher?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external';+ };+ }>;+ createdAt: string;+ updatedAt: string;+ isSystem: boolean;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PatchApiV1EvalBenchmarksByIdResponse = PatchApiV1EvalBenchmarksByIdResponses[keyof PatchApiV1EvalBenchmarksByIdResponses];++export type GetApiV1EvalDatasetsData = {+ body?: never;+ path?: never;+ query?: {+ limit?: number;+ offset?: number;+ page?: number;+ pageSize?: number;+ benchmarkId?: string;+ };+ url: '/api/v1/eval/datasets';+};++export type GetApiV1EvalDatasetsErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type GetApiV1EvalDatasetsError = GetApiV1EvalDatasetsErrors[keyof GetApiV1EvalDatasetsErrors];++export type GetApiV1EvalDatasetsResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ datasets: Array<{+ id: string;+ identifier: string;+ name: string;+ benchmarkId: string | null;+ description: string | null;+ metadata: {+ [key: string]: unknown;+ } | null;+ evalConfig: {+ [key: string]: unknown;+ } | null;+ evalMode: string | null;+ createdAt: string;+ updatedAt: string;+ sourceExperimentId: string | null;+ testCaseCount: number;+ }>;+ total: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type GetApiV1EvalDatasetsResponse = GetApiV1EvalDatasetsResponses[keyof GetApiV1EvalDatasetsResponses];++export type PostApiV1EvalDatasetsData = {+ body: {+ id?: string;+ identifier: string;+ name: string;+ benchmarkId?: string | null;+ description?: string | null;+ metadata?: {+ [key: string]: unknown;+ } | null;+ evalConfig?: {+ [key: string]: unknown;+ } | null;+ evalMode?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external' | null;+ };+ path?: never;+ query?: never;+ url: '/api/v1/eval/datasets';+};++export type PostApiV1EvalDatasetsErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PostApiV1EvalDatasetsError = PostApiV1EvalDatasetsErrors[keyof PostApiV1EvalDatasetsErrors];++export type PostApiV1EvalDatasetsResponses = {+ /**+ * Successful response+ */+ 201: {+ data?: {+ id: string;+ identifier: string;+ name: string;+ benchmarkId: string | null;+ description: string | null;+ metadata: {+ [key: string]: unknown;+ } | null;+ evalConfig: {+ [key: string]: unknown;+ } | null;+ evalMode: string | null;+ createdAt: string;+ updatedAt: string;+ sourceExperimentId: string | null;+ testCaseCount: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PostApiV1EvalDatasetsResponse = PostApiV1EvalDatasetsResponses[keyof PostApiV1EvalDatasetsResponses];++export type DeleteApiV1EvalDatasetsByIdData = {+ body?: never;+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/datasets/{id}';+};++export type DeleteApiV1EvalDatasetsByIdErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type DeleteApiV1EvalDatasetsByIdError = DeleteApiV1EvalDatasetsByIdErrors[keyof DeleteApiV1EvalDatasetsByIdErrors];++export type DeleteApiV1EvalDatasetsByIdResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type DeleteApiV1EvalDatasetsByIdResponse = DeleteApiV1EvalDatasetsByIdResponses[keyof DeleteApiV1EvalDatasetsByIdResponses];++export type GetApiV1EvalDatasetsByIdData = {+ body?: never;+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/datasets/{id}';+};++export type GetApiV1EvalDatasetsByIdErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type GetApiV1EvalDatasetsByIdError = GetApiV1EvalDatasetsByIdErrors[keyof GetApiV1EvalDatasetsByIdErrors];++export type GetApiV1EvalDatasetsByIdResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ identifier: string;+ name: string;+ benchmarkId: string | null;+ description: string | null;+ metadata: {+ [key: string]: unknown;+ } | null;+ evalConfig: {+ [key: string]: unknown;+ } | null;+ evalMode: string | null;+ createdAt: string;+ updatedAt: string;+ sourceExperimentId: string | null;+ testCaseCount: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type GetApiV1EvalDatasetsByIdResponse = GetApiV1EvalDatasetsByIdResponses[keyof GetApiV1EvalDatasetsByIdResponses];++export type PatchApiV1EvalDatasetsByIdData = {+ body: {+ identifier?: string;+ name?: string;+ benchmarkId?: string | null;+ description?: string | null;+ metadata?: {+ [key: string]: unknown;+ } | null;+ evalConfig?: {+ [key: string]: unknown;+ } | null;+ evalMode?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external' | null;+ };+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/datasets/{id}';+};++export type PatchApiV1EvalDatasetsByIdErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PatchApiV1EvalDatasetsByIdError = PatchApiV1EvalDatasetsByIdErrors[keyof PatchApiV1EvalDatasetsByIdErrors];++export type PatchApiV1EvalDatasetsByIdResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ identifier: string;+ name: string;+ benchmarkId: string | null;+ description: string | null;+ metadata: {+ [key: string]: unknown;+ } | null;+ evalConfig: {+ [key: string]: unknown;+ } | null;+ evalMode: string | null;+ createdAt: string;+ updatedAt: string;+ sourceExperimentId: string | null;+ testCaseCount: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PatchApiV1EvalDatasetsByIdResponse = PatchApiV1EvalDatasetsByIdResponses[keyof PatchApiV1EvalDatasetsByIdResponses];++export type GetApiV1EvalDatasetsByDatasetIdTestCasesData = {+ body?: never;+ path: {+ datasetId: string;+ };+ query?: {+ limit?: number;+ offset?: number;+ page?: number;+ pageSize?: number;+ };+ url: '/api/v1/eval/datasets/{datasetId}/test-cases';+};++export type GetApiV1EvalDatasetsByDatasetIdTestCasesErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type GetApiV1EvalDatasetsByDatasetIdTestCasesError = GetApiV1EvalDatasetsByDatasetIdTestCasesErrors[keyof GetApiV1EvalDatasetsByDatasetIdTestCasesErrors];++export type GetApiV1EvalDatasetsByDatasetIdTestCasesResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ testCases: Array<{+ id: string;+ input: string;+ expected?: string;+ category?: string;+ choices?: Array<string>;+ environment?: {+ envPrompt?: string;+ toolForwarding?: {+ [key: string]: {+ endpoint: string;+ timeoutMs?: number;+ };+ };+ };+ messages?: Array<{+ content: string;+ role: 'user' | 'assistant' | 'system' | 'tool';+ id?: string;+ parentId?: string | null;+ model?: string;+ provider?: string;+ createdAt?: string | number;+ updatedAt?: string | number;+ tools?: Array<{+ [key: string]: unknown;+ }>;+ tool_call_id?: string;+ metadata?: {+ [key: string]: unknown;+ };+ reasoning?: {+ [key: string]: unknown;+ };+ plugin?: {+ [key: string]: unknown;+ };+ pluginState?: {+ [key: string]: unknown;+ };+ pluginError?: {+ [key: string]: unknown;+ };+ pluginIntervention?: {+ [key: string]: unknown;+ };+ error?: {+ [key: string]: unknown;+ };+ search?: {+ [key: string]: unknown;+ };+ }>;+ caseId?: string;+ sortOrder: number | null;+ evalMode?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external' | null;+ evalConfig?: {+ [key: string]: unknown;+ } | null;+ createdAt: string;+ updatedAt: string;+ datasetId: string;+ content: {+ [key: string]: unknown;+ };+ metadata: {+ [key: string]: unknown;+ } | null;+ }>;+ total: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type GetApiV1EvalDatasetsByDatasetIdTestCasesResponse = GetApiV1EvalDatasetsByDatasetIdTestCasesResponses[keyof GetApiV1EvalDatasetsByDatasetIdTestCasesResponses];++export type PostApiV1EvalDatasetsByDatasetIdTestCasesData = {+ body: {+ id?: string;+ input: string;+ expected?: string;+ category?: string;+ choices?: Array<string>;+ environment?: {+ envPrompt?: string;+ toolForwarding?: {+ [key: string]: {+ endpoint: string;+ timeoutMs?: number;+ };+ };+ };+ messages?: Array<{+ content: string;+ role: 'user' | 'assistant' | 'system' | 'tool';+ id?: string;+ parentId?: string | null;+ model?: string;+ provider?: string;+ createdAt?: string | number;+ updatedAt?: string | number;+ tools?: Array<{+ [key: string]: unknown;+ }>;+ tool_call_id?: string;+ metadata?: {+ [key: string]: unknown;+ };+ reasoning?: {+ [key: string]: unknown;+ };+ plugin?: {+ [key: string]: unknown;+ };+ pluginState?: {+ [key: string]: unknown;+ };+ pluginError?: {+ [key: string]: unknown;+ };+ pluginIntervention?: {+ [key: string]: unknown;+ };+ error?: {+ [key: string]: unknown;+ };+ search?: {+ [key: string]: unknown;+ };+ }>;+ caseId?: string;+ sortOrder?: number;+ evalMode?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external' | null;+ evalConfig?: {+ [key: string]: unknown;+ } | null;+ };+ path: {+ datasetId: string;+ };+ query?: never;+ url: '/api/v1/eval/datasets/{datasetId}/test-cases';+};++export type PostApiV1EvalDatasetsByDatasetIdTestCasesErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PostApiV1EvalDatasetsByDatasetIdTestCasesError = PostApiV1EvalDatasetsByDatasetIdTestCasesErrors[keyof PostApiV1EvalDatasetsByDatasetIdTestCasesErrors];++export type PostApiV1EvalDatasetsByDatasetIdTestCasesResponses = {+ /**+ * Successful response+ */+ 201: {+ data?: {+ id: string;+ input: string;+ expected?: string;+ category?: string;+ choices?: Array<string>;+ environment?: {+ envPrompt?: string;+ toolForwarding?: {+ [key: string]: {+ endpoint: string;+ timeoutMs?: number;+ };+ };+ };+ messages?: Array<{+ content: string;+ role: 'user' | 'assistant' | 'system' | 'tool';+ id?: string;+ parentId?: string | null;+ model?: string;+ provider?: string;+ createdAt?: string | number;+ updatedAt?: string | number;+ tools?: Array<{+ [key: string]: unknown;+ }>;+ tool_call_id?: string;+ metadata?: {+ [key: string]: unknown;+ };+ reasoning?: {+ [key: string]: unknown;+ };+ plugin?: {+ [key: string]: unknown;+ };+ pluginState?: {+ [key: string]: unknown;+ };+ pluginError?: {+ [key: string]: unknown;+ };+ pluginIntervention?: {+ [key: string]: unknown;+ };+ error?: {+ [key: string]: unknown;+ };+ search?: {+ [key: string]: unknown;+ };+ }>;+ caseId?: string;+ sortOrder: number | null;+ evalMode?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external' | null;+ evalConfig?: {+ [key: string]: unknown;+ } | null;+ createdAt: string;+ updatedAt: string;+ datasetId: string;+ content: {+ [key: string]: unknown;+ };+ metadata: {+ [key: string]: unknown;+ } | null;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PostApiV1EvalDatasetsByDatasetIdTestCasesResponse = PostApiV1EvalDatasetsByDatasetIdTestCasesResponses[keyof PostApiV1EvalDatasetsByDatasetIdTestCasesResponses];++export type DeleteApiV1EvalTestCasesByIdData = {+ body?: never;+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/test-cases/{id}';+};++export type DeleteApiV1EvalTestCasesByIdErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type DeleteApiV1EvalTestCasesByIdError = DeleteApiV1EvalTestCasesByIdErrors[keyof DeleteApiV1EvalTestCasesByIdErrors];++export type DeleteApiV1EvalTestCasesByIdResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type DeleteApiV1EvalTestCasesByIdResponse = DeleteApiV1EvalTestCasesByIdResponses[keyof DeleteApiV1EvalTestCasesByIdResponses];++export type GetApiV1EvalTestCasesByIdData = {+ body?: never;+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/test-cases/{id}';+};++export type GetApiV1EvalTestCasesByIdErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type GetApiV1EvalTestCasesByIdError = GetApiV1EvalTestCasesByIdErrors[keyof GetApiV1EvalTestCasesByIdErrors];++export type GetApiV1EvalTestCasesByIdResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ input: string;+ expected?: string;+ category?: string;+ choices?: Array<string>;+ environment?: {+ envPrompt?: string;+ toolForwarding?: {+ [key: string]: {+ endpoint: string;+ timeoutMs?: number;+ };+ };+ };+ messages?: Array<{+ content: string;+ role: 'user' | 'assistant' | 'system' | 'tool';+ id?: string;+ parentId?: string | null;+ model?: string;+ provider?: string;+ createdAt?: string | number;+ updatedAt?: string | number;+ tools?: Array<{+ [key: string]: unknown;+ }>;+ tool_call_id?: string;+ metadata?: {+ [key: string]: unknown;+ };+ reasoning?: {+ [key: string]: unknown;+ };+ plugin?: {+ [key: string]: unknown;+ };+ pluginState?: {+ [key: string]: unknown;+ };+ pluginError?: {+ [key: string]: unknown;+ };+ pluginIntervention?: {+ [key: string]: unknown;+ };+ error?: {+ [key: string]: unknown;+ };+ search?: {+ [key: string]: unknown;+ };+ }>;+ caseId?: string;+ sortOrder: number | null;+ evalMode?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external' | null;+ evalConfig?: {+ [key: string]: unknown;+ } | null;+ createdAt: string;+ updatedAt: string;+ datasetId: string;+ content: {+ [key: string]: unknown;+ };+ metadata: {+ [key: string]: unknown;+ } | null;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type GetApiV1EvalTestCasesByIdResponse = GetApiV1EvalTestCasesByIdResponses[keyof GetApiV1EvalTestCasesByIdResponses];++export type PatchApiV1EvalTestCasesByIdData = {+ body: {+ input?: string;+ expected?: string;+ category?: string;+ choices?: Array<string>;+ environment?: {+ envPrompt?: string;+ toolForwarding?: {+ [key: string]: {+ endpoint: string;+ timeoutMs?: number;+ };+ };+ };+ messages?: Array<{+ content: string;+ role: 'user' | 'assistant' | 'system' | 'tool';+ id?: string;+ parentId?: string | null;+ model?: string;+ provider?: string;+ createdAt?: string | number;+ updatedAt?: string | number;+ tools?: Array<{+ [key: string]: unknown;+ }>;+ tool_call_id?: string;+ metadata?: {+ [key: string]: unknown;+ };+ reasoning?: {+ [key: string]: unknown;+ };+ plugin?: {+ [key: string]: unknown;+ };+ pluginState?: {+ [key: string]: unknown;+ };+ pluginError?: {+ [key: string]: unknown;+ };+ pluginIntervention?: {+ [key: string]: unknown;+ };+ error?: {+ [key: string]: unknown;+ };+ search?: {+ [key: string]: unknown;+ };+ }>;+ caseId?: string;+ sortOrder?: number;+ evalMode?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external' | null;+ evalConfig?: {+ [key: string]: unknown;+ } | null;+ };+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/test-cases/{id}';+};++export type PatchApiV1EvalTestCasesByIdErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PatchApiV1EvalTestCasesByIdError = PatchApiV1EvalTestCasesByIdErrors[keyof PatchApiV1EvalTestCasesByIdErrors];++export type PatchApiV1EvalTestCasesByIdResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ input: string;+ expected?: string;+ category?: string;+ choices?: Array<string>;+ environment?: {+ envPrompt?: string;+ toolForwarding?: {+ [key: string]: {+ endpoint: string;+ timeoutMs?: number;+ };+ };+ };+ messages?: Array<{+ content: string;+ role: 'user' | 'assistant' | 'system' | 'tool';+ id?: string;+ parentId?: string | null;+ model?: string;+ provider?: string;+ createdAt?: string | number;+ updatedAt?: string | number;+ tools?: Array<{+ [key: string]: unknown;+ }>;+ tool_call_id?: string;+ metadata?: {+ [key: string]: unknown;+ };+ reasoning?: {+ [key: string]: unknown;+ };+ plugin?: {+ [key: string]: unknown;+ };+ pluginState?: {+ [key: string]: unknown;+ };+ pluginError?: {+ [key: string]: unknown;+ };+ pluginIntervention?: {+ [key: string]: unknown;+ };+ error?: {+ [key: string]: unknown;+ };+ search?: {+ [key: string]: unknown;+ };+ }>;+ caseId?: string;+ sortOrder: number | null;+ evalMode?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external' | null;+ evalConfig?: {+ [key: string]: unknown;+ } | null;+ createdAt: string;+ updatedAt: string;+ datasetId: string;+ content: {+ [key: string]: unknown;+ };+ metadata: {+ [key: string]: unknown;+ } | null;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PatchApiV1EvalTestCasesByIdResponse = PatchApiV1EvalTestCasesByIdResponses[keyof PatchApiV1EvalTestCasesByIdResponses];++export type PostApiV1EvalRunsByIdClaimData = {+ body?: never;+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/runs/{id}/claim';+};++export type PostApiV1EvalRunsByIdClaimErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PostApiV1EvalRunsByIdClaimError = PostApiV1EvalRunsByIdClaimErrors[keyof PostApiV1EvalRunsByIdClaimErrors];++export type PostApiV1EvalRunsByIdClaimResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ createdAt: string;+ updatedAt: string;+ config: {+ [key: string]: unknown;+ };+ executionMode: 'internal' | 'external';+ datasetId: string;+ experimentId: string | null;+ parentRunId: string | null;+ status: 'idle' | 'pending' | 'running' | 'external' | 'completed' | 'failed' | 'aborted';+ targetAgentId: string | null;+ name: string | null;+ metrics: {+ [key: string]: unknown;+ } | null;+ startedAt: string | null;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PostApiV1EvalRunsByIdClaimResponse = PostApiV1EvalRunsByIdClaimResponses[keyof PostApiV1EvalRunsByIdClaimResponses];++export type PatchApiV1EvalRunsByIdStatusData = {+ body: {+ status: 'running' | 'external' | 'completed' | 'failed' | 'aborted';+ };+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/runs/{id}/status';+};++export type PatchApiV1EvalRunsByIdStatusErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PatchApiV1EvalRunsByIdStatusError = PatchApiV1EvalRunsByIdStatusErrors[keyof PatchApiV1EvalRunsByIdStatusErrors];++export type PatchApiV1EvalRunsByIdStatusResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ id: string;+ createdAt: string;+ updatedAt: string;+ config: {+ [key: string]: unknown;+ };+ executionMode: 'internal' | 'external';+ datasetId: string;+ experimentId: string | null;+ parentRunId: string | null;+ status: 'idle' | 'pending' | 'running' | 'external' | 'completed' | 'failed' | 'aborted';+ targetAgentId: string | null;+ name: string | null;+ metrics: {+ [key: string]: unknown;+ } | null;+ startedAt: string | null;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PatchApiV1EvalRunsByIdStatusResponse = PatchApiV1EvalRunsByIdStatusResponses[keyof PatchApiV1EvalRunsByIdStatusResponses];++export type PostApiV1EvalRunsByIdRetryErrorsData = {+ body?: never;+ path: {+ id: string;+ };+ query?: never;+ url: '/api/v1/eval/runs/{id}/retry-errors';+};++export type PostApiV1EvalRunsByIdRetryErrorsErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PostApiV1EvalRunsByIdRetryErrorsError = PostApiV1EvalRunsByIdRetryErrorsErrors[keyof PostApiV1EvalRunsByIdRetryErrorsErrors];++export type PostApiV1EvalRunsByIdRetryErrorsResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ runId: string;+ retryCount: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PostApiV1EvalRunsByIdRetryErrorsResponse = PostApiV1EvalRunsByIdRetryErrorsResponses[keyof PostApiV1EvalRunsByIdRetryErrorsResponses];++export type PutApiV1EvalRunsByRunIdTopicsByTopicIdResultData = {+ body: {+ testCaseId?: string;+ correct: boolean;+ score: number;+ result?: {+ [key: string]: unknown;+ };+ threadId?: string;+ };+ path: {+ runId: string;+ topicId: string;+ };+ query?: never;+ url: '/api/v1/eval/runs/{runId}/topics/{topicId}/result';+};++export type PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type PutApiV1EvalRunsByRunIdTopicsByTopicIdResultError = PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors[keyof PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors];++export type PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ idempotent: boolean;+ reportedThreads: number;+ runId: string;+ runStatus?: string;+ success: boolean;+ threadId?: string;+ topicFinalized: boolean;+ topicId: string;+ totalThreads: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponse = PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses[keyof PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses];++export type GetApiV1PluginsData = {+ body?: never;+ path?: never;+ query?: {+ limit?: number;+ offset?: number;+ page?: number;+ pageSize?: number;+ };+ url: '/api/v1/plugins';+};++export type GetApiV1PluginsErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type GetApiV1PluginsError = GetApiV1PluginsErrors[keyof GetApiV1PluginsErrors];++export type GetApiV1PluginsResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ plugins: Array<{+ identifier?: string;+ type?: string;+ createdAt?: string;+ updatedAt?: string;+ }>;+ total: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type GetApiV1PluginsResponse = GetApiV1PluginsResponses[keyof GetApiV1PluginsResponses];++export type GetApiV1FilesData = {+ body?: never;+ path?: never;+ query?: {+ keyword?: string;+ page?: string;+ pageSize?: string;+ fileType?: string;+ knowledgeBaseId?: string;+ queryAll?: string;+ updatedAtEnd?: string;+ updatedAtStart?: string;+ userId?: string;+ };+ url: '/api/v1/files';+};++export type GetApiV1FilesErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type GetApiV1FilesError = GetApiV1FilesErrors[keyof GetApiV1FilesErrors];++export type GetApiV1FilesResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ files: Array<File>;+ total?: number;+ [key: string]: unknown;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type GetApiV1FilesResponse = GetApiV1FilesResponses[keyof GetApiV1FilesResponses];++export type PostApiV1FilesData = {+ body: {+ agentId?: string;+ directory?: string;+ file: Blob | File;+ knowledgeBaseId?: string;sessionId?: string;skipCheckFileType?: boolean;skipDeduplication?: boolean;@@ -1936,9 +4632,13 @@ export type DeleteApiV1FilesByIdData = {export type DeleteApiV1FilesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -1994,9 +4694,13 @@ export type GetApiV1FilesByIdData = {export type GetApiV1FilesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2057,9 +4761,13 @@ export type PatchApiV1FilesByIdData = {export type PatchApiV1FilesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2115,9 +4823,13 @@ export type GetApiV1FilesByIdUrlData = {export type GetApiV1FilesByIdUrlErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2175,9 +4887,13 @@ export type PostApiV1FilesByIdParsesData = {export type PostApiV1FilesByIdParsesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2233,9 +4949,13 @@ export type GetApiV1FilesByIdChunksData = {export type GetApiV1FilesByIdChunksErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2294,9 +5014,13 @@ export type PostApiV1FilesByIdChunksData = {export type PostApiV1FilesByIdChunksErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2429,9 +5153,13 @@ export type PostApiV1FilesQueriesData = {export type PostApiV1FilesQueriesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2500,9 +5228,13 @@ export type GetApiV1KnowledgeBasesData = {export type GetApiV1KnowledgeBasesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2562,9 +5294,13 @@ export type PostApiV1KnowledgeBasesData = {export type PostApiV1KnowledgeBasesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2618,9 +5354,13 @@ export type DeleteApiV1KnowledgeBasesByIdData = {export type DeleteApiV1KnowledgeBasesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2676,9 +5416,13 @@ export type GetApiV1KnowledgeBasesByIdData = {export type GetApiV1KnowledgeBasesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2736,9 +5480,13 @@ export type PatchApiV1KnowledgeBasesByIdData = {export type PatchApiV1KnowledgeBasesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2797,9 +5545,13 @@ export type GetApiV1KnowledgeBasesByIdFilesData = {export type GetApiV1KnowledgeBasesByIdFilesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2857,9 +5609,13 @@ export type DeleteApiV1KnowledgeBasesByIdFilesBatchData = {export type DeleteApiV1KnowledgeBasesByIdFilesBatchErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2917,9 +5673,13 @@ export type PostApiV1KnowledgeBasesByIdFilesBatchData = {export type PostApiV1KnowledgeBasesByIdFilesBatchErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -2978,9 +5738,13 @@ export type PostApiV1KnowledgeBasesByIdFilesMoveData = {export type PostApiV1KnowledgeBasesByIdFilesMoveErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3106,9 +5870,13 @@ export type PostApiV1McpServersData = {export type PostApiV1McpServersErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3162,9 +5930,13 @@ export type DeleteApiV1McpServersByIdData = {export type DeleteApiV1McpServersByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3220,9 +5992,13 @@ export type GetApiV1McpServersByIdData = {export type GetApiV1McpServersByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3293,9 +6069,13 @@ export type PatchApiV1McpServersByIdData = {export type PatchApiV1McpServersByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3349,9 +6129,13 @@ export type PostApiV1McpServersByIdSyncData = {export type PostApiV1McpServersByIdSyncErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3409,9 +6193,13 @@ export type DeleteApiV1MessageTranslationsByMessageIdData = {export type DeleteApiV1MessageTranslationsByMessageIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3467,9 +6255,13 @@ export type GetApiV1MessageTranslationsByMessageIdData = {export type GetApiV1MessageTranslationsByMessageIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3531,9 +6323,13 @@ export type PatchApiV1MessageTranslationsByMessageIdData = {export type PatchApiV1MessageTranslationsByMessageIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3594,9 +6390,13 @@ export type PostApiV1MessageTranslationsByMessageIdData = {export type PostApiV1MessageTranslationsByMessageIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3645,6 +6445,8 @@ export type GetApiV1MessagesCountData = {body?: never;path?: never;query?: {+ topicId?: string;+ threadId?: string;topicIds?: string | null;userId?: string | null;};@@ -3653,9 +6455,13 @@ export type GetApiV1MessagesCountData = {export type GetApiV1MessagesCountErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3711,9 +6517,13 @@ export type DeleteApiV1MessagesData = {export type DeleteApiV1MessagesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3762,21 +6572,28 @@ export type GetApiV1MessagesData = {body?: never;path?: never;query?: {+ threadId?: string;topicId?: string | null;userId?: string | null;role?: 'user' | 'system' | 'assistant' | 'tool' | null;keyword?: string;- page?: string;- pageSize?: string;+ page?: number;+ pageSize?: number;+ limit?: number;+ offset?: number;};url: '/api/v1/messages';};export type GetApiV1MessagesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3829,18 +6646,18 @@ export type PostApiV1MessagesData = {role: 'user' | 'system' | 'assistant' | 'tool';model?: string | null;provider?: string | null;- topicId?: string | null | null;- threadId?: string | null | null;- parentId?: string | null | null;- quotaId?: string | null | null;- agentId?: string | null | null;+ topicId?: string | null;+ threadId?: string | null;+ parentId?: string | null;+ quotaId?: string | null;+ agentId?: string | null;clientId?: string | null;metadata?: unknown | null;reasoning?: unknown | null;search?: unknown | null;tools?: unknown | null;- traceId?: string | null | null;- observationId?: string | null | null;+ traceId?: string | null;+ observationId?: string | null;files?: Array<string> | null;favorite?: boolean | null;};@@ -3851,9 +6668,13 @@ export type PostApiV1MessagesData = {export type PostApiV1MessagesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3907,9 +6728,13 @@ export type DeleteApiV1MessagesByIdData = {export type DeleteApiV1MessagesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -3965,9 +6790,13 @@ export type GetApiV1MessagesByIdData = {export type GetApiV1MessagesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4016,18 +6845,18 @@ export type PostApiV1MessagesRepliesData = {role: 'user';model?: string | null;provider?: string | null;- topicId?: string | null | null;- threadId?: string | null | null;- parentId?: string | null | null;- quotaId?: string | null | null;- agentId?: string | null | null;+ topicId?: string | null;+ threadId?: string | null;+ parentId?: string | null;+ quotaId?: string | null;+ agentId?: string | null;clientId?: string | null;metadata?: unknown | null;reasoning?: unknown | null;search?: unknown | null;tools?: unknown | null;- traceId?: string | null | null;- observationId?: string | null | null;+ traceId?: string | null;+ observationId?: string | null;files?: Array<string> | null;favorite?: boolean | null;};@@ -4038,9 +6867,13 @@ export type PostApiV1MessagesRepliesData = {export type PostApiV1MessagesRepliesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4099,9 +6932,13 @@ export type GetApiV1ModelsData = {export type GetApiV1ModelsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4181,9 +7018,13 @@ export type PostApiV1ModelsData = {export type PostApiV1ModelsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4238,9 +7079,13 @@ export type GetApiV1ModelsByProviderIdByModelIdData = {export type GetApiV1ModelsByProviderIdByModelIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4319,9 +7164,13 @@ export type PatchApiV1ModelsByProviderIdByModelIdData = {export type PatchApiV1ModelsByProviderIdByModelIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4381,9 +7230,13 @@ export type GetApiV1PermissionsData = {export type GetApiV1PermissionsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4445,9 +7298,13 @@ export type PostApiV1PermissionsData = {export type PostApiV1PermissionsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4501,9 +7358,13 @@ export type DeleteApiV1PermissionsByIdData = {export type DeleteApiV1PermissionsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4559,9 +7420,13 @@ export type GetApiV1PermissionsByIdData = {export type GetApiV1PermissionsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4621,9 +7486,13 @@ export type PatchApiV1PermissionsByIdData = {export type PatchApiV1PermissionsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4680,9 +7549,13 @@ export type GetApiV1ProvidersData = {export type GetApiV1ProvidersErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4757,9 +7630,13 @@ export type PostApiV1ProvidersData = {export type PostApiV1ProvidersErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4813,9 +7690,13 @@ export type DeleteApiV1ProvidersByIdData = {export type DeleteApiV1ProvidersByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4871,9 +7752,13 @@ export type GetApiV1ProvidersByIdData = {export type GetApiV1ProvidersByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -4945,9 +7830,13 @@ export type PatchApiV1ProvidersByIdData = {export type PatchApiV1ProvidersByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5072,9 +7961,13 @@ export type PostApiV1ResponsesData = {export type PostApiV1ResponsesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5138,9 +8031,13 @@ export type GetApiV1RolesData = {export type GetApiV1RolesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5202,9 +8099,13 @@ export type PostApiV1RolesData = {export type PostApiV1RolesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5258,9 +8159,13 @@ export type DeleteApiV1RolesByIdData = {export type DeleteApiV1RolesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5316,9 +8221,13 @@ export type GetApiV1RolesByIdData = {export type GetApiV1RolesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5378,9 +8287,13 @@ export type PatchApiV1RolesByIdData = {export type PatchApiV1RolesByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5434,9 +8347,13 @@ export type DeleteApiV1RolesByIdPermissionsData = {export type DeleteApiV1RolesByIdPermissionsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5496,9 +8413,13 @@ export type GetApiV1RolesByIdPermissionsData = {export type GetApiV1RolesByIdPermissionsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5557,9 +8478,13 @@ export type PatchApiV1RolesByIdPermissionsData = {export type PatchApiV1RolesByIdPermissionsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5622,9 +8547,13 @@ export type GetApiV1TopicsData = {export type GetApiV1TopicsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5686,9 +8615,13 @@ export type PostApiV1TopicsData = {export type PostApiV1TopicsErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5742,9 +8675,13 @@ export type DeleteApiV1TopicsByIdData = {export type DeleteApiV1TopicsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5800,9 +8737,13 @@ export type GetApiV1TopicsByIdData = {export type GetApiV1TopicsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5866,9 +8807,13 @@ export type PatchApiV1TopicsByIdData = {export type PatchApiV1TopicsByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -5911,6 +8856,83 @@ export type PatchApiV1TopicsByIdResponses = {export type PatchApiV1TopicsByIdResponse = PatchApiV1TopicsByIdResponses[keyof PatchApiV1TopicsByIdResponses];+export type GetApiV1TopicsByTopicIdThreadsData = {+ body?: never;+ path: {+ topicId: string;+ };+ query?: {+ limit?: number;+ offset?: number;+ page?: number;+ pageSize?: number;+ };+ url: '/api/v1/topics/{topicId}/threads';+};++export type GetApiV1TopicsByTopicIdThreadsErrors = {+ /**+ * Validation Error+ */+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };+ /**+ * Authentication required+ */+ 401: ApiError;+ /**+ * Insufficient permission+ */+ 403: ApiError;+ /**+ * Resource not found+ */+ 404: ApiError;+ /**+ * Resource conflict+ */+ 409: ApiError;+ /**+ * Rate limit exceeded+ */+ 429: ApiError;+ /**+ * Internal server error+ */+ 500: ApiError;+};++export type GetApiV1TopicsByTopicIdThreadsError = GetApiV1TopicsByTopicIdThreadsErrors[keyof GetApiV1TopicsByTopicIdThreadsErrors];++export type GetApiV1TopicsByTopicIdThreadsResponses = {+ /**+ * Successful response+ */+ 200: {+ data?: {+ threads: Array<{+ id?: string;+ topicId?: string;+ title?: string | null;+ type?: string;+ status?: string | null;+ parentThreadId?: string | null;+ createdAt?: string;+ updatedAt?: string;+ }>;+ total: number;+ };+ message?: string;+ success: true;+ timestamp: string;+ };+};++export type GetApiV1TopicsByTopicIdThreadsResponse = GetApiV1TopicsByTopicIdThreadsResponses[keyof GetApiV1TopicsByTopicIdThreadsResponses];+export type GetApiV1UsersMeData = {body?: never;path?: never;@@ -5980,9 +9002,13 @@ export type GetApiV1UsersData = {export type GetApiV1UsersErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -6048,9 +9074,13 @@ export type PostApiV1UsersData = {export type PostApiV1UsersErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -6104,9 +9134,13 @@ export type DeleteApiV1UsersByIdData = {export type DeleteApiV1UsersByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -6162,9 +9196,13 @@ export type GetApiV1UsersByIdData = {export type GetApiV1UsersByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -6229,9 +9267,13 @@ export type PatchApiV1UsersByIdData = {export type PatchApiV1UsersByIdErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -6285,9 +9327,13 @@ export type DeleteApiV1UsersByIdRolesData = {export type DeleteApiV1UsersByIdRolesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -6343,9 +9389,13 @@ export type GetApiV1UsersByIdRolesData = {export type GetApiV1UsersByIdRolesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/@@ -6407,9 +9457,13 @@ export type PatchApiV1UsersByIdRolesData = {export type PatchApiV1UsersByIdRolesErrors = {/**- * Invalid request+ * Validation Error*/- 400: ApiError;+ 400: {+ success: false;+ error: Array<unknown>;+ data: unknown;+ };/*** Authentication required*/