MCPcopy
hub / github.com/codeaashu/claude-code / isFirstPartyAnthropicBaseUrl

Function isFirstPartyAnthropicBaseUrl

src/utils/model/providers.ts:25–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 * (or api-staging.anthropic.com for ant users).
24 */
25export function isFirstPartyAnthropicBaseUrl(): boolean {
26 const baseUrl = process.env.ANTHROPIC_BASE_URL
27 if (!baseUrl) {
28 return true
29 }
30 try {
31 const host = new URL(baseUrl).host
32 const allowedHosts = ['api.anthropic.com']
33 if (process.env.USER_TYPE === 'ant') {
34 allowedHosts.push('api-staging.anthropic.com')
35 }
36 return allowedHosts.includes(host)
37 } catch {
38 return false
39 }
40}
41

Callers 10

toolToAPISchemaFunction · 0.85
isPolicyLimitsEligibleFunction · 0.85
isUsingOAuthFunction · 0.85
buildFetchFunction · 0.85
queryModelFunction · 0.85
isUsingOAuthFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected