v1.11.0
A feature-packed release: native function calling, JSON / structured output, accurate token counting, and a round of reliability hardening — all backward compatible.
✨ New features
- Native function calling — with
--tools(plus--mcp <endpoint>), the model can now call your MCP server's tools autonomously. The CLI lists the server's tools (tools/list), advertises them to the model, dispatches each requested call (tools/call), and feeds the results back until the model produces a final answer. A big step up from the one-shot--mcp-toolinjection. - JSON mode / structured output —
--jsonfor plain JSON output (shorthand for--response-format json_object), or--response-format '<schema>'/--response-format @schema.jsonto constrain output to a JSON Schema. - Accurate token counting — context-window truncation now uses real
tiktokenBPE counts for OpenAI models (embedded vocab, no runtime download), with a graceful fallback to the previous heuristic for non-OpenAI providers.
🛡️ Reliability
- Automatic retries with backoff — transient connection errors,
429, and5xxare retried; aRetry-Afterheader is honored, otherwise jittered exponential backoff. Tunable via the newmax_retriesandretry_base_delay_mssettings. - Graceful Ctrl-C — pressing Ctrl-C now cleanly cancels the in-flight request, stream, or agent loop instead of hard-killing the process. In interactive mode it aborts the current response and keeps the session alive.
- Streaming errors surfaced — a dropped connection mid-stream is now reported instead of silently returning a truncated response.
- Fail-loud config — an invalid numeric/boolean environment override now errors clearly instead of silently defaulting to zero.
⚙️ New config keys
response_format, tools, max_tool_calls, max_retries, retry_base_delay_ms — see the README configuration table for details.
🔧 Under the hood
cmd/chatgpt/main.gowas split into cohesive files and unit-test coverage was expanded (extracted CLI helpers,agent/tools).- No new user-facing dependencies of note; every change ships CI-green (unit + integration + contract).
How to update
You can update chatgpt-cli in one of two ways:
Option 1: Update via Homebrew (macOS / Linux)
If you installed via Homebrew, update to v1.11.0 with:
brew upgrade chatgpt-cliConfirm the installed version afterward:
chatgpt --versionOption 2: Direct download (prebuilt binaries)
If you installed using a standalone binary, download the v1.11.0 binary for your OS/architecture from the releases page and replace your existing binary:
- Download the correct binary for your OS (macOS, Linux, Windows, FreeBSD).
- Replace the existing binary in your
PATH. - On macOS/Linux, make it executable:
chmod +x /path/to/chatgpt- Verify:
chatgpt --version