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

Function modelIsSupported

packages/migration-legacy/src/steps/config.ts:138–142  ·  view source on GitHub ↗

True when the kimi-cli model entry validates against kimi-code's schema.

(mod: Record<string, unknown>)

Source from the content-addressed store, hash-verified

136
137/** True when the kimi-cli model entry validates against kimi-code's schema. */
138function modelIsSupported(mod: Record<string, unknown>): boolean {
139 const transformed = transformTomlData({ models: { x: mod } });
140 const entry = isRecord(transformed['models']) ? transformed['models']['x'] : undefined;
141 return ModelAliasSchema.safeParse(entry).success;
142}
143
144/** Order-insensitive deep-equality key, so re-ordered tables are not conflicts. */
145function stableKey(value: unknown): string {

Callers 1

migrateConfigStepFunction · 0.85

Calls 2

transformTomlDataFunction · 0.90
isRecordFunction · 0.70

Tested by

no test coverage detected