aicommits
aicommits copied to clipboard
Request timeout after 10 seconds
Bug description
After updating to the latest version, the API is timing out for a lot of my commits.
Some of the larger ones used to take maybe 15-20 seconds to complete.
A timeout of 10 seconds was added in v1.3.0 https://github.com/Nutlope/aicommits/blame/v1.3.0/src/utils/openai.ts
Is there a reason this has been added?
aicommits version
1.5.1
Environment
System:
OS: macOS 12.3
CPU: (10) arm64 Apple M1 Max
Memory: 99.98 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 18.14.0 - /usr/local/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.3.1 - /usr/local/bin/npm
Can you contribute a fix?
- [ ] I’m interested in opening a pull request for this issue.
There's no bug here as this is the intended experience.
10s is more than long for something like this, and you'll lose the benefits of this tool if it's taking longer (you could type your own message in that time). It also probably means there's something wrong with OpenAI's API.
Given the timing of this report, you were probably affected by the outage: https://status.openai.com
As an action item, it's probably worth linking to that page when the request times out.
The timing was unfortunate, however, my point still stands.
I found the limit within the dist file and increased it to 100 seconds, and now my commits are running perfectly fine.
15-20 seconds is probably long enough to write the commit message myself, given I know what's happening in that file. This is fine when doing atomic commits, but after working in a flow state for a few hours, I often start committing files as I'm getting more tired. I've completely lost the context at this point, and having the AI tell me what's going on I can just confirm whatever it's telling me is correct.
In the end, isn't it up to me as a user if the AI is taking too long to answer? Why should the client between me and the AI limit the amount of time taken to generate a response, assuming it's still generating my response?
The timing was unfortunate, however, my point still stands.
I found the limit within the dist file and increased it to 100 seconds, and now my commits are running perfectly fine.
Where can I find the dist file? I've tried all over.
@CasperEngl
I was just answering your question. But it seems you're actually requesting a feature.
If you started with a feature request to add a timeout
config property containing milliseconds, that would be reasonable to me—PR welcome.
My bad for adding the wrong label.