dify/api/core
Harry 70d0d46678 fix(api): remove tool provider list cache to fix cache inconsistency
This commit removes the Redis caching mechanism for tool provider list
API that was introduced in #29101.

## Problems with the current caching approach

1. **Cache inconsistency**: After CRUD operations on tool providers,
   cached data may not be properly invalidated, causing stale data.

2. **Race conditions**: Cache invalidation timing issues - invalidating
   inside Redis locks caused timeouts (#30150), moving outside causes
   race conditions.

3. **Hard to maintain**: Manual cache invalidation scattered across
   multiple service files is error-prone and difficult to maintain.

4. **User-facing symptoms**:
   - Newly created tools not appearing in the list
   - Deleted tools still showing up
   - Updated tool configurations not reflecting immediately
   - MCP provider auth state not updating correctly

## Changes

- Remove `ToolProviderListCache` class and its usage
- Remove cache invalidation calls from all service files
- Remove related test mocks
- Keep the code optimizations from #29101 (session management, batch processing)

Fixes #30322

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 16:32:42 +08:00
..
agent feat(api): Implement EventManager error logging and add coverage (#29204) 2025-12-08 09:40:40 +08:00
app fix: release graph_runtime_state reference to prevent memory leak under high load (#30236) 2025-12-29 10:35:47 +08:00
base feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
callback_handler Feat/support multimodal embedding (#29115) 2025-12-09 14:41:46 +08:00
datasource chore: remove redundant reimports (#28415) 2025-11-20 11:28:29 +08:00
db refactor: admin api using session factory (#29628) 2025-12-15 12:01:41 +08:00
entities fix: correct i18n SSO translations and fix validation/type issues (#29564) 2025-12-15 15:58:33 +09:00
errors chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
extension change all to httpx (#26119) 2025-10-10 23:41:16 +08:00
external_data_tool chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
file fix: `File` model add known extra fields, fix issue about the tool of… (#27607) 2025-11-04 09:57:25 +08:00
helper fix(api): remove tool provider list cache to fix cache inconsistency 2025-12-29 16:32:42 +08:00
llm_generator fix(api): use json_repair for conversation title parsing (#29649) 2025-12-15 11:29:28 +08:00
mcp fix: Add JSON RPC request type guard (#30216) 2025-12-28 03:02:46 +09:00
memory refactor:Decouple Domain Models from Direct Database Access (#27316) 2025-10-28 09:59:30 +08:00
model_runtime fix: drop some dead links (#29827) 2025-12-18 10:52:19 +08:00
moderation fix(moderation): change OpenAI moderation model to omni-moderation-la… (#28119) 2025-11-13 15:21:44 +08:00
ops fix(ops): correct LangSmith dotted_order timestamp format (#30022) 2025-12-23 19:00:17 +08:00
plugin fix: validate first then save to db (#30107) 2025-12-25 19:36:52 +09:00
prompt Feat/support multimodal embedding (#29115) 2025-12-09 14:41:46 +08:00
rag fix: retrieval test and knowledge retrieval node failed in multimodal mode (#30210) 2025-12-26 21:42:06 +08:00
repositories rm type ignore (#25715) 2025-10-21 11:26:58 +08:00
schemas Feat/support multimodal embedding (#29115) 2025-12-09 14:41:46 +08:00
tools feat: MCP tool adds support for embeddedResource (#30261) 2025-12-29 10:15:47 +08:00
trigger feat: add editing support for trigger subscriptions (#29957) 2025-12-24 19:15:54 +08:00
variables fix(api): `SegmentType.is_valid()` raises `AssertionError` for `SegmentType.GROUP` (#28249) 2025-11-21 16:43:09 +09:00
workflow fix: fix DatasetRetrieval._process_metadata_filter_func miss in operator (#30199) 2025-12-26 16:34:50 +08:00
__init__.py Fix basedpyright type errors (#25435) 2025-09-10 01:54:26 +08:00
hosting_configuration.py chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
indexing_runner.py fix: handle missing `credential_id` (#30051) 2025-12-24 11:21:51 +08:00
model_manager.py Feat/support multimodal embedding (#29115) 2025-12-09 14:41:46 +08:00
provider_manager.py more typed orm (#28507) 2025-11-21 21:45:51 +08:00