Release 0.6.8
v0.6.8 - Library Migrations & Overall Cleanup
Big migration replacing 6 custom implementations with off-the-shelf libraries, reducing the amount of code and improving maintainability.
LLM Adapter Rewrite
- PydanticAI Integration: Replaced custom REST provider implementations with
pydantic-ailibrary - Model Registry: New
model_registry.pymaps Deriva config to PydanticAI model identifiers with URL normalization for Azure/LM Studio - Code Reduction: Same (or better) LLM adapter with way less code, deleted entire
providers.py - Native Structured Output: PydanticAI handles validation and retry automatically
Configuration
- Pydantic Settings: New
config_models.pywith type-safe environment validation usingpydantic-settings - Standard API Keys: Added PydanticAI standard env vars (
OPENAI_API_KEY,ANTHROPIC_API_KEY,MISTRAL_API_KEY,AZURE_OPENAI_*)
Caching
- diskcache Integration: Replaced custom SQLite-based caching with
diskcachelibrary - Simplified Cache Utils: Rewrote
cache_utils.pyto wrap diskcache withBaseDiskCacheclass - Preserved Features: Kept
hash_inputs(),bench_hashisolation, andexport_to_json()functionality - LLM & Graph Caches: Updated both adapters to use new base cache class
Retry Logic
- backoff Library: Replaced custom retry implementation with
backofflibrary - New retry.py: Centralized retry decorator with exponential backoff and jitter
- Simplified Rate Limiter: Token bucket rate limiting now separate from retry logic
Small CLI refactor
- Typer Framework: Replaced argparse-based CLI with
typer - Command Modules: Split CLI into
deriva/cli/commands/with separate files forbenchmark.py,config.py,repo.py,run.py - Modern CLI Features: Auto-completion, better help generation, type hints via
Annotated - Subcommand Groups:
config,repo,benchmarkas typer subapps
Logging
- structlog Integration: Rewrote
logging.pywithstructlogfor structured logging - Preserved API: Same RunLogger, StepContext, and JSONL output format
- OCEL Unchanged: OCEL module kept intact for benchmark process mining
Tests & Quality
- CLI Tests Rewritten: Updated all 51 CLI tests to use typer's
CliRunner - Tree-sitter Test Consolidation: Merged per-language test files into single
test_languages.py - Coverage Threshold: Updated CI coverage threshold to 80%
Full Changelog: v0.6.7...v0.6.8