fix: mismatch between TOOL_SERVERS / TOOL_SERVER_CONNECTIONS indexing

This commit is contained in:
Thomas Rehn
2025-04-08 12:35:04 +02:00
parent 66322727e3
commit f5b2867e45
2 changed files with 8 additions and 3 deletions

View File

@@ -55,7 +55,12 @@ def get_tools(
tool_server_connection = (
request.app.state.config.TOOL_SERVER_CONNECTIONS[server_idx]
)
tool_server_data = request.app.state.TOOL_SERVERS[server_idx]
tool_server_data = None
for server in request.app.state.TOOL_SERVERS:
if server["idx"] == server_idx:
tool_server_data = server
break
assert tool_server_data is not None
specs = tool_server_data.get("specs", [])
for spec in specs: