Commit Graph

2 Commits

Author SHA1 Message Date
sleepy dcca89d89a fix: OpenAI API compatibility for hollama and other clients
- Fixed ChatMessage.tool_calls to be Optional with default None (excluded when empty)
- Added logprobs field to ChatCompletionChoice (always included as null)
- Added stats and system_fingerprint to ChatCompletionResponse
- Fixed streaming response to use delta format (not message format)
- Fixed non-streaming response to include logprobs: null
- Updated tool instructions to include 'NO explanations'
- Added pytest-asyncio markers to async tests
- All 41 tests passing

This fixes the 'Cannot read properties of undefined (reading content)' error in hollama and ensures compatibility with OpenAI clients.
2026-02-25 19:39:05 +01:00
sleepy 32049c766c refactor(models): extract hardcoded data to JSON configs
Extracted from registry.py (437 → 194 lines):
- config/models/mlx_quant_sizes.json - MLX quantization VRAM sizes
- config/models/gguf_quant_sizes.json - GGUF quantization VRAM sizes
- config/models/model_metadata.json - Model metadata

Registry now loads from JSON files instead of hardcoded data.
All 35 tests pass.
2026-02-25 13:20:29 +01:00