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

Function providerIsSupported

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

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

(prov: Record<string, unknown>)

Source from the content-addressed store, hash-verified

129
130/** True when the kimi-cli provider entry validates against kimi-code's schema. */
131function 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. */
138function modelIsSupported(mod: Record<string, unknown>): boolean {

Callers 1

migrateConfigStepFunction · 0.85

Calls 2

transformTomlDataFunction · 0.90
isRecordFunction · 0.70

Tested by

no test coverage detected