Skip to content

Adstract AI Python SDK v0.3.0

Choose a tag to compare

@Itonkdong Itonkdong released this 18 Feb 21:01
· 24 commits to main since this release

Adstract SDK 0.3.0 (2026-02-18)

This release introduces a major API simplification and backend-driven analytics/compliance model.
It includes multiple breaking changes to request/response shapes and method naming/default behavior.

Breaking changes

  • Removed Conversation class from request flow.
  • EnhancementResult now returns session_id: str instead of conversation: Conversation.
  • Renamed AdRequestConfiguration to AdRequestContext.
  • AdRequestContext is now sent as a wrapped object with:
    • session_id
    • user_agent
    • x_forwarded_for
  • Added RequestConfiguration class to wrap wrapping_type.
  • AdRequest now sends structured objects:
    • request_context (AdRequestContext)
    • diagnostics (Diagnostics)
    • request_configuration (RequestConfiguration)
  • Removed metadata/analytics/compliance-related models from SDK payload construction:
    • ClientMetadata
    • Metadata
    • Analytics
    • Compliance
    • ErrorTracking
    • ExternalMetadata
  • AdAck payload simplified to:
    • ad_response_id
    • llm_response
    • diagnostics
  • Removed AepiData.
  • AdResponse simplified to:
    • ad_request_id
    • ad_response_id
    • success
    • execution_time_ms
    • prompt (optional)
    • product_name (optional)
  • Removed fields from AdResponse:
    • aepi
    • tracking_url
    • tracking_identifier
    • sponsored_label
  • Renamed methods:
    • request_ad_or_default -> request_ad
    • request_ad_or_default_async -> request_ad_async
  • Default behavior changes:
    • request_ad / request_ad_async now use raise_exception=True by default.
    • analyse_and_report / analyse_and_report_async now use raise_exception=True by default.
    • Set raise_exception=False for graceful/fallback-style behavior.

Migration notes

  • Replace all usages of AdRequestConfiguration with AdRequestContext.
  • Update code expecting EnhancementResult.conversation to use EnhancementResult.session_id.
  • Update method calls to request_ad / request_ad_async.
  • Review error-handling flow due to new default raise_exception=True.