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

Function canPreserveDefaultModel

packages/oauth/src/managed-kimi-code.ts:697–705  ·  view source on GitHub ↗
(
  existingModels: Record<string, ManagedKimiModelAlias | Record<string, unknown>>,
  defaultModel: string,
  managedModels: ReadonlyMap<string, ManagedKimiCodeModelInfo>,
)

Source from the content-addressed store, hash-verified

695}
696
697function canPreserveDefaultModel(
698 existingModels: Record<string, ManagedKimiModelAlias | Record<string, unknown>>,
699 defaultModel: string,
700 managedModels: ReadonlyMap<string, ManagedKimiCodeModelInfo>,
701): boolean {
702 if (managedModels.has(defaultModel)) return true;
703 const existing = existingModels[defaultModel];
704 return isRecord(existing) && existing['provider'] !== KIMI_CODE_PROVIDER_NAME;
705}
706
707export function clearManagedKimiCodeConfig(
708 config: ManagedKimiConfigShape,

Callers 1

selectDefaultModelFunction · 0.85

Calls 2

isRecordFunction · 0.90
hasMethod · 0.65

Tested by

no test coverage detected