Refactor config system to use Pydantic validation

Refactored configuration classes to inherit from a new ValidatedConfigBase using Pydantic for robust validation and error reporting. Updated api_ada_configs.py, config.py, config_base.py, and official_configs.py to replace dataclasses with Pydantic models, add field validation, and improve error messages. This change enhances configuration reliability and developer feedback for misconfigurations. Also includes minor code cleanups and removal of unused variables in other modules.
This commit is contained in:
雅诺狐
2025-08-19 15:33:43 +08:00
parent 1b2c5393e5
commit 1405b50d5a
19 changed files with 710 additions and 1224 deletions

View File

@@ -11,8 +11,6 @@ from src.plugin_system import (
ToolParamType
)
from src.plugin_system.base.base_command import BaseCommand
from src.plugin_system.apis import send_api
from src.common.logger import get_logger
from src.plugin_system.base.component_types import ChatType