From 4ecaf6070c69d4a087e509c67eeea483db23033c Mon Sep 17 00:00:00 2001 From: wonder_land <61005155+kunwl123456@users.noreply.github.com> Date: Thu, 19 Feb 2026 03:18:50 +0800 Subject: [PATCH] fix(tools): remove non-string enum from pushover priority for Gemini compat The pushover tool priority parameter schema used integer enum values [-2, -1, 0, 1, 2]. OpenAI-compatible APIs accept this, but the Gemini API (and Gemini-relay proxies) strictly require all enum values to be strings, rejecting the request with 400 Bad Request. This causes every agent turn to fail with a non_retryable error when using Gemini models, regardless of user message content, because tool schemas are included in every request. Fix: remove the enum constraint, keeping integer type and description documenting the valid range. This is valid for both OpenAI and Gemini providers and requires no changes to execute() which already uses as_i64() with range validation. Co-Authored-By: Claude Sonnet 4.6 --- src/tools/pushover.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tools/pushover.rs b/src/tools/pushover.rs index 23d980b..308c2ff 100644 --- a/src/tools/pushover.rs +++ b/src/tools/pushover.rs @@ -99,7 +99,6 @@ impl Tool for PushoverTool { }, "priority": { "type": "integer", - "enum": [-2, -1, 0, 1, 2], "description": "Message priority: -2 (lowest/silent), -1 (low/no sound), 0 (normal), 1 (high), 2 (emergency/repeating)" }, "sound": {