-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to set custom timeout? #276
Comments
Thanks for trying aider! Aider uses the standard openai python library, which apparently does not accept a timeout parameter. |
Unfortunately, it requires a lot of code changes, as it is only available on the beta version: Looks like timeout is now a possible parameter: |
I will keep an eye on this new version of the api, thanks. |
Would be great to add support for a custom timeout. |
What is the error you are facing? The default of 10 minutes is a pretty long timeout. |
I am also running into timeout issues with my locally hosted QwQ model. It's EXTREMELY chatty, and responses can potentially take quite a long time. Would be great if we could increase the value. |
What is the problem here?
|
Number 1. I have seen replies close to 20k tokens. At 13ish tokens/seconds that is 25ish minutes. I know it's hardly usable at those speeds, but I find it interesting to see what is possible with today's tech. Furthermore, I do plan on using those long running prompts during breaks on issues that I havent been able to solve with traditional non-COT models. I would love for that 10 minutes to be configurable, so I can just set it at 1 hour or something ridiculous and roll with it. |
Example of the issue while benchmarking:
|
You can try The change is available in the main branch. You can get it by installing the latest version from github:
If you have a chance to try it, let me know if it works better for you. |
Wow that was quick, perfect, thanks! The benchmark does not accept the --timeout flag. I am guessing I can add the I am not sure that is working. I have set my openai-api-base and openai-api-key in that same file, to make sure it's really utilizing the file. And I am not able to connect to the specified models unless I explicitely add those to the OPENAI_API_BASE and OPENAI_API_KEY environment variables. |
No, the benchmark is not setup to read yml, etc. You would need to modify the benchmark code to do:
|
At the top of the benchmark.py file? |
I tried this, but the timeouts kept on happening. Is there any chance a --timeout switch can be introduced to the benchmark? The benchmark is where this feature is most useful. During normal use, tokens are streamed anyway which I reckon should prevent any timeouts from triggering. It's really the benchmark with the non-streamed responses which desperately need longer timeouts for chatty models such as QwQ |
Ahh, I might have misinterpreted the purpose of this thread. I was referring specifically to the |
I'm going to close this issue for now, but feel free to add a comment here and I will re-open. Or feel free to file a new issue any time. |
Is there any chance this issue could be revisited to implement this in the benchmark @paul-gauthier ? There have been so many interesting COT models that I would love to benchmark, but the timeout is problematic since the responses can be so long. I want to find out what model would work best, but right now the timeout errors are preventing me from evaluating this properly |
Sorry, I believe the code needed for a timeout is shown above? Just modify benchmark.py. |
That doesn't work. I have added the following block of code just below the regular imports:
This should let it timeout within 10 seconds, which is really easy to test as most queries will take up far longer than 10 seconds. But it will simply continue running past 10 seconds, which means it's probably still using the default timeout value. Could this be a litellm bug @paul-gauthier ? |
I cannot find my bug submission, thus apologies if I am in fact spamming, but I would love to try aider with my local R1, however I cannot due to API timeouts that I cannot circumvent. This is in normal use, not benchmarking, and aider still times out while waiting on R1 to produce anything regardless of the length set with I need to know whether it is possible to disable any API timeout handling - I (we?) are running a local API anyway so we have direct control over it, ergo any external API 'management' is undesirable. |
I've made some changes for timeouts. You can now set the timeout a few ways: In code:
In # global
- name: aider/extra_params
timeout: XXX
# for a specific model
- name: some/specific-model
timeout: YYYY From the command line:
Note, there seems to be a bug in litellm where it is not honoring the timeout setting for |
I'm going to consider this issue solved, and have created a new issue #3161 to track the ollama_chat specific bug. |
The changes are available in the main branch. You can get it by installing the latest version from github:
If you have a chance to try it, let me know if it works better for you. |
I'm closing this bug report since it has been marked as 'fixed' for over 3 weeks. This issue should be resolved in recent versions of aider. If you find that this bug is still present, please feel free to reopen this issue or create a new one with steps to reproduce. Note: A bot script made these updates to the issue. |
well tried to start it like before:
but got this
So now I have to attempt to figure out new configuration settings that will understand that this is a local API. I am not running a standalone LiteLLM, just aider... ok this was easy, I just added openai, like this I will next let you know if the timeout issue is resolved |
No timeout yet and it's been 3 hours, so far so good. Timeout is set to 138889 hours, should be enough :D |
I got the following message while working with a slow local model:
Is it possible to set custom values for the timeout and retry periods?
The text was updated successfully, but these errors were encountered: