@zappCLI Proxy API反代反重力,调用大香蕉报错 中发帖

我用Claude code写了一个python脚本调用反重力的大香蕉模型,结果出现认证报错的情况,不知道各位大佬有没有解决办法。谢谢。 
用的是 google.generativeai 官方 SDK,通过 client_options。把请求转发到你的本地代理 http://localhost:8317。报错 auth_unavailable: no auth available。
下面是调用的示例代码。
import google.generativeai as genai

genai.configure(
api_key="sk-xxxx",
transport='rest',
client_options={'api_endpoint': 'http://localhost:8317'}
)
model = genai.Gen...