Skip to content

Release 0.3.0: Tape-First UX Refresh

Choose a tag to compare

@PsiACE PsiACE released this 08 Feb 17:52
· 42 commits to main since this release

This release refines Republic around a tape-first, practical developer workflow. The API surface is smaller and more intentional, docs/examples were fully rewritten, and reliability improved in streaming and fallback behavior.

Highlights

  • Tape-first flow with explicit anchors (handoff) and queryable execution history.
  • Unified LLM facade for chat, tools, streaming, text decisions, and embeddings.
  • Structured return pattern (value + error) across core interfaces.
  • Improved event streaming, including more robust tool-call delta merging.
  • Better error classification and fallback handling across provider exception shapes.
  • New docs and runnable examples with a simpler, usage-first style.
  • Contract-style test suite focused on user-facing behavior.

Example

import os

from republic import LLM

llm = LLM(model="openrouter:openrouter/free", api_key=os.environ["LLM_API_KEY"])

out = llm.chat("Describe Republic in one sentence.", max_tokens=48)
print(out.value if out.error is None else out.error.message)

tape = llm.tape("release-notes")
tape.handoff("draft_v1", state={"owner": "assistant"})

reply = tape.chat("Summarize the latest changes in three bullets.", max_tokens=96)
print(reply.value if reply.error is None else reply.error.message)

Upgrade Notes

  • Main usage is now centered on LLM + structured outputs.
  • Docs were reorganized to a Quickstart + focused Guides layout.
  • Streaming/tool behavior is aligned around explicit inspectable results.
  • Error/retry/fallback logic was updated for mixed provider environments.
  • Core dependency surface now includes pydantic.

Thanks

Derived from lightning-ai/litai, inspired by pydantic/pydantic-ai, and adapted into Republic’s tape-first execution style.