Explorar el Código

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

Signed-off-by: jingfelix <jingfelix@outlook.com>
tags/1.7.1
Tianyi Jing hace 3 meses
padre
commit
3f8fb18c89
No account linked to committer's email address
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      api/core/tools/tool_manager.py

+ 2
- 1
api/core/tools/tool_manager.py Ver fichero

@@ -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,

Cargando…
Cancelar
Guardar