mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-01 06:18:21 +00:00
Phase 2 Task P2-5 (partial, Category D): RunContext gains an optional app_config field. Gateway deps.get_run_context populates it from app.state.config. Worker builds DeerFlowContext from ctx.app_config when provided, falling back to AppConfig.current() for legacy callers. This is the key path: Gateway-mode agent runs now construct DeerFlowContext without consulting the process-global at all — app_config flows from FastAPI's app.state through RunContext to Worker to Runtime.context. Standalone providers (checkpointer/store/stream_bridge) already accept optional config parameter from P1, so they are Phase 2-ready. 59 gateway/worker/run_manager tests pass.