Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e6f1da4f3 |
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.2.1] - 2025-12-13
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **Dependency slimming**: Switched from `pydantic-ai` to `pydantic-ai-slim[openai]`
|
||||||
|
- Removes unused LLM provider SDKs (anthropic, boto3, cohere, google-genai, groq, huggingface)
|
||||||
|
- Production packages: 53 (down from ~158)
|
||||||
|
- Production footprint: 178MB
|
||||||
|
- Tatlock uses Ollama via OpenAI-compatible API, so only `openai` extra is needed
|
||||||
|
- See `DEPENDENCY_SLIM.md` for rollback instructions
|
||||||
|
|
||||||
## [1.2.0] - 2025-12-13
|
## [1.2.0] - 2025-12-13
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
# Dependency Slimming: pydantic-ai → pydantic-ai-slim
|
||||||
|
|
||||||
|
**Date**: 2025-12-13
|
||||||
|
**Version**: Post v1.2.0
|
||||||
|
|
||||||
|
## Change
|
||||||
|
|
||||||
|
Switched from `pydantic-ai` to `pydantic-ai-slim[openai]` to reduce container image size.
|
||||||
|
|
||||||
|
### Before
|
||||||
|
```
|
||||||
|
pydantic-ai>=1.27,<1.28
|
||||||
|
```
|
||||||
|
|
||||||
|
This installs SDKs for ALL LLM providers:
|
||||||
|
- anthropic
|
||||||
|
- boto3 + botocore (AWS Bedrock)
|
||||||
|
- cohere
|
||||||
|
- google-genai + google-auth
|
||||||
|
- groq
|
||||||
|
- huggingface-hub
|
||||||
|
|
||||||
|
Total packages: ~158
|
||||||
|
|
||||||
|
### After
|
||||||
|
```
|
||||||
|
pydantic-ai-slim[openai]>=1.27,<1.28
|
||||||
|
```
|
||||||
|
|
||||||
|
Only installs the OpenAI-compatible SDK. Ollama works through this interface.
|
||||||
|
|
||||||
|
Expected packages: ~80-90 (significant reduction)
|
||||||
|
|
||||||
|
## Why This Works
|
||||||
|
|
||||||
|
Tatlock uses Ollama exclusively, which implements the OpenAI-compatible API. The code uses:
|
||||||
|
```python
|
||||||
|
from pydantic_ai.models.openai import OpenAIChatModel
|
||||||
|
from pydantic_ai.providers.ollama import OllamaProvider
|
||||||
|
|
||||||
|
model = OpenAIChatModel(
|
||||||
|
model_name=config.OLLAMA_DEFAULT_MODEL,
|
||||||
|
provider=OllamaProvider(base_url=f"{config.OLLAMA_HOST}/v1")
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
This pattern only requires the `openai` extra, not the full pydantic-ai package.
|
||||||
|
|
||||||
|
## Rollback Instructions
|
||||||
|
|
||||||
|
If this change breaks things:
|
||||||
|
|
||||||
|
1. Revert requirements.txt:
|
||||||
|
```diff
|
||||||
|
- pydantic-ai-slim[openai]>=1.27,<1.28
|
||||||
|
+ pydantic-ai>=1.27,<1.28
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Reinstall dependencies:
|
||||||
|
```bash
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Delete this file once confirmed stable.
|
||||||
|
|
||||||
|
## Testing Checklist
|
||||||
|
|
||||||
|
- [ ] Unit tests pass
|
||||||
|
- [ ] Integration tests pass (with Ollama running)
|
||||||
|
- [ ] Wakeup script e2e test passes
|
||||||
|
- [ ] Container builds successfully
|
||||||
|
- [ ] Container runs correctly
|
||||||
@@ -432,7 +432,7 @@ For LLM agent development guidelines and architectural decisions, see [AGENTS.md
|
|||||||
|
|
||||||
## Version
|
## Version
|
||||||
|
|
||||||
Current version: **1.2.0** - Phase F: Memory System (The Biographer)
|
Current version: **1.2.1** - Dependency slimming
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "tatlock"
|
name = "tatlock"
|
||||||
version = "1.2.0"
|
version = "1.2.1"
|
||||||
description = "OpenAI-compatible API with Ollama backend"
|
description = "OpenAI-compatible API with Ollama backend"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|||||||
+4
-3
@@ -16,9 +16,10 @@ pydantic>=2.11,<2.13
|
|||||||
|
|
||||||
# AI/LLM integration
|
# AI/LLM integration
|
||||||
# PydanticAI: Agent framework for using Pydantic with LLMs
|
# PydanticAI: Agent framework for using Pydantic with LLMs
|
||||||
# Latest: 1.27.0 (Dec 5, 2025) - No known CVEs
|
# Using slim version with only openai extra (Ollama uses OpenAI-compatible API)
|
||||||
# Supports Ollama backend out of the box
|
# This avoids installing SDKs for anthropic, cohere, google, groq, huggingface, etc.
|
||||||
pydantic-ai>=1.27,<1.28
|
# See DEPENDENCY_SLIM.md for rollback instructions if this breaks
|
||||||
|
pydantic-ai-slim[openai]>=1.27,<1.28
|
||||||
|
|
||||||
# HTTP client for Ollama communication
|
# HTTP client for Ollama communication
|
||||||
# Latest: 0.28.1 - No known CVEs
|
# Latest: 0.28.1 - No known CVEs
|
||||||
|
|||||||
Reference in New Issue
Block a user