MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / modelsURL

Function modelsURL

internal/providers/models.go:185–194  ·  view source on GitHub ↗
(endpoint string)

Source from the content-addressed store, hash-verified

183}
184
185func modelsURL(endpoint string) string {
186 trimmed := strings.TrimRight(endpoint, "/")
187 modelsEndpoint := trimmed + "/v1/models"
188 if strings.HasSuffix(trimmed, "/v1/models") {
189 modelsEndpoint = trimmed
190 } else if strings.HasSuffix(trimmed, "/v1") {
191 modelsEndpoint = trimmed + "/models"
192 }
193 return withModelQuery(modelsEndpoint)
194}
195
196func rootModelsURL(endpoint string) string {
197 trimmed := strings.TrimRight(endpoint, "/")

Callers 1

modelDiscoveryURLsFunction · 0.85

Calls 1

withModelQueryFunction · 0.85

Tested by

no test coverage detected