fix: delete the old provider_config_cache after refresh_credentials (#23033)

Signed-off-by: jingfelix <jingfelix@outlook.com>
This commit is contained in:
Tianyi Jing 2025-07-28 14:07:51 +08:00 committed by GitHub
parent f72c03a174
commit 3f8fb18c89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -237,7 +237,7 @@ class ToolManager:
if builtin_provider is None:
raise ToolProviderNotFoundError(f"builtin provider {provider_id} not found")
encrypter, _ = create_provider_encrypter(
encrypter, cache = create_provider_encrypter(
tenant_id=tenant_id,
config=[
x.to_basic_provider_config()
@ -281,6 +281,7 @@ class ToolManager:
builtin_provider.expires_at = refreshed_credentials.expires_at
db.session.commit()
decrypted_credentials = refreshed_credentials.credentials
cache.delete()
return cast(
BuiltinTool,