Skip to content

Release v0.5.0: Async tape storage

Choose a tag to compare

@frostming frostming released this 01 Mar 06:02
· 71 commits to main since this release
2d330aa

Key Changes

1. Added opt-in Responses API mode

LLM now supports use_responses: bool = False for explicit Responses mode.

  • When enabled (and supported by the provider), non-stream requests use the Responses API.
  • Added internal conversion from chat/tool history to Responses input items.
  • Tool-call extraction now supports both completion-style and responses-style payloads.

Files involved:

  • src/republic/llm.py
  • src/republic/core/execution.py
  • src/republic/clients/chat.py
  • tests/test_responses_handling.py

2. Tape subsystem refactored for async support

Tape management now supports both sync and async paths, including async storage and context lifecycle.

  • Added AsyncTapeStore protocol.
  • Added AsyncTapeStoreAdapter to wrap sync stores for async usage.
  • Added AsyncTapeManager for async read/write/handoff/record flows.
  • TapeQuery is now generic and supports await query.all() for async stores.
  • Tape session now provides async tape methods: read_messages_async, append_async, reset_async, handoff_async.

Files involved:

  • src/republic/tape/store.py
  • src/republic/tape/manager.py
  • src/republic/tape/query.py
  • src/republic/tape/session.py
  • src/republic/tape/__init__.py

3. Expanded top-level exports for async tape types

republic top-level exports now include:

  • AsyncTapeManager
  • AsyncTapeStore

Files involved:

  • src/republic/__init__.py

4. Reliability and release pipeline fixes

  • Fixed TapeEntry.copy() to preserve timestamp during copies.
  • Fixed docs deployment workflow permissions by adding contents: write to deploy-docs and updating actions/checkout version.

Files involved:

  • src/republic/tape/entries.py
  • .github/workflows/on-release-main.yml

Behavior Changes and Upgrade Notes

AsyncTapeStore with sync APIs

When tape_store is an AsyncTapeStore, sync APIs with tape=... raise ErrorPayload.

Use async APIs instead:

  • chat_async
  • tool_calls_async
  • run_tools_async
  • stream_async
  • stream_events_async

LLM direct tape helpers moved behind session objects

LLM no longer directly exposes:

  • tapes()
  • handoff(...)
  • read_messages(...)
  • query(...)
  • reset_tape(...)

Migration: use operations on the session returned by llm.tape("<name>").

Documentation Updates

  • docs/guides/tape.md now includes Async Tape Store usage and sync/async behavior rules.

Commit List

  • 2d330aa fix: add permissions for contents write in deploy-docs job
  • edd9400 chore: bump version to 0.5.0 in pyproject.toml, about.py, and uv.lock
  • 4ffea2d feat: Refactor tape management to support asynchronous operations (#19)
  • 04525fb fix: import time and include timestamp in TapeEntry copy method
  • b9069a5 feat: add opt-in Responses API mode (#18)

Upgrade Checklist

  • If you use an async tape backend, migrate tape-related calls to async APIs.
  • If you relied on removed LLM tape helpers, migrate to llm.tape(name).
  • Enable Responses behavior explicitly with LLM(..., use_responses=True) when needed.