0ed6c5086c5bbbd656ff771dfc6cb0cd53fb83cc
Implement global application configuration and custom Pydantic models following FastAPI best practices. Core Configuration (src/core/config.py): - BaseSettings with environment variable support - Split configuration by domain (following best practices) - Ollama connection settings (host, model, timeouts) - API configuration (host, port, prefix) - CORS settings - 20-second streaming timeout per turn - Cached configuration with @lru_cache Custom Base Models (src/core/models.py): - CustomBaseModel for consistent serialization - ISO datetime formatting - Alias population support - Enum value serialization - Validation on assignment - serializable_dict() for logging/debugging Exception Handling (src/core/exceptions.py): - Base AppException with status codes - OllamaConnectionError (503) - OllamaTimeoutError (504) - ModelNotFoundError (404) - ValidationError (422) - OpenAI-compatible error structure Benefits: - Consistent configuration across domains - Type-safe settings with validation - Easy environment override via .env - Predictable error responses - Better debugging with serializable models 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Description
No description provided
1.3 MiB
Releases
5
Release v2.4.3
Latest
Languages
Python
95.3%
HTML
3.7%
Shell
0.6%
Makefile
0.4%