MCPcopy Create free account
hub / github.com/EvoMap/evolver / safeStoredUpstreamBaseUrl

Function safeStoredUpstreamBaseUrl

src/proxy/clientSettings.js:162–173  ·  view source on GitHub ↗
(settings, cfg, value, opts = {})

Source from the content-addressed store, hash-verified

160}
161
162function safeStoredUpstreamBaseUrl(settings, cfg, value, opts = {}) {
163 const baseUrl = normalizeUrl(value);
164 if (!baseUrl) return '';
165 if (baseUrl === normalizeUrl(opts.url)) return '';
166 const proxyUrl = normalizeUrl(cfg && cfg.EVOMAP_PROXY_URL);
167 if (proxyUrl && baseUrl === proxyUrl) return '';
168 if (baseUrl === normalizeUrl(cfg && cfg.ANTHROPIC_BASE_URL)
169 && isManagedProxyBaseUrl(settings, cfg, cfg && cfg.ANTHROPIC_BASE_URL, opts)) {
170 return '';
171 }
172 return safeUpstreamBaseUrl(value, opts);
173}
174
175function readReusableClientProxyToken(opts = {}) {
176 const env = opts.env || process.env;

Callers 1

syncClaudeProxySettingsFunction · 0.85

Calls 3

normalizeUrlFunction · 0.85
isManagedProxyBaseUrlFunction · 0.85
safeUpstreamBaseUrlFunction · 0.85

Tested by

no test coverage detected