( existingModels: Record<string, ManagedKimiModelAlias | Record<string, unknown>>, defaultModel: string, managedModels: ReadonlyMap<string, ManagedKimiCodeModelInfo>, )
| 695 | } |
| 696 | |
| 697 | function 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 | |
| 707 | export function clearManagedKimiCodeConfig( |
| 708 | config: ManagedKimiConfigShape, |
no test coverage detected