Skip to content

Commit 082ed63

Browse files
stackptrclaude
andcommitted
fix(glyph): use correct API endpoint for model deactivation
The /api/v1/models/list endpoint returns {items: []} with only DB-managed models, while /api/models returns {data: []} with all models including auto-discovered ones. Use /api/models for the deactivation step and fix the jq filter to check .info.is_active (nested under info) and treat models with no info object as active (auto-discovered default). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2fc4e4c commit 082ed63

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎hosts/glyph/services/open-webui.nix‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ in {
135135
136136
# Deactivate all unlisted models that are currently active
137137
all_models=$(curl -sf -H "Authorization: Bearer $API_KEY" \
138-
"${baseUrl}/api/v1/models/list" 2>/dev/null)
138+
"${baseUrl}/api/models" 2>/dev/null)
139139
if [ -n "$all_models" ]; then
140140
echo "$all_models" \
141-
| jq -r '.data[] | select(.is_active == true) | .id' \
141+
| jq -r '.data[] | select(.info.is_active == true or .info == null) | .id' \
142142
| while read -r id; do
143143
if ! echo "$ACTIVE_IDS" | jq -e --arg id "$id" 'index($id)' >/dev/null 2>&1; then
144144
curl -sf -X POST -H "Authorization: Bearer $API_KEY" \

0 commit comments

Comments
 (0)