Skip to content

Add ability to customise model request retry behaviour #677

Closed as duplicate of#782
@Finndersen

Description

@Finndersen

Currently there appears to be no easy way to customise the Model request retry behaviour, in cases of request error or unexpected response.

In one of my projects I've had to put exception handling around agent.run() to catch request failures (e.g. due to "Model is overloaded" errors from Gemini), however this is inefficient because it re-tries the entire Agent workflow (which may involve multiple model requests).

It would be good to be able to customise the retry logic for each individual model request (Model.request() call), for both:

  • Request errors (due to network issue, rate limiting, authorisation..)
  • Invalid/unexpected model response content/format (to be able to prompt model to correct itself part way through a multi-step interaction)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions