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

Function getBridgeBaseUrl

src/tools/BriefTool/upload.ts:69–75  ·  view source on GitHub ↗

* Base URL for uploads. Must match the host the token is valid for. * * Subprocess hosts (cowork) pass ANTHROPIC_BASE_URL alongside * CLAUDE_CODE_OAUTH_TOKEN — prefer that since getOauthConfig() only * returns staging when USE_STAGING_OAUTH is set, which such hosts don't * set. Without this a s

()

Source from the content-addressed store, hash-verified

67 * skip → web viewer sees inert cards with no file_uuid.
68 */
69function getBridgeBaseUrl(): string {
70 return (
71 getBridgeBaseUrlOverride() ??
72 process.env.ANTHROPIC_BASE_URL ??
73 getOauthConfig().BASE_API_URL
74 )
75}
76
77// /api/oauth/file_upload returns one of ChatMessage{Image,Blob,Document}FileSchema.
78// All share file_uuid; that's the only field we need.

Callers 1

uploadBriefAttachmentFunction · 0.70

Calls 2

getBridgeBaseUrlOverrideFunction · 0.85
getOauthConfigFunction · 0.85

Tested by

no test coverage detected