Skip to content

v0.24.0

@ozongzi ozongzi tagged this 08 May 20:08
Flips agentix from a pure client library into a client + protocol-translation
hub. New server-anthropic feature exposes any agentix upstream chain as an
Anthropic Messages-compatible HTTP endpoint; bundled `agentix` CLI binary
makes it a one-liner.

Headline use case: route Claude Code at the local `claude` OAuth subscription
with a paid-API fallback. Verified end-to-end against the official Anthropic
Python SDK (both streaming and non-streaming).

- src/server/anthropic/: inbound (wire→Request), outbound (LlmEvent→SSE state
  machine with lookahead-buffered close for signature_delta), fallback
  (peek-then-commit chain dispatch), error (Anthropic-shape JSON), mod (axum
  router). Endpoints: POST /v1/messages, POST /v1/messages/count_tokens,
  GET /v1/models.
- src/bin/agentix.rs: hand-rolled argv walker; repeated -i declares fallback
  chain, trailing --token/--model/--base-url bind to the most recent -i,
  URLs are auto-recognized and routed via Provider::OpenRouter.
- LlmEvent::ReasoningSignature(String) new variant emitted inline by
  Provider::Anthropic on signature_delta — enables end-to-end signature
  passthrough so client→agentix→Anthropic round-trips preserve thinking
  signatures.
- raw/anthropic/{request,response}.rs symmetrized: both Serialize and
  Deserialize on all wire types. SystemBlock.kind / RequestMessage.role
  change from &'static str to String (wire output identical).
- 23 new tests: 6 CLI parser, 7 inbound translation, 5 SSE state machine,
  5 server integration. All green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Assets 2
Loading