Bring your own AI
BerryStudio's AI pattern generator works fully offline with a built-in heuristic. Configuring a real AI provider (Settings → AI Provider) fuses that heuristic with actual vision/language understanding — you supply your own key, nothing is billed or brokered by BerryStudio itself.
Pick a route
Security model — the same everywhere
- Session storage by default. API keys live in
sessionStorageand are cleared the moment you close the tab. They never enter the app's saved project state orlocalStorage's main blob. - Optional encrypted persistence. "Remember this key on this device" asks for a passphrase and encrypts the key with WebCrypto (PBKDF2, 250,000 iterations, SHA-256 → AES-GCM) before it ever touches
localStorage. The derived key lives in memory only — a fresh page load always re-prompts for the passphrase. - Keys are stripped everywhere they could leak — Save Project exports, the service worker's cache, every log line and toast (redacted to
sk-…abcd). - A real Content-Security-Policy restricts what the page can even talk to — see
index.html's<meta>CSP tag. - Test Connection always shows the adapter's real error text (e.g. an actual
401 invalid x-api-key), never a generic "failed" message — so a misconfiguration is diagnosable from inside the app.
connect-src is deliberately broadened to https: + http(s)://localhost:* rather than a short fixed list — a stricter list would silently break those adapters the moment you pointed them anywhere not already on it. This is a documented trade-off, not an oversight — see the main README's Honest notes.Local model support beyond a server
Besides talking to a local server (Ollama/LM Studio/llama.cpp/vLLM), BerryStudio can also run a small vision model directly in your browser via WebGPU/WASM (a Hugging Face model ID, streamed and cached by transformers.js) — the Settings → AI Provider tab includes a Capability Probe that checks whether your device can do this before offering it. Picking a local .onnx/.gguf file from disk is not wired up yet; the UI says so honestly rather than pretending to accept it.
استخدم ذكاءك الاصطناعي الخاص
مولّد الأنماط بالذكاء الاصطناعي في BerryStudio يعمل بالكامل دون اتصال بالإنترنت بتحليل تلقائي مدمج. إعداد مزوّد ذكاء اصطناعي حقيقي (الإعدادات ← مزوّد الذكاء الاصطناعي) يدمج ذلك التحليل مع فهم رؤية/لغة حقيقي — أنت من يوفّر مفتاحك الخاص، ولا تُحاسِبك BerryStudio نفسها ولا تتوسّط في أي فوترة.
اختر مسارًا
نموذج الأمان — نفسه في كل مكان
- تخزين الجلسة افتراضيًا. مفاتيح API تعيش في
sessionStorageوتُمسح فور إغلاق التبويب. لا تدخل أبدًا في حالة المشروع المحفوظة أو كتلةlocalStorageالرئيسية. - تخزين مشفّر اختياري. خيار "تذكّر هذا المفتاح على هذا الجهاز" يطلب عبارة مرور ويشفّر المفتاح عبر WebCrypto (PBKDF2، 250,000 تكرار، SHA-256 ← AES-GCM) قبل أن يلمس
localStorage. المفتاح المُشتق يعيش في الذاكرة فقط — أي تحميل جديد للصفحة يطلب عبارة المرور من جديد. - تُزال المفاتيح من كل مكان قد تتسرب منه — تصدير حفظ المشروع، ذاكرة تخزين عامل الخدمة (service worker)، وكل سطر سجل وإشعار (تُخفى إلى
sk-…abcd). - سياسة أمان محتوى حقيقية (CSP) تقيّد ما يمكن للصفحة الاتصال به أصلًا — راجع وسم
<meta>الخاص بـCSP فيindex.html. - اختبار الاتصال يعرض دائمًا نص الخطأ الحقيقي من المزوّد (مثل
401 invalid x-api-keyفعليًا)، وليس رسالة "فشل" عامة — بحيث يمكن تشخيص أي خطأ إعداد من داخل التطبيق نفسه.
connect-src الخاصة بسياسة أمان المحتوى للصفحة موسّعة عمدًا إلى https: + http(s)://localhost:* بدلًا من قائمة قصيرة ثابتة — قائمة أكثر تشددًا كانت ستكسر هذه المحوّلات بصمت فور توجيهها لأي مكان ليس عليها مسبقًا. هذا تنازل موثّق، وليس إغفالًا — راجع ملاحظات الصدق في README الرئيسي.دعم النماذج المحلية بخلاف الخادم
إلى جانب التحدث مع خادم محلي (Ollama/LM Studio/llama.cpp/vLLM)، يمكن لـBerryStudio أيضًا تشغيل نموذج رؤية صغير مباشرة في متصفحك عبر WebGPU/WASM (بمعرّف نموذج من Hugging Face، يُبَث ويُخزَّن مؤقتًا بواسطة transformers.js) — يتضمن تبويب الإعدادات ← مزوّد الذكاء الاصطناعي فاحص قدرات يتحقق من إمكانية جهازك قبل عرض هذا الخيار. اختيار ملف .onnx/.gguf محلي من القرص غير مُفعّل بعد؛ تقول الواجهة ذلك بصدق بدلًا من التظاهر بقبوله.