...perature": 0}
    }

    r = requests.post(OLLAMA_URL, json=payload, timeout=600)
    r.raise_for_status()
    data = r.json()

    # Ollama /api/chat liefert: {"message": {"role": "...", "content": "..."}}
    return data["message"]["content"]


def iter_block_files(base_dir: str):
    for root, _, files in os.walk(base_dir):
        for fn in files:
            if fn.endswith(".txt") and "_BLOCK_" ...