Skip to content

v0.11.1

Choose a tag to compare

@snonux snonux released this 07 Feb 19:48
· 411 commits to main since this release

Release v0.11.1

Release Notes

Overview

This release delivers several key enhancements focused on improving Hexai's usability, reliability, and support for the latest LLM models. The highlights include global LLM usage statistics across all Hexai processes, improved support for OpenAI GPT-5 models (including default temperature and API compatibility), longer timeouts for large model responses, and numerous bug fixes and test coverage improvements. These changes make Hexai more robust for power users and teams, especially those using tmux or working with advanced LLMs.


Features

Global LLM Usage Statistics

  • Unified LLM Stats Across All Processes:
    Hexai now tracks and aggregates LLM usage statistics (requests, bytes sent/received, requests per minute) across all binaries (hexai-lsp, hexai, and hexai-tmux-action).
    Why it matters:

    • Provides a single, accurate view of your LLM usage, regardless of which tool or editor you use.
    • Stats are persisted on disk and updated atomically, so concurrent sessions (including tmux panes) always show up-to-date, global stats.
    • The tmux status line now displays global stats (Σ) for the configured time window, not just per-process stats.
  • Configurable Stats Window:

    • The aggregation window (default: 60 minutes) can be set in your config.toml under [stats] window_minutes.
    • Why: Lets you tune the stats view to your workflow, e.g., for short sprints or longer coding sessions.
  • Tmux Status Enhancements:

    • The status line now shows global stats, with options to limit width or show only global totals for narrow panes.
    • Why: Ensures the tmux status remains readable and informative, even in limited space.

Improvements

GPT-5 Model Support

  • Automatic Temperature Adjustment for GPT-5:

    • When using OpenAI GPT-5 models, Hexai now defaults the temperature to 1.0 (more creative), overriding the previous coding-friendly default of 0.2.
    • Why: GPT-5 models require a higher temperature for optimal performance; this change ensures better results out-of-the-box.
  • API Compatibility:

    • For GPT-5 models, Hexai now uses the correct max_completion_tokens parameter (instead of max_tokens) as required by the latest OpenAI API.
    • Why: Prevents API errors and ensures compatibility with new model endpoints.

Longer Timeouts for Large Model Responses

  • Increased Timeouts:
    • Timeouts for LLM requests (completions, code actions, chat) have been increased (e.g., from 10s to 20s, or 15s to 25s in some paths).
    • Why: Accommodates slower or larger responses from advanced models like GPT-5, reducing premature timeouts and improving reliability.

CLI and Editor Usability

  • Editor Behavior Fix:

    • The CLI now correctly prefers piped stdin when present and only opens the editor when no arguments or stdin are provided.
    • Why: Prevents unwanted editor popups and streamlines scripting or piping workflows.
  • Consistent Stats in CLI and Tmux:

    • The CLI and tmux-action now update and display global stats after each LLM call, matching the LSP behavior.
    • Why: Ensures all interfaces provide the same, up-to-date usage information.

Configuration

  • Stats Window Configuration:

    • New [stats] window_minutes option in config.toml to control the stats aggregation window.
    • Why: Gives users control over how much history is reflected in stats and the tmux status.
  • Documentation Updates:

    • Updated README.md, docs/tmux.md, and config.toml.example to document new stats features and configuration options.

Bug Fixes

  • OpenAI GPT-5 API Parameter:
    • Fixed an issue where GPT-5 models would fail due to the use of the deprecated max_tokens parameter; now uses max_completion_tokens as required.
  • Editor Launch Logic:
    • Fixed a bug where the CLI would open the editor even when stdin was present, improving scripting and automation support.
  • Test Coverage:
    • Added and improved tests for stats, OpenAI parameter selection, temperature logic, and CLI/editor behavior.

Developer Experience

  • Test Coverage:

    • Added comprehensive unit and integration tests for the new stats subsystem, OpenAI parameter logic, and CLI/editor flows.
    • Why: Ensures reliability and prevents regressions, especially as LLM APIs evolve.
  • Internal Documentation:

    • Added detailed design and migration notes for the global stats system (MAKEITSO.md).

Migration and Breaking Changes

  • Stats File Location:
    • Hexai now creates a stats.json file in your XDG cache directory (typically ~/.cache/hexai/). No action is required; this is automatic and backward-compatible.
  • Configuration:
    • To customize the stats window, add a [stats] window_minutes = 60 section to your config.toml (see the updated example file).
  • GPT-5 Model Users:
    • If you use GPT-5 models, you may notice more creative outputs due to the higher default temperature. You can override this in your config if needed.

How to Upgrade

  1. Update Hexai to the latest version as per the installation guide.
  2. (Optional) Review and update your config.toml to set the [stats] window_minutes if you want a different stats window.
  3. (Optional) For tmux users, review the updated docs/tmux.md for new status line options.

Thanks

Thank you to all users and contributors for feedback and testing, especially those using advanced LLM models and tmux workflows. Your input directly shaped these improvements!


For more details, see the updated documentation and configuration examples.