Skip to content

v0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Nov 02:03
· 3 commits to main since this release
6fcdd22

Handles Perplexity's asynchronous cancel and reports why a run stopped early.

BREAKING CHANGE: AgentStatus gains CANCELLING. Code that matches every AgentStatus member with no default needs a branch for it. It is not terminal: wait() keeps polling until CANCELLED.

Fixed

  • cancel() no longer raises on a successful cancel. Perplexity acknowledges with {response_id, status: "cancelling"}; the client reads response_id, and falls back to id only when response_id is absent.
  • cancel() refuses an acknowledgement whose run ID differs from the ID you asked to cancel, with INVALID_RESPONSE and guidance to use retrieve(). Only the one cancel request is sent.

Added

  • AgentResponse.incomplete_reason() returns the provider's reason for an incomplete run, such as max_output_tokens, or None.