MCPcopy Create free account
hub / github.com/altic-dev/FluidVoice / providerKey

Method providerKey

Sources/Fluid/ContentView.swift:1569–1578  ·  view source on GitHub ↗
(for providerID: String)

Source from the content-addressed store, hash-verified

1567 // MARK: - Provider Management Functions
1568
1569 private func providerKey(for providerID: String) -> String {
1570 let trimmed = providerID.trimmingCharacters(in: .whitespacesAndNewlines)
1571 guard !trimmed.isEmpty else { return "" }
1572
1573 // Built-in providers use their ID directly
1574 if ModelRepository.shared.isBuiltIn(trimmed) { return trimmed }
1575 // Saved providers use their stable id with "custom:" prefix (if not already present)
1576 if trimmed.hasPrefix("custom:") { return trimmed }
1577 return "custom:\(trimmed)"
1578 }
1579
1580 private func updateCurrentProvider() {
1581 // Map baseURL to canonical key for built-ins; else keep existing

Callers 8

loadProviderStateMethod · 0.95
updateCurrentProviderMethod · 0.95
processTextWithAIMethod · 0.95
addNewModelMethod · 0.95
removeModelMethod · 0.95

Calls 1

isBuiltInMethod · 0.80

Tested by

no test coverage detected