import { fetch as undiciFetch } from 'undici'; import type { Dispatcher } from '../audit-runner.js'; /** * SECURITY: like the deepseek dispatcher (and decision #7's * anthropic-subprocess invariant), the Z.ai URL and the model-name * allowlist are HARDCODED. Project-local config can never redirect this * dispatcher at a different host or run an unsupported model. Future * contributors who feel tempted to read a URL from * `.scaffold/observability.yaml` here should re-read the parent design * doc's Resolved Decisions table first. * * Z.ai exposes an OpenAI-compatible chat-completions endpoint, so the * request/response shape mirrors the deepseek dispatcher exactly. */ export declare const ZAI_URL = "https://api.z.ai/api/paas/v4/chat/completions"; /** * Hardcoded allowlist of Z.ai (GLM) model names. The override env var may * pick a value from this set — never arbitrary text. * * - `glm-4.6` (default): flagship reasoning model, 200K context window. * The freshness audit embeds source documents in the prompt and produces * a structured JSON verdict, so a strong reasoner with a large context * window is the best fit. * - `glm-4.5-air`: lightweight, cost-optimized variant — the cheaper * override tier, mirroring deepseek's flash/pro split. */ declare const ALLOWED_MODELS: readonly ["glm-4.6", "glm-4.5-air"]; export type ZaiModel = typeof ALLOWED_MODELS[number]; export declare const DEFAULT_ZAI_MODEL: ZaiModel; /** Test-injectable fetch. Production uses undici's fetch. */ export type ZaiFetch = typeof undiciFetch; export interface BuildZaiDispatcherOptions { apiKey: string; timeoutSec: number; /** Optional model override (must be in the allowlist). */ model?: string; /** Test-injectable fetch implementation. Default: undici's fetch. */ fetchImpl?: ZaiFetch; } export declare function buildZaiDispatcher(opts: BuildZaiDispatcherOptions): Dispatcher; export {}; //# sourceMappingURL=zai.d.ts.map