Commit Graph

5 Commits

Author SHA1 Message Date
hacking-racoon 38703d5ad7 perf: lazy import for openai and reportlab to reduce startup latency
- agent/views.py: Move RateLimitError import inside format_error() function
  to avoid loading openai SDK (~800ms) at module level
- llm/messages.py: Replace openai.BaseModel with pydantic.BaseModel directly
  to remove unnecessary openai dependency
- filesystem/file_system.py: Move reportlab imports inside sync_to_disk_sync()
  to avoid ~40ms startup cost when PDF generation is not used
- utils.py: Convert OpenAIBadRequestError and GroqBadRequestError to lazy
  loaders to avoid loading SDKs at module level

This improves import time for users who don't use OpenAI provider,
especially when using Anthropic, Google, or other providers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 01:48:47 +09:00
mertunsall 67d2f12665 default to PNG everywhere 2025-11-06 14:51:52 -08:00
Magnus Müller 4a78c64dcf Update default media type to JPEG in messages and serializer 2025-10-03 21:33:07 -07:00
Gregor Žunič 2ee526d903 updated pricing for cached tokens support 2025-06-25 15:33:47 +02:00
Gregor Žunič 7a10ae0c96 Squashed commit langchain to native 2025-06-24 12:26:55 +02:00