import urllib.request, json

for batch in [10, 50, 100, 200, 512]:
    texts = ['hello'] * batch
    try:
        data = json.dumps({'model': 'qwen3-embedding-0.6b', 'input': texts}).encode()
        req = urllib.request.Request('http://127.0.0.1:11434/v1/embeddings', data=data, headers={'Content-Type': 'application/json'})
        resp = urllib.request.urlopen(req, timeout=60)
        d = json.loads(resp.read())
        print(f'batch {batch:4d}: ✅ OK ({len(d.get("data",[]))} results)')
    except Exception as e:
        print(f'batch {batch:4d}: ❌ {str(e)[:80]}')
