v3.11.11: fix UnboundLocalError last_role in Gemini sanitizer
This commit is contained in:
@@ -5574,6 +5574,7 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||
if OAUTH_PROVIDER.startswith("google") and "claude" not in model.lower():
|
||||
sanitized = []
|
||||
last_user_text = None
|
||||
last_role = None
|
||||
for content in contents:
|
||||
role = content.get("role")
|
||||
parts = [p for p in content.get("parts", []) if isinstance(p, dict)]
|
||||
|
||||
Reference in New Issue
Block a user