fix(fam-edge): 上传端点与签名修正 - Gemini 上传改用 /upload/v1beta/files 端点(原 /v1beta/files 非上传端点);NVIDIA PUT 用全小写 content-type 头(S3 预签名校验)

This commit is contained in:
ericwyuan
2026-08-21 11:43:58 +08:00
parent d54070ece4
commit daf0f8377b
2 changed files with 5 additions and 2 deletions

View File

@@ -126,7 +126,8 @@ class GeminiAdapter(BaseModelAdapter):
name = os.path.basename(video_path)
size = os.path.getsize(video_path)
upload_timeout = max(self.timeout, 900)
base = f"{self._base_url}/files?key={self.api_key}"
# 上传端点必须是 /upload/v1beta/files/v1beta/files 只是元数据端点,不接受上传协议)
base = f"https://generativelanguage.googleapis.com/upload/v1beta/files?key={self.api_key}"
# 1) 创建可续传上传会话
try:
r0 = requests.post(