dify/api/core
QuantumGhost 501d3b6203
feat(api): Explicitly define version method for all BaseNode subclasses (#21443)
This PR addresses issue #21441 by implementing explicit `version` method definitions for all `BaseNode` subclasses to improve code maintainability.

### Changes

Added explicit `version` method definitions for all `BaseNode` subclasses:

- `QuestionClassifierNode`
- `KnowledgeRetrievalNode` 
- `AgentNode`

Added comprehensive test suite to validate:

1. All subclasses of `BaseNode` have explicitly defined `version` method
2. All subclasses have required `_node_type` property
3. The `(node_type, node_version)` combination is unique across all subclasses
2025-06-24 20:27:22 +08:00
..
agent chore: remove agent turn limits (#19930) 2025-05-29 09:51:56 +08:00
app feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
base refactor: Remove RepositoryFactory (#19176) 2025-05-06 21:14:51 +08:00
callback_handler Refactor/message cycle manage and knowledge retrieval (#20460) 2025-05-30 14:36:44 +08:00
entities refactor: Improve model status handling and structured output (#20586) 2025-06-04 19:56:54 +08:00
errors fix(core/errors): change base class of custom exceptions to ValueError (#11955) 2024-12-22 10:41:34 +08:00
extension refactor: Improve model status handling and structured output (#20586) 2025-06-04 19:56:54 +08:00
external_data_tool Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
file feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
helper chore: replace pseudo-random generators with secrets module (#20616) 2025-06-06 10:48:28 +08:00
llm_generator Improve CONVERSATION_TITLE_PROMPT to correctly handle Japanese and input (#20351) 2025-05-30 14:43:51 +08:00
memory fix: Update prompt message content types to use Literal and add union type for content (#17136) 2025-04-22 16:17:55 +08:00
model_runtime refactor: Improve model status handling and structured output (#20586) 2025-06-04 19:56:54 +08:00
moderation Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
ops Minor Improvements for File Validation and Configuration Handling #21179 (#21171) 2025-06-18 18:33:28 +08:00
plugin Feat/plugin install scope management (#19963) 2025-06-18 16:25:00 +08:00
prompt Enhance Code Consistency Across Repository with `.editorconfig` (#19023) 2025-04-29 18:04:33 +08:00
rag fix: markdown_extractor lost chunks if it starts without a header(#21308) (#21309) 2025-06-21 23:10:00 +08:00
repositories feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
tools chore: bump mypy to 1.16 (#20608) 2025-06-11 01:01:33 +08:00
variables feat: Persist Variables for Enhanced Debugging Workflow (#20699) 2025-06-24 09:05:29 +08:00
workflow feat(api): Explicitly define version method for all BaseNode subclasses (#21443) 2025-06-24 20:27:22 +08:00
__init__.py chore(api/core): apply ruff reformatting (#7624) 2024-09-10 17:00:20 +08:00
hosting_configuration.py chore(provider_manager): Update hosted model's name (#14334) 2025-02-25 18:47:33 +08:00
indexing_runner.py chore: model.query change to db.session.query (#19551) 2025-05-13 09:13:12 +08:00
model_manager.py unreachable-code for lb model fetch. (#20797) 2025-06-18 14:33:49 +08:00
provider_manager.py refactor: Improve model status handling and structured output (#20586) 2025-06-04 19:56:54 +08:00