Refactor DeerFlow to use Gateway's LangGraph-compatible API

- Updated documentation and comments to reflect the transition from LangGraph Server to Gateway.
- Changed default URLs in ChannelManager and tests to point to Gateway.
- Removed references to LangGraph Server in deployment scripts and configurations.
- Updated Nginx configuration to route API traffic to Gateway.
- Adjusted frontend configurations to utilize Gateway's API.
- Removed LangGraph service from Docker Compose files, consolidating services under Gateway.
- Added regression tests to ensure Gateway integration works as expected.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
JeffJiang
2026-04-26 20:38:34 +08:00
parent 653b7ae17a
commit 7bf618de67
20 changed files with 177 additions and 474 deletions
+6 -6
View File
@@ -495,7 +495,7 @@ class TestChannelManager:
await _wait_for(lambda: len(outbound_received) >= 1)
await manager.stop()
# Thread should be created on the LangGraph Server
# Thread should be created through Gateway
mock_client.threads.create.assert_called_once()
# Thread ID should be stored
@@ -1987,28 +1987,28 @@ class TestChannelService:
def test_service_urls_fall_back_to_env(self, monkeypatch):
from app.channels.service import ChannelService
monkeypatch.setenv("DEER_FLOW_CHANNELS_LANGGRAPH_URL", "http://langgraph:2024")
monkeypatch.setenv("DEER_FLOW_CHANNELS_LANGGRAPH_URL", "http://gateway:8001/api")
monkeypatch.setenv("DEER_FLOW_CHANNELS_GATEWAY_URL", "http://gateway:8001")
service = ChannelService(channels_config={})
assert service.manager._langgraph_url == "http://langgraph:2024"
assert service.manager._langgraph_url == "http://gateway:8001/api"
assert service.manager._gateway_url == "http://gateway:8001"
def test_config_service_urls_override_env(self, monkeypatch):
from app.channels.service import ChannelService
monkeypatch.setenv("DEER_FLOW_CHANNELS_LANGGRAPH_URL", "http://langgraph:2024")
monkeypatch.setenv("DEER_FLOW_CHANNELS_LANGGRAPH_URL", "http://gateway:8001/api")
monkeypatch.setenv("DEER_FLOW_CHANNELS_GATEWAY_URL", "http://gateway:8001")
service = ChannelService(
channels_config={
"langgraph_url": "http://custom-langgraph:2024",
"langgraph_url": "http://custom-gateway:8001/api",
"gateway_url": "http://custom-gateway:8001",
}
)
assert service.manager._langgraph_url == "http://custom-langgraph:2024"
assert service.manager._langgraph_url == "http://custom-gateway:8001/api"
assert service.manager._gateway_url == "http://custom-gateway:8001"
def test_disabled_channel_with_string_creds_emits_warning(self, caplog):