mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-17 19:44:45 +08:00
Enforces config env var checks and improves startup handling (#892)
* Enforces config env var checks and improves startup handling Ensures critical environment variables are validated during config resolution, raising clear errors if missing. Improves server startup reliability by verifying that backend services are listening and by terminating on misconfiguration at launch. Adds more robust feedback to developers when API startup fails, reducing silent misconfigurations and speeding up troubleshooting. * Initial plan * Implement suggestions from PR #892: fix env var checks and improve error logging Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com> Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ from src.agents.middlewares.title_middleware import TitleMiddleware
|
||||
from src.agents.middlewares.uploads_middleware import UploadsMiddleware
|
||||
from src.agents.middlewares.view_image_middleware import ViewImageMiddleware
|
||||
from src.agents.thread_state import ThreadState
|
||||
from src.config.app_config import get_app_config
|
||||
from src.config.summarization_config import get_summarization_config
|
||||
from src.models import create_chat_model
|
||||
from src.sandbox.middleware import SandboxMiddleware
|
||||
@@ -213,7 +214,6 @@ def _build_middlewares(config: RunnableConfig):
|
||||
|
||||
# Add ViewImageMiddleware only if the current model supports vision
|
||||
model_name = config.get("configurable", {}).get("model_name") or config.get("configurable", {}).get("model")
|
||||
from src.config import get_app_config
|
||||
|
||||
app_config = get_app_config()
|
||||
# If no model_name specified, use the first model (default)
|
||||
|
||||
Reference in New Issue
Block a user