Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ public List<McpConnectivity> getMcpServers() {

private List<ModelConnectivity> getAllModelConnectivityDetails() {
ConfigEndpoint e = getEndpointConfig();
if (e.advertisedModels == null) {
return List.of();
}
return e.advertisedModels
.stream()
.map( a ->
Expand All @@ -239,14 +242,24 @@ private List<ModelConnectivity> getAllModelConnectivityDetails() {
a.capabilities(),
a.labels(),
apiKey,
apiBase + e.wireFormat().toLowerCase())
merge(apiBase, e.wireFormat().toLowerCase()))
)
.toList();
}

private String merge(String apiBase, String wireFormat) {
if (apiBase.endsWith("/")) {
return apiBase + wireFormat;
}
return apiBase + "/" + wireFormat;
}

private List<McpConnectivity> getAllMcpConnectivityDetails() {
return getEndpointConfig()
.advertisedMcpServers
ConfigEndpoint e = getEndpointConfig();
if (e.advertisedMcpServers == null) {
return List.of();
}
return e.advertisedMcpServers
.stream()
.map(m -> new McpConnectivity(m.url()))
.toList();
Expand Down