New Features
- Configurable HTTP client timeout (
http_timeout)- Added a new configuration option to control the HTTP client timeout (in seconds), allowing better support for slow or local models and environments with variable latency.
- Supports setting the timeout to
0for no timeout. - Code references:
config/config.go(newHTTPTimeoutfield)cmd/chatgpt/main.go(new config wiring andset-http-timeoutsupport)api/http/http.go(HTTP client now uses configured timeout)README.md(documented new setting)
Improvements
-
HTTP client behavior is now configurable rather than fixed
- Replaces the previously hardcoded timeout with a value driven by user configuration, improving flexibility across different runtime environments.
- Code reference:
api/http/http.go
-
Expanded test coverage for HTTP configuration
- Added tests to verify timeout behavior (configured timeout and default behavior).
- Code reference:
api/http/http_test.go
Bug Fixes
- No user-facing bug fixes identified beyond the shift from a hardcoded HTTP timeout to a configurable value.
Other Changes
- Documentation update
- Added
http_timeoutto the configuration/environment variable documentation table. - Code reference:
README.md
- Added
Upgrade Notes
- Homebrew (recommended):
- Run:
brew upgrade chatgpt-cli
- Run:
- Direct download:
- Download the prebuilt binaries for your specific OS from the project’s release artifacts and replace your existing
chatgptexecutable.
- Download the prebuilt binaries for your specific OS from the project’s release artifacts and replace your existing