mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-07-24 07:05:47 +00:00
PUT /api/models/defaults used 'is not None' guards, so an explicit null sent to clear a default was silently ignored — the old value survived while the client saw success (same anti-pattern fixed for credentials in #1046). The handler is now keyed on field presence (model_fields_set): absent keeps the current value, explicit null clears it. The required defaults (chat, embedding) reject null with a 400. In the UI, the optional default-model selects (transformation, tools, large context, TTS, STT) now offer a clear option — labeled 'Use fallback (chat default)' for transformation/tools, which fall back to the chat default when unset, and 'None' otherwise — and display that state when no model is assigned. The transformation default is no longer marked required, matching the backend fallback behavior. Closes #1091 |
||
|---|---|---|
| .. | ||
| routers | ||
| __init__.py | ||
| AGENTS.md | ||
| auth.py | ||
| CLAUDE.md | ||
| command_service.py | ||
| credentials_service.py | ||
| main.py | ||
| middleware.py | ||
| models.py | ||
| podcast_service.py | ||