True when the kimi-cli model entry validates against kimi-code's schema.
(mod: Record<string, unknown>)
| 136 | |
| 137 | /** True when the kimi-cli model entry validates against kimi-code's schema. */ |
| 138 | function 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. */ |
| 145 | function stableKey(value: unknown): string { |
no test coverage detected