True when the kimi-cli provider entry validates against kimi-code's schema.
(prov: Record<string, unknown>)
| 129 | |
| 130 | /** True when the kimi-cli provider entry validates against kimi-code's schema. */ |
| 131 | function providerIsSupported(prov: Record<string, unknown>): boolean { |
| 132 | const transformed = transformTomlData({ providers: { x: prov } }); |
| 133 | const entry = isRecord(transformed['providers']) ? transformed['providers']['x'] : undefined; |
| 134 | return ProviderConfigSchema.safeParse(entry).success; |
| 135 | } |
| 136 | |
| 137 | /** True when the kimi-cli model entry validates against kimi-code's schema. */ |
| 138 | function modelIsSupported(mod: Record<string, unknown>): boolean { |
no test coverage detected