我也是这个问题,奇怪了。
curl http://localhost:8082/health 这个请求有反应
{“status”:“healthy”,“timestamp”:“2025-06-23T16:04:19.075059”,“version”:“2.5.0”,“gemini_api_configured”:true,“api_key_valid”:true,“streaming_config”:{“force_disabled”:false,“emergency_disabled”:false,“max_retries”:12}}
但是curl http://localhost:8082/test-connection
则报超时错误{“status”:“failed”,“error_type”:“Connection Error”,“message”:“Connection or timeout error. Please check your internet connection and try again.”,“timestamp”:“2025-06-23T16:07:37.814844”,“suggestions”:[“Check your internet connection”,“Verify firewall settings allow HTTPS traffic”,“Try again in a few moments”]}l
而服务器端看配置是对的
~/src/claude_code_gemini_proxy$ python server.py Configuration loaded: API_KEY=********************…, BIG_MODEL=‘gemini-2.5-pro-preview-06-05’, SMALL_MODEL=‘gemini-2.5-pro-preview-06-05’ Validating startup configuration… Network connectivity: OK Enhanced Gemini-to-Claude API Proxy v2.5.0 Configuration loaded successfully
Big Model: gemini-2.5-pro-preview-06-05
Small Model: gemini-2.5-pro-preview-06-05
Available Models: 10
Max Tokens Limit: 8192
Request Timeout: 90s
Max Retries: 2
Max Streaming Retries: 12
Force Disable Streaming: False
Emergency Disable Streaming: False
HTTPS Proxy: http://proxy.xxx.com:8080/
Log Level: WARNING
Server: 0.0.0.0:8082