feat: full model catalog (settings enabledModels + custom providers) and provider credentials in spawned containers (keys passthrough + host auth.json bind)

This commit is contained in:
Raphael Westphal
2026-08-19 11:41:31 +02:00
parent d4af41e7dc
commit 5c71edfac4
5 changed files with 86 additions and 11 deletions
+13
View File
@@ -562,3 +562,16 @@ func TestAPIRepoImagesStoreFailure(t *testing.T) {
t.Fatal("DELETE with broken store must 500")
}
}
func TestParseEnabledModels(t *testing.T) {
items := parseEnabledModels([]byte(`{"enabledModels":["anthropic/claude-opus-5","zai/glm","bad","/x","p/"]}`))
if len(items) != 2 {
t.Fatalf("items = %+v, want 2 valid", items)
}
if items[0].Provider != "anthropic" || items[0].ID != "claude-opus-5" {
t.Fatalf("first = %+v", items[0])
}
if parseEnabledModels([]byte("not json")) != nil {
t.Fatal("invalid json must yield nil")
}
}