Skip to content

Releases: runcycles/cycles-client-python

v0.4.0 — Dynamic subject and action fields on @cycles

27 Apr 23:52
8f8084c

Choose a tag to compare

What's Changed

The @cycles decorator now accepts callables on every previously-static field — six subject fields (tenant, workspace, app, workflow, agent, toolset), three action fields (action_kind, action_name, action_tags), and dimensions. Callables are invoked with the decorated function's *args, **kwargs at reservation time, enabling per-call budget routing and dynamic action labeling.

@cycles(
    estimate=lambda req, workspace_id: req.tokens * 10,
    workspace=lambda req, workspace_id: workspace_id,        # per-call routing
    action_kind=lambda req, *_: f"llm.{req.provider}",       # dynamic label
    action_name=lambda req, *_: req.model,
    dimensions=lambda req, *_: {"region": req.region},
)
def run_request(req: ResponseRequest, workspace_id: str) -> Response: ...

Mirrors the existing estimate / actual callable contract and re-aligns the Python client with the Java client's SpEL behavior shipped in cycles-spring-boot-starter 0.2.1.

Fallback semantics (preserved)

  • Subject callables returning None fall through to the client-config default.
  • action_kind / action_name returning None fall through to "unknown".
  • action_tags / dimensions returning None are omitted from the request.
  • Exceptions in user callables propagate fail-fast without creating a reservation.

No protocol or wire-format changes.

  • feat(decorator): support callables on subject and action fields by @amavashev in #46

Test coverage: 100% across all 13 modules (389 tests).

Full Changelog: v0.3.0...v0.4.0

v0.3.0 add streaming support

08 Apr 11:58
f29fd3a

Choose a tag to compare

What's Changed

  • Add Claude settings and git workflow guidelines by @amavashev in #22
  • Standardize CLAUDE.md and settings.json: fix typo, add schema, add gi… by @amavashev in #23
  • Add CLAUDE.md, settings.json, and SessionStart hook by @amavashev in #24
  • Refactor CI workflow to use shared workflow from .github repository by @amavashev in #25
  • Claude/analyze codebase metrics 9 uqs6 by @amavashev in #26
  • Fix contract test UTF-8 encoding for Windows compatibility by @amavashev in #27
  • Update coverage badge to reflect actual coverage by @amavashev in #32
  • Improve package metadata and discoverability by @amavashev in #33
  • chore(deps): bump actions/upload-artifact from 4 to 7 by @dependabot[bot] in #31
  • chore(deps): bump actions/checkout from 4 to 6 by @dependabot[bot] in #30
  • chore(deps): bump actions/setup-python from 5 to 6 by @dependabot[bot] in #29
  • chore(deps): bump actions/download-artifact from 4 to 8 by @dependabot[bot] in #28
  • Add project URLs for PyPI sidebar links by @amavashev in #34
  • Implement real integration tests for nightly pipeline by @amavashev in #36
  • Fix API response codes and parameter names in integration tests by @amavashev in #37
  • fix: guard requests import so CI collection doesn't fail by @amavashev in #38
  • feat: add StreamReservation context manager for streaming DX by @amavashev in #39

New Contributors

Full Changelog: v0.2.0...v0.3.0

v0.2.0 bug, fixed, support for 0.1.24 spec, more tests

24 Mar 21:27
b16772e

Choose a tag to compare

What's Changed

  • Add comprehensive integration examples for Cycles Python client by @amavashev in #9
  • Raise test coverage threshold from unconfigured to 95% by @amavashev in #10
  • Remove redundant --cov-fail-under=85 from CI workflow by @amavashev in #11
  • Move coverage config to [tool.coverage] so pytest works without pytes… by @amavashev in #12
  • Add API key creation instructions to README by @amavashev in #13
  • docs: fix broken docs URLs and add API key comment to examples by @amavashev in #14
  • Add badges to README for PyPI, CI, and License by @amavashev in #15
  • Add documentation links to README by @amavashev in #16
  • Document nested @cycles decorator behavior and best practices by @amavashev in #17
  • Claude/analyze spring issue 29 v biy9 by @amavashev in #18
  • Change default overage policy from REJECT to ALLOW_IF_AVAILABLE by @amavashev in #19
  • Add budget state and extension error codes, charged amount to response by @amavashev in #20
  • chore: bump version to 0.2.0 for protocol v0.1.24 by @amavashev in #21

Full Changelog: v0.1.3...v0.2.0

v0.1.3 minor updates, bug fixes, test coverage

15 Mar 10:22

Choose a tag to compare

What's Changed

  • Claude/review python cycles client w2 pzs by @amavashev in #5
  • test: close all coverage gaps, achieve 100% coverage by @amavashev in #6
  • Add comprehensive audit report and improve code quality by @amavashev in #7
  • ci: enforce 85% pytest coverage threshold in CI by @amavashev in #8

Full Changelog: v0.1.2...v0.1.3

v0.1.2 - cleanup, bug fixes, spec alignment, test coverage

13 Mar 00:56

Choose a tag to compare

What's Changed

  • Add comprehensive test coverage and input validation by @amavashev in #2
  • Enforce spec-required fields and fix estimate validation by @amavashev in #3
  • Claude/validate python client m soj n by @amavashev in #4

Full Changelog: v0.1.1...v0.1.2

v0.1.1 - minor doc updates

12 Mar 21:23
e32bb7f

Choose a tag to compare

v0.1.0 - Initial public release

12 Mar 21:15
8aa973a

Choose a tag to compare

What's Changed

  • Add comprehensive error handling and improve API model validation by @amavashev in #1

New Contributors

Full Changelog: https://github.com/runcycles/cycles-client-python/commits/v0.1.0