MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / validateConfig

Function validateConfig

packages/agent-core/src/config/schema.ts:309–317  ·  view source on GitHub ↗
(config: unknown)

Source from the content-addressed store, hash-verified

307}
308
309export function validateConfig(config: unknown): KimiConfig {
310 try {
311 return KimiConfigSchema.parse(config);
312 } catch (error) {
313 throw new KimiError(ErrorCodes.CONFIG_INVALID, `Invalid configuration: ${formatConfigValidationError(error)}`, {
314 cause: error,
315 });
316 }
317}
318
319export function formatConfigValidationError(error: unknown): string {
320 const missingModelContextSize = missingModelContextSizeMessage(error);

Callers 4

configs.test.tsFile · 0.90
mergeConfigPatchFunction · 0.90
writeConfigFileFunction · 0.90
applyEnvModelConfigFunction · 0.90

Calls 1

Tested by

no test coverage detected