Releases: cominty/python-sdk
Releases · cominty/python-sdk
Release list
v0.4.0
Notes
Adds thread management and multi-turn conversations, and makes rate-limit errors
actually readable. Builds on the v1 redesign (0.3.0).
⚠️ Breaking changes
user_idmoved to the client and is now mandatory. Set it once via
AsyncCominty(user_id="user_...")orCOMINTY_USER_ID; it's validated at
construction and applied to every request. It's been removed from
chat.start(and all other call signatures).# before (0.3.0) await client.chat.start(agent_id=..., message=..., user_id="user_...") # now (0.4.0) client = AsyncCominty(user_id="user_...") await client.chat.start(agent_id=..., message=...)
✨ New
- client.threads : full thread management: list (scoped to the user, with
terms/limit/page), get, update (partial), archive. - chat.send(thread_id, ...) : follow-up messages in an existing thread; same
streamable run as start. Use it to answer an agent's clarifying questions. - AssistantRun.questions() : read the agent's clarifying questions
(prompt + options) when it needs input instead of answering. - Clearer 429s. RateLimitError now renders a scope-aware, actionable message
(organization quota vs. user quota vs. concurrency cap) and exposes
.scope, .retry_after, and .reset_at.
🐛 Fixes
- chat.send now correctly parses POST /chat/{id} as the assistant Message
(it returns a message, not a thread). - threads.update now correctly returns a ThreadSummary (PUT /chat/{id}
responds without the message history). - Removed a stray pdb.set_trace() from the transport layer.
📚 Docs & examples
- Eight runnable examples under examples/:
streaming, await-result, follow-up, answering questions, listing/managing
threads, calling a custom managed agent, and pulling live context from an
MCP server (Linear) with colored, aligned rich output. - New SDK & API reference at docs/sdk-reference.md; README rewritten to the
real surface.
v0.3.0
What's Changed
The v1 redesign of the Cominty Python SDK: a cleaner public surface, a broader
supported-Python range, and typed streaming and error handling throughout.
⚠️ Breaking changes
- Renamed public response models — dropped the
Outsuffix:ThreadOut→Thread,ThreadSummaryOut→ThreadSummaryMessageOut→MessageAgentOut→AgentConversationFileOut→ConversationFile
AsyncHTTPClient→AsyncTransportThreadUpdate→UpdateThreadParams- New module layout (models, streaming, and transport split into their own
modules) — update your imports accordingly.
✨ Highlights
- Wider Python support: 3.9+ (was 3.11+). Installs and runs on 3.9 through
3.13, verified across the full matrix in CI. StreamHandle[EventT]— typed, public primitive for consuming chat event
streams.- Typed error bodies —
APIError.errornow carries a structured
APIErrorBodymodel instead of a raw dict. - Explicit
__all__across modules for a clean, intentional public API.
APIErrorBodymodel instead of a raw dict. - Explicit
__all__across modules for a clean, intentional public API. - Fully typed (pyright strict) and
py.typedshipped, so downstream type
checkers see the SDK's types.
🛠 Tooling & internals
- Toolchain standardized on uv + ruff + pyright (strict) + pytest-asyncio.
- Added
AGENTS.md— the coding playbook for typing and versioning conventions. - PyPI publishing via GitHub Releases using Trusted Publishing (OIDC) — no
stored tokens — plusinvokerelease tasks. - Added
eval-type-backport(Python < 3.10) so Pydantic resolvesX | Yfield
annotations on the new 3.9 floor.