Commit e78bb4e
LittleCoinCoin
fix: resolve Pydantic serialization when switching to ollama model
The Ollama API returns datetime.datetime objects for the modified_at field,
but ModelInfo declares it as Optional[str], causing Pydantic validation
errors during model use commands.
Root cause: Type mismatch between Ollama API response data and ModelInfo type annotations
Solution: Convert datetime objects to strings at the model manager level
Fixes: llm:model:use commands failing with qwen3:0.6b and llama3.2:latest
Preserves: OpenAI API compatibility (cerebras/GLM-4.5-Air-REAP-82B-A12B-FP8 works)
Note: Additional code style changes applied by automated ruff formatter1 parent 00c44b6 commit e78bb4e
1 file changed
+116
-86
lines changed
0 commit comments