Skip to content

[Feature Request] Automatic retry on Error #98

Description

@wedlj2094

Reference Issues

No response

Summary

When using Gemini via macai, if user input contain terms that could trigger Gemini's censorship system, it tends to block on first try, giving "Processing Error (Failed to process response: Failed to parse response)" on macai.
However for some reason, when I click retry, It almost always go through and give me response without an issue.
It would be great if user can set a "max automatic retry" parameter in settings.

Basic Example

If user sets "max automatic retry" to 3, macai will automatically retry 3 times when it encounters error, before showing error to user.

Drawbacks

No response

Unresolved questions

No response

Activity

  1. wedlj2094 commented on Mar 28, 2025

    @wedlj2094
    Author

    This comment is kind of a personal tantrum slightly unrelated to this feature request...

    When I use other methods to access gemini, like:

    1. aichat (cli based llm tool)
    2. directly calling rest api to gemini using curl
    3. call api using official gemini python package

    I always eventually stumble upon to Invalid response data: {"promptFeedback":{"blockReason":"OTHER"} Error/Censorship from Google.

    But When I use gemini with macai, with same system prompt and same user input, I rarely encounter this {"blockReason":"OTHER"} Error/Censorship. Even when I encounter this issue in macai, simply retrying mostly solves this issue, and macai just outputs the response.

    What is the difference? What is the secret? I tried to solve this issue for months and I am still so confused...

  2. Renset commented on Mar 31, 2025

    @Renset
    Owner

    @wedlj2094 there are no special tricks in macai to avoid censorship by API services, but this behavior is interesting indeed... If you can somehow share the example of the request, that is often censored by Google, it would be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions