mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-18 15:35:56 +08:00
fix: edit load balancing not pass id (#8370)
This commit is contained in:
parent
84ac5ccc8f
commit
9d80d7def7
@ -214,6 +214,7 @@ const ModelLoadBalancingEntryModal: FC<ModelModalProps> = ({
|
|||||||
...value,
|
...value,
|
||||||
...getSecretValues(value),
|
...getSecretValues(value),
|
||||||
},
|
},
|
||||||
|
entry?.id,
|
||||||
)
|
)
|
||||||
if (res.status === ValidatedStatus.Success) {
|
if (res.status === ValidatedStatus.Success) {
|
||||||
// notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
|
// notify({ type: 'success', message: t('common.actionMsg.modifiedSuccessfully') })
|
||||||
|
@ -56,14 +56,14 @@ export const validateCredentials = async (predefined: boolean, provider: string,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const validateLoadBalancingCredentials = async (predefined: boolean, provider: string, v: FormValue): Promise<{
|
export const validateLoadBalancingCredentials = async (predefined: boolean, provider: string, v: FormValue, id?: string): Promise<{
|
||||||
status: ValidatedStatus
|
status: ValidatedStatus
|
||||||
message?: string
|
message?: string
|
||||||
}> => {
|
}> => {
|
||||||
const { __model_name, __model_type, ...credentials } = v
|
const { __model_name, __model_type, ...credentials } = v
|
||||||
try {
|
try {
|
||||||
const res = await validateModelLoadBalancingCredentials({
|
const res = await validateModelLoadBalancingCredentials({
|
||||||
url: `/workspaces/current/model-providers/${provider}/models/load-balancing-configs/credentials-validate`,
|
url: `/workspaces/current/model-providers/${provider}/models/load-balancing-configs/${id ? `${id}/` : ''}credentials-validate`,
|
||||||
body: {
|
body: {
|
||||||
model: __model_name,
|
model: __model_name,
|
||||||
model_type: __model_type,
|
model_type: __model_type,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user