diff --git a/app/services/dify-client.server.ts b/app/services/dify-client.server.ts index 052b8ad..559967b 100644 --- a/app/services/dify-client.server.ts +++ b/app/services/dify-client.server.ts @@ -29,6 +29,8 @@ const DIFY_CONFIG = { console.log('🔧 Dify Client Config:', { apiUrl: DIFY_CONFIG.API_URL, + apiBaseUrl: API_BASE_URL, + fullDifyUrl: `${API_BASE_URL}/dify`, appId: DIFY_CONFIG.APP_ID, hasApiKey: !!DIFY_CONFIG.API_KEY, configComplete: !!(DIFY_CONFIG.API_URL && DIFY_CONFIG.APP_ID) @@ -38,6 +40,13 @@ console.log('🔧 Dify Client Config:', { const difyFetch = async (endpoint: string, options: RequestInit = {}, jwt?: string) => { const url = `${DIFY_CONFIG.API_URL}/${endpoint.replace(/^\//, '')}`; + console.log('🌐 [DifyClient] 请求FastAPI代理:', { + endpoint, + fullUrl: url, + baseUrl: API_BASE_URL, + hasJWT: !!jwt + }); + // 使用 JWT 认证而非 API_KEY const headers: HeadersInit = { 'Content-Type': 'application/json',