Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.

Commit cdd789b

Browse files
committed
fix: update microservice URLs for authentication and logging services; inject runtime token into tools module
1 parent 0178bf9 commit cdd789b

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

config/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ class Settings:
1919

2020
# --- Microservice URLs (My Original Contribution) ---
2121
BASE_SERVICE_URL = os.getenv("BASE_SERVICE_URL", "http://localhost:8080/api/v1")
22-
AUTHENTICATION_SERVICE_URL = os.getenv("AUTHENTICATION_SERVICE_URL", BASE_SERVICE_URL + "/auth")
22+
AUTHENTICATION_SERVICE_URL = os.getenv("AUTHENTICATION_SERVICE_URL", BASE_SERVICE_URL + "/users")
2323
VEHICLE_SERVICE_URL = os.getenv("VEHICLE_SERVICE_URL", BASE_SERVICE_URL + "/vehicles")
24-
PROJECT_SERVICE_URL = os.getenv("PROJECT_SERVICE_URL", BASE_SERVICE_URL + "/jobs")
25-
TIME_LOGGING_SERVICE_URL = os.getenv("TIME_LOGGING_SERVICE_URL", BASE_SERVICE_URL + "/logs")
24+
PROJECT_SERVICE_URL = os.getenv("PROJECT_SERVICE_URL", BASE_SERVICE_URL + "/services")
25+
TIME_LOGGING_SERVICE_URL = os.getenv("TIME_LOGGING_SERVICE_URL", BASE_SERVICE_URL + "/time-logs")
2626

2727
# --- Appointment Service (Used by both Agent and RAG) ---
2828
APPOINTMENT_SERVICE_URL = os.getenv("APPOINTMENT_SERVICE_URL", BASE_SERVICE_URL + "/appointments")

services/agent_core.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,10 @@ async def invoke_agent(
135135
"tool_executed": None
136136
}
137137

138-
# 3. CRITICAL: Inject Runtime Variables into Tools
139-
# This is needed because tools are defined globally but need runtime data
140-
for tool in all_tools:
141-
if hasattr(tool, 'runtime_token'):
142-
tool.runtime_token = user_token
138+
# 3. CRITICAL: Inject Runtime Token into Tools Module
139+
# Set the module-level runtime_token variable in agent_tools
140+
import services.agent_tools as agent_tools_module
141+
agent_tools_module.runtime_token = user_token
143142

144143
# 4. Invoke Agent Executor (use ainvoke for async tools)
145144
result = await self.agent_executor.ainvoke({

0 commit comments

Comments
 (0)