Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
unsloth start vibe: launch Mistral Vibe against a running Unsloth server (#8180)
Xavier Pestel11564a4f9292
diff --git a/.github/scripts/agent-guides-drive.sh b/.github/scripts/agent-guides-drive.shindex ebe03872ed1..adb73d50cc1 100755--- a/.github/scripts/agent-guides-drive.sh+++ b/.github/scripts/agent-guides-drive.sh@@ -6,8 +6,8 @@# "guide drift": the server preflight already passed and the agent CLI# already installed, so a failure here means the documented recipe in# unsloth_cli/commands/start.py no longer produces a working flow.-# Self-updating: for all seven agents (claude, codex, hermes, openclaw,-# opencode, pi, dsh) we obtain the exact env + command from+# Self-updating: for all eight agents (claude, codex, hermes, openclaw,+# opencode, pi, dsh, vibe) we obtain the exact env + command from# `unsloth start <agent> --no-launch` and run THAT, so a recipe change is# exercised automatically.# Every agent invocation is wrapped in `timeout` so a headless-TTY prompt@@ -363,6 +363,16 @@ crosscheck_contract() {|| echo "::warning::dsh provider api is no longer 'openai-completions' (write_dsh_patch)"cp "$cfg" "$REDACTED_DIR/dsh-patch.yml";;+ vibe)+ grep -q 'UNSLOTH_API_KEY' "$raw" \+ || guide_fail "Vibe env key is no longer UNSLOTH_API_KEY (start.py _VIBE_ENV_KEY)"+ # Provider and model ride in the env layer (start.py _vibe_env), not a config file.+ cfg="$(raw_env VIBE_PROVIDERS)"+ [ -n "$cfg" ] || guide_fail "VIBE_PROVIDERS missing from connect output (start.py _vibe_env)"+ grep -q '"api_style": "openai"' <<<"$cfg" \+ || echo "::warning::Vibe provider api_style is no longer 'openai' (start.py _vibe_env)"+ printf '%s\n%s\n' "$cfg" "$(raw_env VIBE_MODELS)" > "$REDACTED_DIR/vibe-env.json"+ ;;esacredact "$REDACTED_DIR"/* 2>/dev/null || true}@@ -511,6 +521,8 @@ case "$MODE" incodex) invoke_via_connect "$OUT" exec --dangerously-bypass-approvals-and-sandbox "$PROMPT" ;;opencode) invoke_via_connect "$OUT" run "$PROMPT" ;;pi) invoke_via_connect "$OUT" -p "$PROMPT" ;;+ # Zero tool schemas, as for claude/hermes: only the endpoint, auth and model are under test.+ vibe) invoke_via_connect "$OUT" --disabled-tools '*' -p "$PROMPT" ;;hermes) patch_hermes_tools noneinvoke_via_connect "$OUT" -z "$PROMPT" ;;openclaw) patch_openclaw_agent notools@@ -574,7 +586,7 @@ case "$MODE" in# gate tool approval through their config (prompting by default), so file-edit# opts them into auto-approval to run edits/commands headlessly.case "$AGENT" in- opencode|openclaw) CONNECT_YOLO=1 ;;+ opencode|openclaw|vibe) CONNECT_YOLO=1 ;;# A headless run has nobody to answer dsh's approval asks.dsh) CONNECT_YOLO=1; CONNECT_START_ARGS='--profile headless' ;;esac@@ -624,6 +636,14 @@ case "$MODE" infi ;;opencode) invoke_via_connect "$out" run "$prompt" ;;hermes) invoke_via_connect "$out" -z "$prompt" ;;+ vibe)+ # Only the schemas the task needs, as for claude; -c continues the session under VIBE_HOME.+ local tools=(--enabled-tools bash --enabled-tools read_file --enabled-tools write_file)+ if [ "$cont" = "continue" ]; then+ invoke_via_connect "$out" "${tools[@]}" -c -p "$prompt"+ else+ invoke_via_connect "$out" "${tools[@]}" -p "$prompt"+ fi ;;openclaw) CONNECT_CMD_OVERRIDE=openclaw invoke_via_connect "$out" agent --local --agent ci \--model "unsloth/${UNSLOTH_MODEL_ID}" --message "$prompt" ;;*) invoke_via_connect "$out" "$prompt" ;;diff --git a/.github/scripts/agent-guides-install.sh b/.github/scripts/agent-guides-install.shindex 6ba4d5b2303..4e6ffc80124 100755--- a/.github/scripts/agent-guides-install.sh+++ b/.github/scripts/agent-guides-install.sh@@ -8,7 +8,7 @@# install recipes mirror the install_hint strings in# unsloth_cli/commands/start.py at HEAD.# Usage: agent-guides-install.sh <agent>-# agent in: claude codex hermes openclaw opencode pi dsh+# agent in: claude codex hermes openclaw opencode pi dsh vibeset -uo pipefailAGENT="${1:?usage: agent-guides-install.sh <agent>}"@@ -144,6 +144,12 @@ case "$AGENT" in# start.py install_hint: npm install -g @deepseek-ai/dshnpm_retry "@deepseek-ai/dsh" || install_fail "npm install -g @deepseek-ai/dsh failed";;+ vibe)+ # start.py install_hint: curl -LsSf https://mistral.ai/vibe/install.sh | PATH="$HOME/.local/bin:$PATH" bash+ PATH="$HOME/.local/bin:$PATH" curl_bash "https://mistral.ai/vibe/install.sh" \+ || install_fail "vibe installer failed"+ echo "$HOME/.local/bin" >> "$GITHUB_PATH"+ ;;*)install_fail "unknown agent '$AGENT'";;diff --git a/.github/workflows/local-agent-guides-ci.yml b/.github/workflows/local-agent-guides-ci.ymlindex 1165eea90b2..3695a010bf9 100644--- a/.github/workflows/local-agent-guides-ci.yml+++ b/.github/workflows/local-agent-guides-ci.yml@@ -23,8 +23,8 @@# (c) Guide drift -- preflight passed + install ok, but# the documented `unsloth start` flow produced no/garbled output.#-# Agents covered (6): claude, codex, hermes, openclaw, opencode, pi.-# - All six have a `unsloth start <agent>` recipe, so each cell obtains its+# Agents covered (8): claude, codex, hermes, openclaw, opencode, pi, dsh, vibe.+# - All eight have a `unsloth start <agent>` recipe, so each cell obtains its# env + command from `unsloth start <agent> --no-launch` and runs THAT# (self-updating: a recipe change is exercised automatically).@@ -184,7 +184,7 @@ jobs:strategy:fail-fast: falsematrix:- agent: [claude, codex, hermes, openclaw, opencode, pi, dsh]+ agent: [claude, codex, hermes, openclaw, opencode, pi, dsh, vibe]opencode_channel: [stable]include:# OpenClaw needs Node 24; everything else is happy on 22.@@ -426,7 +426,7 @@ jobs:strategy:fail-fast: falsematrix:- agent: [claude, codex, hermes, openclaw, opencode, pi, dsh]+ agent: [claude, codex, hermes, openclaw, opencode, pi, dsh, vibe]include:- agent: openclawnode: '24'diff --git a/README.md b/README.mdindex de20157ba19..351e57fa390 100644--- a/README.md+++ b/README.md@@ -105,6 +105,7 @@ unsloth start claude --model unsloth/Qwen3.8-27B-GGUF:UD-Q4_K_XL| OpenAI Codex | `unsloth start codex` || DeepSeek Harness | `unsloth start dsh` || Hermes Agent | `unsloth start hermes` |+| Mistral Vibe | `unsloth start vibe` || OpenCode | `unsloth start opencode` || OpenClaw | `unsloth start openclaw` |diff --git a/scripts/av_shapes_baseline.json b/scripts/av_shapes_baseline.jsonindex 3fe3464f614..b44dd7598fe 100644--- a/scripts/av_shapes_baseline.json+++ b/scripts/av_shapes_baseline.json@@ -1337,7 +1337,8 @@"reason": "`unsloth start` runs the agent vendor's own documented installer on request, after telling the user; the text is the vendor's command.","digests": {"4b8d7b4895eacb82": 1,- "c709a3f82ed292ba": 1+ "c709a3f82ed292ba": 1,+ "dad9884ace4523c9": 1}},{diff --git a/studio/backend/tests/test_coding_agents.py b/studio/backend/tests/test_coding_agents.pyindex 8f5b401f01e..7c068190229 100644--- a/studio/backend/tests/test_coding_agents.py+++ b/studio/backend/tests/test_coding_agents.py@@ -19,7 +19,16 @@ def test_matches_unsloth_start_subcommands():# Each entry must be an actual `unsloth start <agent>` subcommand name# (unsloth_cli/commands/start.py). Spelled out here rather than imported# from that module, which pulls in the CLI's heavier dependencies.- assert CODING_AGENTS == ("claude", "codex", "openclaw", "opencode", "hermes", "pi", "dsh")+ assert CODING_AGENTS == (+ "claude",+ "codex",+ "openclaw",+ "opencode",+ "hermes",+ "pi",+ "dsh",+ "vibe",+ )def test_detects_only_agents_present_on_path():diff --git a/studio/backend/utils/coding_agents.py b/studio/backend/utils/coding_agents.pyindex 0878360a18d..7c419be8d1e 100644--- a/studio/backend/utils/coding_agents.py+++ b/studio/backend/utils/coding_agents.py@@ -27,7 +27,16 @@ _DEEPSEEK_HARNESS_FILE_MARKERS = (# unsloth_cli/commands/start.py. Each entry is the exact executable name that# subcommand launches, so a hit here means `unsloth start <agent>` can find the# binary on PATH without the user installing anything first.-CODING_AGENTS: tuple[str, ...] = ("claude", "codex", "openclaw", "opencode", "hermes", "pi", "dsh")+CODING_AGENTS: tuple[str, ...] = (+ "claude",+ "codex",+ "openclaw",+ "opencode",+ "hermes",+ "pi",+ "dsh",+ "vibe",+)def is_deepseek_harness_executable(executable: str, *, allow_execution: bool = True) -> bool:diff --git a/studio/frontend/src/features/settings/components/usage-examples.tsx b/studio/frontend/src/features/settings/components/usage-examples.tsxindex f63e8fadc37..d337acd73ea 100644--- a/studio/frontend/src/features/settings/components/usage-examples.tsx+++ b/studio/frontend/src/features/settings/components/usage-examples.tsx@@ -138,11 +138,20 @@ const DOC_LINKS = [label: "DeepSeek Harness",href: "https://github.com/deepseek-ai/deepseek-harness",},+ { label: "Mistral Vibe", href: "https://github.com/mistralai/mistral-vibe" },];// Fallback until the backend's installed-CLI check resolves. Mirrors CODING_AGENTS in// studio/backend/utils/coding_agents.py, minus HIDDEN_AGENTS (see ../api/coding-agents.ts).-const DEFAULT_AGENTS = ["claude", "codex", "openclaw", "opencode", "hermes", "dsh"];+const DEFAULT_AGENTS = [+ "claude",+ "codex",+ "openclaw",+ "opencode",+ "hermes",+ "dsh",+ "vibe",+];// The agent selection resets to this whenever an auto-pick is no longer// trustworthy (leaving loopback, or the only compatible detected agent// stops being compatible) rather than lingering on a stale choice.@@ -154,6 +163,7 @@ const AGENT_LABELS: Record<string, string> = {opencode: "OpenCode",hermes: "Hermes",dsh: "DeepSeek Harness",+ vibe: "Mistral Vibe",};const j = (s: string): string => JSON.stringify(s);diff --git a/studio/frontend/src/features/settings/tabs/agents-tab.tsx b/studio/frontend/src/features/settings/tabs/agents-tab.tsxindex 848bd70c443..c0ac5d4cb6c 100644--- a/studio/frontend/src/features/settings/tabs/agents-tab.tsx+++ b/studio/frontend/src/features/settings/tabs/agents-tab.tsx@@ -190,6 +190,12 @@ const SUPPORTED_AGENTS: AgentDetails[] = [docsUrl: "https://github.com/deepseek-ai/deepseek-harness",logo: "deepseek",},+ {+ id: "vibe",+ name: "Mistral Vibe",+ docsUrl: "https://github.com/mistralai/mistral-vibe",+ logo: "mistral",+ },];const FALLBACK_AGENT = SUPPORTED_AGENTS[0];diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex 2d3aed80dd9..d98cf87abd1 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -2111,7 +2111,7 @@ export const ar = {description:"اربط وكلاء البرمجة مثل Claude Code وCodex بنموذج محلي باستخدام unsloth start.",intro:- "يربط Claude Code وCodex وDeepSeek Harness وHermes وOpenClaw وOpenCode وغيرها من الوكلاء بنموذج يقدّمه Unsloth محليًا، دون اتصال بالإنترنت تمامًا. يشغّل خادمًا متوافقًا مع OpenAI ولا يمسّ ملفات إعدادات وكيلك إطلاقًا.",+ "يربط Claude Code وCodex وDeepSeek Harness وHermes وMistral Vibe وOpenClaw وOpenCode وغيرها من الوكلاء بنموذج يقدّمه Unsloth محليًا، دون اتصال بالإنترنت تمامًا. يشغّل خادمًا متوافقًا مع OpenAI ولا يمسّ ملفات إعدادات وكيلك إطلاقًا.",readDocs: "قراءة التوثيق",copy: "نسخ",copied: "تم النسخ",diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex 90108084f44..bd2a135df49 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -2142,7 +2142,7 @@ export const de = {description:"Verbinden Sie Coding-Agenten wie Claude Code und Codex über unsloth start mit einem lokalen Modell.",intro:- "verbindet Claude Code, Codex, DeepSeek Harness, Hermes, OpenClaw, OpenCode und weitere Agenten mit einem lokal von Unsloth bereitgestellten Modell, vollständig offline. Es startet einen OpenAI-kompatiblen Server und verändert nie die Konfigurationsdateien Ihres Agenten.",+ "verbindet Claude Code, Codex, DeepSeek Harness, Hermes, Mistral Vibe, OpenClaw, OpenCode und weitere Agenten mit einem lokal von Unsloth bereitgestellten Modell, vollständig offline. Es startet einen OpenAI-kompatiblen Server und verändert nie die Konfigurationsdateien Ihres Agenten.",readDocs: "Dokumentation lesen",copy: "Kopieren",copied: "Kopiert",diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex 238d7d203be..aef31414a05 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -2154,7 +2154,7 @@ export const en = {description:"Connect coding agents like Claude Code and Codex to a local model with unsloth start.",intro:- "connects Claude Code, Codex, DeepSeek Harness, Hermes, OpenClaw, OpenCode and other agents to a model served locally by Unsloth, fully offline. It runs an OpenAI-compatible server and never touches your agent's config files.",+ "connects Claude Code, Codex, DeepSeek Harness, Hermes, Mistral Vibe, OpenClaw, OpenCode and other agents to a model served locally by Unsloth, fully offline. It runs an OpenAI-compatible server and never touches your agent's config files.",readDocs: "Read the docs",copy: "Copy",copied: "Copied",diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex 38be637ece2..c9d9a05d29f 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -2136,7 +2136,7 @@ export const es = {description:"Conecta agentes de programación como Claude Code y Codex a un modelo local con unsloth start.",intro:- "conecta Claude Code, Codex, DeepSeek Harness, Hermes, OpenClaw, OpenCode y otros agentes a un modelo servido localmente por Unsloth, totalmente sin conexión. Ejecuta un servidor compatible con OpenAI y nunca modifica los archivos de configuración de tu agente.",+ "conecta Claude Code, Codex, DeepSeek Harness, Hermes, Mistral Vibe, OpenClaw, OpenCode y otros agentes a un modelo servido localmente por Unsloth, totalmente sin conexión. Ejecuta un servidor compatible con OpenAI y nunca modifica los archivos de configuración de tu agente.",readDocs: "Leer la documentación",copy: "Copiar",copied: "Copiado",diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex 7b137006fbf..169ae8bbccf 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -2140,7 +2140,7 @@ export const fr = {description:"Connectez des agents de codage comme Claude Code et Codex à un modèle local avec unsloth start.",intro:- "connecte Claude Code, Codex, DeepSeek Harness, Hermes, OpenClaw, OpenCode et d'autres agents à un modèle servi localement par Unsloth, entièrement hors ligne. Il lance un serveur compatible OpenAI et ne touche jamais aux fichiers de configuration de votre agent.",+ "connecte Claude Code, Codex, DeepSeek Harness, Hermes, Mistral Vibe, OpenClaw, OpenCode et d'autres agents à un modèle servi localement par Unsloth, entièrement hors ligne. Il lance un serveur compatible OpenAI et ne touche jamais aux fichiers de configuration de votre agent.",readDocs: "Lire la documentation",copy: "Copier",copied: "Copié",diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex b665abc925a..d7c50d55504 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -2114,7 +2114,7 @@ export const hi = {description:"unsloth start की मदद से Claude Code और Codex जैसे कोडिंग एजेंट को लोकल मॉडल से जोड़ें।",intro:- "Claude Code, Codex, DeepSeek Harness, Hermes, OpenClaw, OpenCode और दूसरे एजेंट को Unsloth द्वारा लोकली सर्व किए गए मॉडल से जोड़ता है, पूरी तरह ऑफ़लाइन। यह एक OpenAI-संगत सर्वर चलाता है और आपके एजेंट की कॉन्फ़िगरेशन फ़ाइलों को कभी नहीं छूता।",+ "Claude Code, Codex, DeepSeek Harness, Hermes, Mistral Vibe, OpenClaw, OpenCode और दूसरे एजेंट को Unsloth द्वारा लोकली सर्व किए गए मॉडल से जोड़ता है, पूरी तरह ऑफ़लाइन। यह एक OpenAI-संगत सर्वर चलाता है और आपके एजेंट की कॉन्फ़िगरेशन फ़ाइलों को कभी नहीं छूता।",readDocs: "दस्तावेज़ पढ़ें",copy: "कॉपी करें",copied: "कॉपी किया गया",diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex bf1d4b50163..e8097d41434 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -2100,7 +2100,7 @@ export const it = {description:"Collega agenti di programmazione come Claude Code e Codex a un modello locale con unsloth start.",intro:- "collega Claude Code, Codex, DeepSeek Harness, Hermes, OpenClaw, OpenCode e altri agenti a un modello servito localmente da Unsloth, completamente offline. Avvia un server compatibile con le API OpenAI e non modifica i file di configurazione del tuo agente.",+ "collega Claude Code, Codex, DeepSeek Harness, Hermes, Mistral Vibe, OpenClaw, OpenCode e altri agenti a un modello servito localmente da Unsloth, completamente offline. Avvia un server compatibile con le API OpenAI e non modifica i file di configurazione del tuo agente.",readDocs: "Leggi la documentazione",copy: "Copia",copied: "Copiato",diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex 2b10cb9d0fc..37ae5a65b48 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -2092,7 +2092,7 @@ export const ja = {description:"unsloth start で Claude Code や Codex などのコーディングエージェントをローカルモデルに接続します。",intro:- "は Claude Code、Codex、DeepSeek Harness、Hermes、OpenClaw、OpenCode などのエージェントを、Unsloth がローカルで提供するモデルに完全オフラインで接続します。OpenAI 互換サーバーを起動し、エージェントの設定ファイルには一切手を加えません。",+ "は Claude Code、Codex、DeepSeek Harness、Hermes、Mistral Vibe、OpenClaw、OpenCode などのエージェントを、Unsloth がローカルで提供するモデルに完全オフラインで接続します。OpenAI 互換サーバーを起動し、エージェントの設定ファイルには一切手を加えません。",readDocs: "ドキュメントを読む",copy: "コピー",copied: "コピーしました",diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex 1b64c037c63..35b4a277263 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -2107,7 +2107,7 @@ export const ko = {description:"unsloth start로 Claude Code, Codex 같은 코딩 에이전트를 로컬 모델에 연결하세요.",intro:- "명령은 Claude Code, Codex, DeepSeek Harness, Hermes, OpenClaw, OpenCode를 비롯한 에이전트를 Unsloth가 로컬에서 제공하는 모델에 완전히 오프라인으로 연결합니다. OpenAI 호환 서버를 실행하며 에이전트의 설정 파일은 전혀 건드리지 않습니다.",+ "명령은 Claude Code, Codex, DeepSeek Harness, Hermes, Mistral Vibe, OpenClaw, OpenCode를 비롯한 에이전트를 Unsloth가 로컬에서 제공하는 모델에 완전히 오프라인으로 연결합니다. OpenAI 호환 서버를 실행하며 에이전트의 설정 파일은 전혀 건드리지 않습니다.",readDocs: "문서 보기",copy: "복사",copied: "복사됨",diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex 7a773f0451c..1e01e53670e 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -2124,7 +2124,7 @@ export const ptBR = {description:"Conecte agentes de código como Claude Code e Codex a um modelo local com unsloth start.",intro:- "conecta Claude Code, Codex, DeepSeek Harness, Hermes, OpenClaw, OpenCode e outros agentes a um modelo servido localmente pelo Unsloth, totalmente offline. Ele executa um servidor compatível com a API da OpenAI e nunca altera os arquivos de configuração do seu agente.",+ "conecta Claude Code, Codex, DeepSeek Harness, Hermes, Mistral Vibe, OpenClaw, OpenCode e outros agentes a um modelo servido localmente pelo Unsloth, totalmente offline. Ele executa um servidor compatível com a API da OpenAI e nunca altera os arquivos de configuração do seu agente.",readDocs: "Ler a documentação",copy: "Copiar",copied: "Copiado",diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex f2c47917ef2..686ecd37cda 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -2118,7 +2118,7 @@ export const ru = {description:"Подключение кодинг-агентов, таких как Claude Code и Codex, к локальной модели с помощью unsloth start.",intro:- "подключает Claude Code, Codex, DeepSeek Harness, Hermes, OpenClaw, OpenCode и других агентов к модели, которую Unsloth обслуживает локально, полностью офлайн. Запускается OpenAI-совместимый сервер, а файлы конфигурации вашего агента остаются нетронутыми.",+ "подключает Claude Code, Codex, DeepSeek Harness, Hermes, Mistral Vibe, OpenClaw, OpenCode и других агентов к модели, которую Unsloth обслуживает локально, полностью офлайн. Запускается OpenAI-совместимый сервер, а файлы конфигурации вашего агента остаются нетронутыми.",readDocs: "Открыть документацию",copy: "Копировать",copied: "Скопировано",diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex c3a72f34b28..00aa776185a 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -2078,7 +2078,7 @@ export const zhCN = {description:"使用 unsloth start 将 Claude Code、Codex 等编程智能体连接到本地模型。",intro:- "可将 Claude Code、Codex、DeepSeek Harness、Hermes、OpenClaw、OpenCode 等智能体连接到由 Unsloth 在本地提供服务的模型,全程离线。它会启动一个兼容 OpenAI 的服务器,并且从不改动智能体的配置文件。",+ "可将 Claude Code、Codex、DeepSeek Harness、Hermes、Mistral Vibe、OpenClaw、OpenCode 等智能体连接到由 Unsloth 在本地提供服务的模型,全程离线。它会启动一个兼容 OpenAI 的服务器,并且从不改动智能体的配置文件。",readDocs: "查看文档",copy: "复制",copied: "已复制",diff --git a/unsloth_cli/__init__.py b/unsloth_cli/__init__.pyindex e2d6a62527d..449fe438232 100644--- a/unsloth_cli/__init__.py+++ b/unsloth_cli/__init__.py@@ -238,7 +238,7 @@ if not _windows_studio_mutation_entry:app.add_typer(start_app,name = "start",- help = "Start a coding agent (Claude, Codex, OpenClaw, OpenCode, Hermes, Pi, dsh) "+ help = "Start a coding agent (Claude, Codex, OpenClaw, OpenCode, Hermes, Pi, dsh, Vibe) ""against Unsloth.",)# backwards-compatible hidden alias: `unsloth connect` routes to `unsloth start`.diff --git a/unsloth_cli/commands/start.py b/unsloth_cli/commands/start.pyindex 1529dc35e65..79dee783d2c 100644--- a/unsloth_cli/commands/start.py+++ b/unsloth_cli/commands/start.py@@ -133,6 +133,17 @@ _OPENCODE_PROVIDER = "unsloth-studio"# OpenCode sends min(limit.output, this) as max_tokens unless the env var below raises it._OPENCODE_OUTPUT_TOKEN_MAX = 32_000_OPENCODE_OUTPUT_TOKEN_MAX_ENV = "OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX"+_VIBE_PROVIDER = "unsloth-studio"+_VIBE_MODEL_ALIAS = "unsloth"+_VIBE_ENV_KEY = "UNSLOTH_API_KEY"+# Both installers put binaries in ~/.local/bin; Vibe's exits 1 and uv's leaves the shell PATH stale when it is missing.+_VIBE_POSIX_INSTALL_HINT = (+ 'curl -LsSf https://mistral.ai/vibe/install.sh | PATH="$HOME/.local/bin:$PATH" bash'+)+_VIBE_WINDOWS_INSTALL_HINT = (+ "irm https://astral.sh/uv/install.ps1 | iex; "+ '$env:Path = "$HOME\\.local\\bin;$env:Path"; uv tool install mistral-vibe'+)_PROVIDER_HEADER = f"[model_providers.{_CODEX_PROFILE}]"_PASSTHROUGH = {"allow_extra_args": True, "ignore_unknown_options": True}@@ -413,6 +424,7 @@ _YOLO_COMMAND_FLAGS = {"hermes": ["--yolo"],# Pi never prompts per tool call; its only approval gate is project trust, so -a (trust project resources) is the closest "do not ask me" equivalent."pi": ["--approve"],+ "vibe": ["--auto-approve"],}@@ -546,6 +558,10 @@ def _hermes_install_hint() -> str:return _HERMES_WINDOWS_INSTALL_HINT if os.name == "nt" else _HERMES_POSIX_INSTALL_HINT+def _vibe_install_hint() -> str:+ return _VIBE_WINDOWS_INSTALL_HINT if os.name == "nt" else _VIBE_POSIX_INSTALL_HINT++def _npm_install_hint(package: str, *, ignore_scripts: bool = False) -> str:parts = ["npm", "install", "-g"]if os.name != "nt":@@ -5054,6 +5070,43 @@ def write_hermes_config(typer.echo(f"Updated {path}")+def _vibe_env(+ base: str,+ model: dict,+ request_body: Optional[dict] = None,+) -> dict:+ """Vibe settings as VIBE_* env vars: that layer outranks user and project config.toml, so+ nothing is written to the user's Vibe config."""+ entry = {"name": model["id"], "provider": _VIBE_PROVIDER, "alias": _VIBE_MODEL_ALIAS}+ # Vibe sends its own temperature (0.2 by default) with every request.+ temperature = (request_body or {}).get("temperature")+ if temperature is not None:+ entry["temperature"] = float(temperature)+ window = model.get("context_length") or model.get("max_context_length")+ if window:+ # Vibe compacts at 200k tokens by default, past most local windows.+ entry["auto_compact_threshold"] = max(1, int(int(window) * 0.9))+ provider = {+ "name": _VIBE_PROVIDER,+ "api_base": f"{base}/v1",+ "api_key_env_var": _VIBE_ENV_KEY,+ "api_style": "openai",+ "backend": "generic",+ }+ return {+ "VIBE_PROVIDERS": json.dumps([provider]),+ "VIBE_MODELS": json.dumps([entry]),+ "VIBE_ACTIVE_MODEL": _VIBE_MODEL_ALIAS,+ # Only this model: an inherited allowlist or a resumed cloud session would otherwise+ # select a hosted model. An escaped `re:` pattern matches the id exactly.+ "VIBE_ALLOWED_MODELS": json.dumps(["re:" + re.escape(model["id"])]),+ "VIBE_ENABLE_TELEMETRY": "false",+ "VIBE_ENABLE_UPDATE_CHECKS": "false",+ "VIBE_ENABLE_AUTO_UPDATE": "false",+ "VIBE_ENABLE_NOTIFICATIONS": "false",+ }++def write_pi_config(base: str,key: str,@@ -6861,3 +6914,77 @@ def dsh(),}_run(base, entry, env, command, launch = launch, install_hint = install_hint)+++@start_app.command("vibe", cls = _PassthroughCommand, context_settings = _PASSTHROUGH)+def vibe(+ ctx: typer.Context,+ model: Optional[str] = _MODEL_OPTION,+ api_key: Optional[str] = _KEY_OPTION,+ launch: bool = _LAUNCH_OPTION,+ gguf_variant: Optional[str] = _GGUF_VARIANT_OPTION,+ max_seq_length: int = _CONTEXT_OPTION,+ load_in_4bit: bool = _LOAD_4BIT_OPTION,+ tensor_parallel: bool = _TENSOR_PARALLEL_OPTION,+ gpu_memory_mode: Optional[Literal["auto", "manual"]] = _GPU_MEMORY_MODE_OPTION,+ enable_tools: Optional[bool] = _ENABLE_TOOLS_OPTION,+ tool_call_healing: Optional[bool] = _TOOL_CALL_HEALING_OPTION,+ tool_call_nudging: Optional[bool] = _TOOL_CALL_NUDGING_OPTION,+ reasoning: Optional[Literal["on", "off", "auto"]] = _REASONING_OPTION,+ reasoning_effort: Optional[str] = _REASONING_EFFORT_OPTION,+ temperature: Optional[float] = _TEMPERATURE_OPTION,+ top_p: Optional[float] = _TOP_P_OPTION,+ top_k: Optional[int] = _TOP_K_OPTION,+ min_p: Optional[float] = _MIN_P_OPTION,+ repetition_penalty: Optional[float] = _REPETITION_PENALTY_OPTION,+ presence_penalty: Optional[float] = _PRESENCE_PENALTY_OPTION,+ serve: bool = _SERVE_OPTION,+ yolo: bool = _YOLO_OPTION,+ persist: bool = _PERSIST_OPTION,+):+ """Point Mistral Vibe at the running Unsloth server and start it."""+ model, ctx.args[:] = _consume_positional_model(model, ctx.args)+ _reject_as_subagent("vibe", ctx.args)+ install_hint = _vibe_install_hint()+ _require_agent_for_launch("vibe", install_hint, launch)+ server_options = ServerOptions(+ enable_tools = enable_tools,+ tool_call_healing = tool_call_healing,+ tool_call_nudging = tool_call_nudging,+ reasoning = reasoning,+ reasoning_effort = reasoning_effort,+ temperature = temperature,+ top_p = top_p,+ top_k = top_k,+ min_p = min_p,+ repetition_penalty = repetition_penalty,+ presence_penalty = presence_penalty,+ carried = frozenset({"temperature"}),+ )+ base, key, entry = _connect(+ api_key,+ model,+ _load_options(+ ctx, gguf_variant, max_seq_length, load_in_4bit, tensor_parallel, gpu_memory_mode+ ),+ serve = serve,+ launch = launch,+ server_options = server_options,+ )+ command = ["vibe", *_yolo_command_flags("vibe", yolo), *ctx.args]+ # Like claude, Vibe keeps its own home (~/.vibe: instructions, hooks, trust, agents,+ # sessions); the env layer pins the Unsloth provider and model above its config files.+ request_body = server_options.request_body()+ if "temperature" not in request_body:+ # Vibe always sends a temperature, which the server honours over the model's+ # recommended one, so pass the recommendation along explicitly.+ status = _inference_status(base, key)+ recommended = (status.get("inference") or {}).get("temperature")+ if recommended is not None and any(+ _model_id_matches(entry["id"], status_id, allow_casefold = is_loopback_url(base))+ for status_id in (status.get("active_model"), status.get("model_identifier"))+ if status_id+ ):+ request_body = {**request_body, "temperature": recommended}+ env = {_VIBE_ENV_KEY: key, **_vibe_env(base, entry, request_body)}+ _run(base, entry, env, command, launch = launch, install_hint = install_hint)diff --git a/unsloth_cli/tests/test_start.py b/unsloth_cli/tests/test_start.pyindex 51eefeae964..59498cad6ba 100644--- a/unsloth_cli/tests/test_start.py+++ b/unsloth_cli/tests/test_start.py@@ -1302,7 +1302,7 @@ def test_subagent_model_id_warns_when_status_unavailable(monkeypatch, capsys):assert "could not verify the loaded GGUF variant" in capsys.readouterr().err[email protected]("agent", ["openclaw", "hermes", "dsh"])[email protected]("agent", ["openclaw", "hermes", "dsh", "vibe"])@pytest.mark.parametrize("flag", ["--as-subagent", "--as-subagent=true", "--as-subagent=false"])def test_unsupported_agents_reject_as_subagent(agent, flag):result = CliRunner().invoke(start.start_app, [agent, flag])@@ -1311,7 +1311,7 @@ def test_unsupported_agents_reject_as_subagent(agent, flag):@pytest.mark.parametrize(- "agent", ["claude", "codex", "openclaw", "opencode", "hermes", "pi", "dsh"]+ "agent", ["claude", "codex", "openclaw", "opencode", "hermes", "pi", "dsh", "vibe"])def test_launch_preflights_agent_before_connect(agent, monkeypatch):events = []@@ -1410,7 +1410,7 @@ def test_declined_opencode_subagent_install_stops_before_connect(monkeypatch):@pytest.mark.parametrize(- "agent", ["claude", "codex", "openclaw", "opencode", "hermes", "pi", "dsh"]+ "agent", ["claude", "codex", "openclaw", "opencode", "hermes", "pi", "dsh", "vibe"])def test_noninteractive_missing_agent_stops_before_connect(agent, monkeypatch):monkeypatch.setattr(start, "_which_with_install_dirs", lambda _: None)@@ -1431,7 +1431,7 @@ def test_noninteractive_missing_agent_stops_before_connect(agent, monkeypatch):assert f"`{agent}` not found on PATH" in result.output[email protected]("agent", ["claude", "codex", "openclaw", "hermes", "pi", "dsh"])[email protected]("agent", ["claude", "codex", "openclaw", "hermes", "pi", "dsh", "vibe"])def test_no_launch_skips_agent_resolution(agent, monkeypatch):monkeypatch.setattr(start,@@ -3902,7 +3902,7 @@ def test_connect_load_knobs_reach_server_even_when_id_loaded(fake_studio):@pytest.mark.parametrize(- "command_name", ["claude", "codex", "openclaw", "opencode", "hermes", "pi", "dsh"]+ "command_name", ["claude", "codex", "openclaw", "opencode", "hermes", "pi", "dsh", "vibe"])def test_start_agents_expose_gpu_memory_mode_option(command_name):import inspect@@ -6962,6 +6962,139 @@ def test_connect_dsh_no_launch(fake_studio, tmp_path):assert not (home / "settings.yaml").exists()+# ── Vibe (Mistral, OpenAI-compatible /v1, settings and key via VIBE_* env) ──+++def _vibe_settings(env: dict) -> tuple:+ return json.loads(env["VIBE_PROVIDERS"]), json.loads(env["VIBE_MODELS"])+++def test_vibe_env(tmp_path):+ env = start._vibe_env(BASE, MODEL)+ providers, models = _vibe_settings(env)+ assert providers == [+ {+ "name": start._VIBE_PROVIDER,+ "api_base": f"{BASE}/v1",+ "api_key_env_var": start._VIBE_ENV_KEY,+ "api_style": "openai",+ "backend": "generic",+ }+ ]+ assert models == [+ {+ "name": MODEL["id"],+ "provider": start._VIBE_PROVIDER,+ "alias": start._VIBE_MODEL_ALIAS,+ "auto_compact_threshold": int(MODEL["context_length"] * 0.9),+ }+ ]+ assert env["VIBE_ACTIVE_MODEL"] == start._VIBE_MODEL_ALIAS+ assert env["VIBE_ENABLE_TELEMETRY"] == "false"+ # Only the served model is selectable, so a resumed cloud session cannot switch away.+ assert json.loads(env["VIBE_ALLOWED_MODELS"]) == ["re:" + re.escape(MODEL["id"])]+++def test_vibe_env_carries_temperature_and_odd_model_ids():+ model = {"id": 'C:\\models\\q"\U0001f600.gguf', "max_context_length": 32768}+ _, models = _vibe_settings(start._vibe_env(BASE, model, {"temperature": 0.7}))+ assert models[0]["name"] == model["id"]+ assert models[0]["temperature"] == 0.7+ assert models[0]["auto_compact_threshold"] == int(32768 * 0.9)+ _, models = _vibe_settings(start._vibe_env(BASE, {"id": "m"}))+ assert set(models[0]) == {"name", "provider", "alias"}+++def test_connect_vibe_no_launch_uses_env_only(fake_studio, tmp_path):+ result = CliRunner().invoke(start.start_app, ["vibe", "--no-launch", "--yolo"])+ assert result.exit_code == 0, result.output+ _assert_env_set(result.output, "UNSLOTH_API_KEY", "sk-unsloth-feedfacefeedface")+ _assert_env_set(result.output, "VIBE_ACTIVE_MODEL", start._VIBE_MODEL_ALIAS)+ assert "VIBE_HOME" not in result.output+ assert _launch_command(result.output) == ["vibe", "--auto-approve"]+ # Vibe's own home (instructions, hooks, trust, agents) is used as is; nothing is written.+ assert not (tmp_path / "agents" / "vibe").exists()+++def test_vibe_launch_keeps_user_home(fake_studio, monkeypatch):+ monkeypatch.setattr(start.shutil, "which", lambda _: "/usr/local/bin/vibe")+ captured = _capture_launch(monkeypatch, ["vibe", "--temperature", "0.6", "-p", "hi"])+ assert captured["command"][-3:] == ["/usr/local/bin/vibe", "-p", "hi"]+ # Vibe's tools run git/ssh/gh, which need the user's real HOME; ~/.vibe stays its home.+ assert captured["env"].get("HOME") == os.environ.get("HOME")+ assert "VIBE_HOME" not in captured["env"]+ assert _vibe_settings(captured["env"])[1][0]["temperature"] == 0.6++[email protected](shutil.which("vibe") is None, reason = "needs the mistral-vibe CLI")+def test_vibe_real_cli_reaches_unsloth(monkeypatch, tmp_path):+ requests = []++ class Handler(http.server.BaseHTTPRequestHandler):+ def log_message(self, *args):+ pass++ def do_POST(self):+ body = json.loads(self.rfile.read(int(self.headers["Content-Length"])))+ requests.append((self.headers.get("Authorization"), body))+ chunk = {+ "choices": [{"index": 0, "delta": {"content": "pong"}, "finish_reason": "stop"}]+ }+ self.send_response(200)+ self.send_header("Content-Type", "text/event-stream")+ self.end_headers()+ self.wfile.write(f"data: {json.dumps(chunk)}\n\ndata: [DONE]\n\n".encode())++ server = http.server.ThreadingHTTPServer(("127.0.0.1", 0), Handler)+ threading.Thread(target = server.serve_forever, daemon = True).start()+ base = f"http://127.0.0.1:{server.server_address[1]}"+ monkeypatch.setattr(start, "_connect", lambda *args, **kwargs: (base, "sk-unsloth-e2e", MODEL))+ # Keep the real CLI's own state off the runner's ~/.vibe.+ monkeypatch.setenv("VIBE_HOME", str(tmp_path / "vibe"))+ monkeypatch.chdir(tmp_path)+ try:+ result = CliRunner().invoke(+ start.start_app,+ ["vibe", "--yolo", "--temperature", "0.5", "--disabled-tools", "*", "-p", "Reply pong"],+ )+ finally:+ server.shutdown()+ assert result.exit_code == 0, result.output+ assert requests, "vibe never called the Unsloth /v1 endpoint"+ auth, body = requests[0]+ assert auth == "Bearer sk-unsloth-e2e"+ assert body["model"] == MODEL["id"]+ assert body["temperature"] == 0.5+++ ("argv", "status", "expected"),+ [+ ([], {"model_identifier": MODEL["id"], "inference": {"temperature": 1.0}}, 1.0),+ (+ ["--temperature", "0.3"],+ {"model_identifier": MODEL["id"], "inference": {"temperature": 1.0}},+ 0.3,+ ),+ ([], {"model_identifier": "other/model", "inference": {"temperature": 1.0}}, None),+ ([], {}, None),+ ],+)+def test_vibe_sends_recommended_temperature(fake_studio, monkeypatch, argv, status, expected):+ # Vibe always sends a temperature; without one in its model entry it sends 0.2.+ monkeypatch.setattr(start, "_inference_status", lambda *args: status)+ monkeypatch.setattr(start.shutil, "which", lambda _: "/usr/local/bin/vibe")+ captured = _capture_launch(monkeypatch, ["vibe", *argv])+ assert json.loads(captured["env"]["VIBE_MODELS"])[0].get("temperature") == expected+++def test_vibe_install_hint_per_os(monkeypatch):+ monkeypatch.setattr(start.os, "name", "nt")+ assert start._vibe_install_hint() == start._VIBE_WINDOWS_INSTALL_HINT+ monkeypatch.setattr(start.os, "name", "posix")+ assert start._vibe_install_hint() == start._VIBE_POSIX_INSTALL_HINT++@pytest.mark.skipif(os.name == "nt", reason = "WSL scenario")def test_dsh_under_wsl_gets_the_windows_patch_path(fake_studio, monkeypatch):# WSLENV translates DSH_HOME for a Windows dsh, but a path on the command line reaches