All notable changes to django-ai-sdk are documented here.
The format follows Keep a Changelog. This project adheres to Semantic Versioning.
- Performance benchmark suite (planned)
- Full API reference documentation (planned)
0.1.9 β 2026-04-01
- Python 3.14 compatibility:
BaseContext.__copy__in Django 4.x/5.0 replaces an instance's__dict__wholesale after reassigning__class__, which Python 3.14 no longer permits β the object ends up in a broken state causingAttributeError: 'super' object has no attribute 'dicts'on any admin list view.AiSdkConfig.ready()now applies a targeted patch (object.__new__+ in-place__dict__.update) that is a no-op on Python < 3.14 or Django β₯ 5.1 where the issue does not exist.
pyproject.toml: addedProgramming Language :: Python :: 3.14classifier.
0.1.3 β 2026-03-31
DocumentationURL in package metadata updated tohttps://docs.djangosdk.com
0.1.2 β 2026-03-31
djangosdk.agents.mixinsre-exported__all__names without importing them βfrom djangosdk.agents.mixins import HasTools(and all other mixins) raisedImportError(#bug)- Tool-call loop in
promptable.pyaccessedtc["id"]andtc["arguments"]with hard key lookups;FakeProvidertool_calls omitidand useargsβ loop now uses.get("id", f"call_{i}")and.get("arguments", tc.get("args", {}))for both sync and async paths HasStructuredOutput._validate_structured_output()was defined but never called βresponse.structuredwas alwaysNoneeven whenoutput_schemawas set;handle()andahandle()now invoke validation before returning
0.1.0 β 2026-03-30
Phase 1 β MVP
Agentbase class with mixin composition (Promptable,HasTools,HasStructuredOutput,Conversational,ReasoningMixin)LiteLLMProviderβ unified provider abstraction over 12+ AI providers via litellm 1.82.6ProviderRegistryβ singleton built fromAI_SDKsettings; supports provider failoverPromptCacheMiddlewareβ automatic Anthropic and OpenAI prompt cache prefix injectionReasoningConfigβ native parameter injection for o3/o4 (reasoning_effort), Claude 3.7 (extended_thinking+thinking_budget), DeepSeek R1 (budget_tokens)@tooldecorator β converts type-annotated functions into JSON schema tool definitionsToolRegistryβ per-agent tool registry with sync and async dispatchConversationandMessageDjango ORM models with UUID primary keysmigrations/0001_initial.pyβ initial database schema- DRF serializers:
ConversationSerializer,MessageSerializer - DRF views:
ChatAPIView,StreamingChatAPIView SyncSSEResponseandAsyncSSEResponseβ SSE streaming for WSGI and ASGIStructuredOutputβ Pydantic v2 schema extraction and validationFakeProviderandFakeAgentβ test utilities (never call real APIs)assert_prompt_sent(),assert_tool_called(),assert_model_used(),assert_system_prompt_contains()β test assertion helpersagent_started,agent_completed,agent_failed,agent_failed_over,cache_hit,cache_missDjango signalsai_settingslazy accessor with deep-merge defaultsAiSdkConfigβ initializesProviderRegistryon Django startupai_sdk_publishmanagement command β printsAI_SDKsettings skeletonai_sdk_checkmanagement command β sends a test request to each configured providerpyproject.tomlwith hatchling build backend; optionaldrfanddevextrasREADME.mdwith quickstart guide
Phase 2 β Enrichment
MCPClientβ connects to external MCP servers (STDIO, HTTP, SSE transports)MCPServer/MCPServerViewβ exposes Django@toolfunctions as an MCP server@mcp_tool,@mcp_resourcedecoratorsEpisodicMemoryβ DB-backed agent memory with search and recency retrievalOpenTelemetryObserver,LangSmithObserver,LangfuseObserverβ observability backendstools/builtins/web_search.py,tools/builtins/web_fetch.pyβ built-in web toolstools/builtins/rag.pyβ pgvector RAG integrationembeddings/embed.pyβ text embedding via litellmratelimit/β token-based rate limiting with Django cache backendanalytics/cost.pyβ per-message cost tracking (Message.cost_usd)- Provider failover with
agent_failed_oversignal ConversationAdmin,MessageAdminβ Django Admin integration
Phase 3 β Advanced
orchestration/patterns.pyβhandoff,pipeline,parallelagentic patternsorchestration/evaluator.pyβ Evaluator-Optimizer patternmemory/semantic.pyβ vector store-backed semantic memoryimages/generate.pyβ image generation (DALL-E 3, Gemini Imagen 3, xAI Aurora)audio/transcribe.pyβ Whisper transcriptionaudio/synthesize.pyβ TTS synthesisAUTO_SUMMARIZEβ automatic conversation summarization whenMAX_HISTORYis exceeded