Skip to content

v0.7.0: V2 Standard Error Codes & Cross-Runtime Compliance

Choose a tag to compare

@hiddenpath hiddenpath released this 15 Feb 06:35
· 115 commits to main since this release

What's New

V2 Standard Error Codes

  • 13-variant StandardErrorCode enum (E1001-E9999) aligned with AI-Protocol V2
  • from_provider_code(), from_error_class(), from_http_status() converters
  • Each code carries retryable(), fallbackable(), category() metadata

Feature Flags

  • 7 Cargo features: embeddings, batch, guardrails, tokens, telemetry, routing_mvp, interceptors
  • full meta-feature for convenience
  • Core feedback types always compiled; telemetry sinks feature-gated

Cross-Runtime Compliance

  • Compliance test runner against ai-protocol test suite
  • 20/20 test cases passing

Optimizations

  • Eliminate duplicate error_code_from_body() calls in error paths
  • Attach V2 StandardErrorCode directly to ErrorContext
  • Optimize format_context() to single-buffer write (reduce heap allocations)
  • Add standard_code to structured logging for observability

Documentation

  • Chinese one-line description on all module doc headers
  • Strengthened .gitignore patterns

Bug Fixes

  • Fix batch/collector.rs unclosed delimiter causing build failure with --all-features