Migrating from v0 to v1
Basalt v1 is a major update that introduces a unified observability system based on OpenTelemetry and a more consistent SDK API. This guide covers the main changes you need to make when upgrading.Key Changes at a Glance
| Feature | v0 (Legacy) | v1 (Current) |
|---|---|---|
| Prompts API | basalt.prompt | basalt.prompts |
| Tracing | basalt.monitor / generation.end() | start_observe / observe |
| Identity | Manual in log or trace | Automatic via context propagation |
| Error Handling | Error as value (error, result = ...) | Standard Python Exceptions |
1. Prompts API
The prompts API has been renamed fromprompt to prompts (plural) and now distinguishes between synchronous and asynchronous calls.