fix: add missing model property to GoogleGeminiBot

api_key and api_base were refactored to @property but model was not
migrated, causing AttributeError: 'GoogleGeminiBot' object has no
attribute 'model' when using any Gemini model.
This commit is contained in:
cowagent
2026-03-22 22:43:26 +08:00
parent f3216904b3
commit d71ae406ff

View File

@@ -34,6 +34,13 @@ class GoogleGeminiBot(Bot):
def api_key(self):
return conf().get("gemini_api_key")
@property
def model(self):
model_name = conf().get("model") or "gemini-pro"
if model_name == "gemini":
model_name = "gemini-pro"
return model_name
@property
def api_base(self):
base = conf().get("gemini_api_base", "").strip()