* 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
()
| 67 | * skip → web viewer sees inert cards with no file_uuid. |
| 68 | */ |
| 69 | function 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. |
no test coverage detected