@@ -259,6 +259,10 @@ const ApiOptions = ({
259259 [ setApiConfigurationField , apiConfiguration , routerModels , organizationAllowList ] ,
260260 )
261261
262+ const modelValidationError = useMemo ( ( ) => {
263+ return getModelValidationError ( apiConfiguration , routerModels , organizationAllowList )
264+ } , [ apiConfiguration , routerModels , organizationAllowList ] )
265+
262266 const docs = useMemo ( ( ) => {
263267 const provider = PROVIDERS . find ( ( { value } ) => value === selectedProvider )
264268 const name = provider ?. label
@@ -318,6 +322,7 @@ const ApiOptions = ({
318322 uriScheme = { uriScheme }
319323 fromWelcomeView = { fromWelcomeView }
320324 organizationAllowList = { organizationAllowList }
325+ modelValidationError = { modelValidationError }
321326 />
322327 ) }
323328
@@ -328,6 +333,7 @@ const ApiOptions = ({
328333 routerModels = { routerModels }
329334 refetchRouterModels = { refetchRouterModels }
330335 organizationAllowList = { organizationAllowList }
336+ modelValidationError = { modelValidationError }
331337 />
332338 ) }
333339
@@ -338,6 +344,7 @@ const ApiOptions = ({
338344 routerModels = { routerModels }
339345 uriScheme = { uriScheme }
340346 organizationAllowList = { organizationAllowList }
347+ modelValidationError = { modelValidationError }
341348 />
342349 ) }
343350
@@ -347,6 +354,7 @@ const ApiOptions = ({
347354 setApiConfigurationField = { setApiConfigurationField }
348355 routerModels = { routerModels }
349356 organizationAllowList = { organizationAllowList }
357+ modelValidationError = { modelValidationError }
350358 />
351359 ) }
352360
@@ -383,6 +391,7 @@ const ApiOptions = ({
383391 apiConfiguration = { apiConfiguration }
384392 setApiConfigurationField = { setApiConfigurationField }
385393 organizationAllowList = { organizationAllowList }
394+ modelValidationError = { modelValidationError }
386395 />
387396 ) }
388397
@@ -419,6 +428,7 @@ const ApiOptions = ({
419428 apiConfiguration = { apiConfiguration }
420429 setApiConfigurationField = { setApiConfigurationField }
421430 organizationAllowList = { organizationAllowList }
431+ modelValidationError = { modelValidationError }
422432 />
423433 ) }
424434
0 commit comments