mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-23 07:32:20 +03:00
Release v3.8.42 — full CHANGELOG in CHANGELOG.md. CI: 103 checks green incl. CodeQL (all languages), Semgrep, all 8 unit shards, coverage, Node 24 compat, and integration tests. Full unit suite validated locally: 19437 pass / 0 fail. The 3 red checks are advisory and do not gate main (no required status checks): SonarCloud/SonarQube new-code coverage gate, and PR Test Policy (test-masking detector flagging the legitimate dead-Phind provider removal in #5530 — reviewed, correct). Includes cycle-close reconciliation + repair of inherited base-red tests from #5480/#5527/#5427/#5521 that the PR->release fast-path did not exercise.
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import { z } from "zod";
|
|
|
|
export const QdrantQuantizationSchema = z.enum(["none", "int8", "binary"]);
|
|
|
|
export const QdrantSettingsSchema = z.object({
|
|
enabled: z.boolean(),
|
|
host: z.string().min(0), // string vazia OK quando enabled=false
|
|
port: z.number().int().min(1).max(65535).default(6333),
|
|
collection: z.string().min(1).default("omniroute_memory"),
|
|
embeddingModel: z.string().default("openai/text-embedding-3-small"),
|
|
quantization: QdrantQuantizationSchema.default("none"),
|
|
hasApiKey: z.boolean().default(false),
|
|
apiKeyMasked: z.string().nullable().default(null),
|
|
});
|
|
|
|
export const QdrantSettingsUpdateSchema = z
|
|
.object({
|
|
enabled: z.boolean().optional(),
|
|
host: z.string().optional(),
|
|
port: z.number().int().min(1).max(65535).optional(),
|
|
collection: z.string().min(1).optional(),
|
|
embeddingModel: z.string().min(1).optional(),
|
|
quantization: QdrantQuantizationSchema.optional(),
|
|
apiKey: z.string().optional(), // string vazia = remove
|
|
})
|
|
.strict();
|
|
|
|
export const QdrantSearchSchema = z
|
|
.object({
|
|
query: z.string().min(1),
|
|
topK: z.number().int().min(1).max(50).default(5),
|
|
})
|
|
.strict();
|
|
|
|
export const QdrantHealthResultSchema = z.object({
|
|
ok: z.boolean(),
|
|
latencyMs: z.number(),
|
|
error: z.string().optional(),
|
|
});
|