fix(gateway): fix routing prefix matching and cache fallback tools
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 3m9s
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 3m9s
This commit is contained in:
@@ -154,6 +154,7 @@ public class McpRouterController {
|
||||
if (Boolean.TRUE.equals(t.getVisible()) && !knownTools.contains(t.getUid())) {
|
||||
activeTools.add(t);
|
||||
knownTools.add(t.getUid());
|
||||
registryService.saveTool(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ToolPlanner {
|
||||
String fallbackPodUrl = fallbackProperties.getDefaultUrl();
|
||||
if (fallbackProperties.getRoutes() != null) {
|
||||
for (Map.Entry<String, String> entry : fallbackProperties.getRoutes().entrySet()) {
|
||||
if (toolName.contains(entry.getKey())) {
|
||||
if (toolName.startsWith(entry.getKey() + "_")) {
|
||||
fallbackPodUrl = entry.getValue();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user