Skip to content

v0.16.0

Choose a tag to compare

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

Release v0.16.0

Release Notes

This release introduces native Anthropic API support, allowing you to use Claude models directly without going through an intermediary service. It also adds fine-grained control over multi-provider completion behavior.

Features

Native Anthropic Provider

You can now use Claude models (claude-3-5-sonnet, claude-3-opus, etc.) directly via Anthropic's Messages API. This provides:

  • Full streaming support for real-time completions
  • Proper handling of system prompts (automatically extracted to Anthropic's top-level system field)
  • Configurable temperature, model, and base URL

Configure via config.toml:

[anthropic]
model = "claude-3-5-sonnet-20241022"
temperature = 0.2

Set your API key via HEXAI_ANTHROPIC_API_KEY or ANTHROPIC_API_KEY environment variable.

Multi-Provider Completion Control

New completion_wait_all setting lets you control whether hexai waits for all configured completion backends before returning results:

  • true (default): Waits for all backends, returns combined results
  • false: Returns the first result immediately for lower latency
[completion]
completion_wait_all = false

Configuration

New environment variables:

  • HEXAI_ANTHROPIC_API_KEY / ANTHROPIC_API_KEY — Anthropic API key
  • HEXAI_ANTHROPIC_BASE_URL — Custom Anthropic API endpoint
  • HEXAI_ANTHROPIC_MODEL — Model override
  • HEXAI_ANTHROPIC_TEMPERATURE — Temperature override

Bug Fixes

  • Fixed system message handling for Anthropic (system messages are now correctly placed in the API's system field rather than the messages array)