Skip to content

v1.11.0

Latest

Choose a tag to compare

@kardolus kardolus released this 31 Jul 11:18
08834f7

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-tool injection.
  • JSON mode / structured output--json for plain JSON output (shorthand for --response-format json_object), or --response-format '<schema>' / --response-format @schema.json to constrain output to a JSON Schema.
  • Accurate token counting — context-window truncation now uses real tiktoken BPE 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, and 5xx are retried; a Retry-After header is honored, otherwise jittered exponential backoff. Tunable via the new max_retries and retry_base_delay_ms settings.
  • 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.go was 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-cli

Confirm the installed version afterward:

chatgpt --version

Option 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:

  1. Download the correct binary for your OS (macOS, Linux, Windows, FreeBSD).
  2. Replace the existing binary in your PATH.
  3. On macOS/Linux, make it executable:
chmod +x /path/to/chatgpt
  1. Verify:
chatgpt --version