Refactor/model credential (#24994)

This commit is contained in:
zxhlyh 2025-09-03 13:36:59 +08:00 • committed by GitHub
commit 9e125e2029
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 1226 additions and 596 deletions

View file

@ -199,6 +199,7 @@ export type CustomModelCredential = CustomModel & {
credentials?: Record<string, any>
available_model_credentials?: Credential[]
current_credential_id?: string
current_credential_name?: string
}
export type CredentialWithModel = Credential & {
@ -236,6 +237,10 @@ export type ModelProvider = {
current_credential_name?: string
available_credentials?: Credential[]
custom_models?: CustomModelCredential[]
can_added_models?: {
model: string
model_type: ModelTypeEnum
}[]
}
system_configuration: {
enabled: boolean
@ -323,3 +328,10 @@ export type ModelCredential = {
current_credential_id?: string
current_credential_name?: string
}
export enum ModelModalModeEnum {
configProviderCredential = 'config-provider-credential',
configCustomModel = 'config-custom-model',
addCustomModelToModelList = 'add-custom-model-to-model-list',
configModelCredential = 'config-model-credential',
}