diff --git a/web/app/components/header/account-setting/model-provider-page/declarations.ts b/web/app/components/header/account-setting/model-provider-page/declarations.ts index 945806928a..74f47c9d1d 100644 --- a/web/app/components/header/account-setting/model-provider-page/declarations.ts +++ b/web/app/components/header/account-setting/model-provider-page/declarations.ts @@ -187,7 +187,7 @@ export type Credential = { credential_id: string credential_name?: string from_enterprise?: boolean - allowed_to_use?: boolean + not_allowed_to_use?: boolean } export type CustomModel = { @@ -242,6 +242,7 @@ export type ModelProvider = { current_quota_type: CurrentSystemQuotaTypeEnum quota_configurations: QuotaConfiguration[] } + allow_custom_token?: boolean } export type Model = { diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/add-credential-in-load-balancing.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/add-credential-in-load-balancing.tsx index 829ef25795..d6daa91dd9 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-auth/add-credential-in-load-balancing.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-auth/add-credential-in-load-balancing.tsx @@ -13,6 +13,7 @@ import type { ModelProvider, } from '@/app/components/header/account-setting/model-provider-page/declarations' import { ConfigurationMethodEnum } from '@/app/components/header/account-setting/model-provider-page/declarations' +import Tooltip from '@/app/components/base/tooltip' type AddCredentialInLoadBalancingProps = { provider: ModelProvider @@ -35,11 +36,13 @@ const AddCredentialInLoadBalancing = ({ available_credentials, } = modelCredential const customModel = configurationMethod === ConfigurationMethodEnum.customizableModel + const notAllowCustomCredential = provider.allow_custom_token === false const renderTrigger = useCallback((open?: boolean) => { - return ( + const Item = (