#!/usr/bin/env python3
"""Auto-generated by AGI Loop cycle #997
Task: Write a Python function that fetches Ollama model list from localhost:11434/api/tags and prints model names and sizes
Generated: 2026-02-12T16:23:35.424537
"""

import requests

def fetch_ollama_models():
    url = "http://localhost:11434/api/tags"
    response = requests.get(url)
    models = response.json().get("models", [])
    for model in models:
        name = model.get("name")
        size = model.get("size")
        print(f"Model: {name}, Size: {size}")

if __name__ == '__main__':
    fetch_ollama_models()