Read the model catalog in claude_code/catalog.py

This commit is contained in:
2026-09-29 11:48:54 +02:00
parent 5e84736672
commit 29495b1e7d
2 changed files with 18 additions and 11 deletions
+16
View File
@@ -0,0 +1,16 @@
import json
from loop_claude.claude_code.formats import catalog
def offered_models(folder):
return catalog(read_catalog(folder))
def read_catalog(folder):
for path in folder.glob("*.json"):
try:
with open(path, encoding="utf-8") as handle:
yield json.load(handle)
except (OSError, ValueError):
continue