Merge pull request #105 from Routstr/fix-models-auto-fetch

Fix models auto fetch
This commit is contained in:
shroominic
2025-08-06 22:15:28 -03:00
committed by GitHub
3 changed files with 1 additions and 13 deletions
+1
View File
@@ -10,6 +10,7 @@ wallet.sqlite3
*models.json
.cashu
.dockerignore
relay-data
compose.override.yml
-1
View File
@@ -77,7 +77,6 @@ app.add_middleware(
@app.get("/", include_in_schema=False)
@app.get("/v1/info")
async def info() -> dict:
logger.info("Info endpoint accessed")
return {
"name": app.title,
"description": app.description,
-12
View File
@@ -110,18 +110,6 @@ def load_models() -> list[Model]:
print(f"Error loading models from {models_path}: {e}")
# Fall through to auto-generation
# Check for example file as fallback
example = Path(__file__).resolve().parent.parent.parent / "models.example.json"
if example.exists():
print(f"Loading models from example file: {example}")
try:
with example.open("r") as f:
data = json.load(f)
return [Model(**model) for model in data.get("models", [])]
except Exception as e:
print(f"Error loading models from {example}: {e}")
# Fall through to auto-generation
# Auto-generate models from OpenRouter API
print("Auto-generating models from OpenRouter API")
source_filter = os.getenv("SOURCE")