Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bin/omarchy-agent
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ commandcode)
command=(commandcode --yolo)
[[ -n ${prompt:-} ]] && command+=(-- "$prompt")
;;
vibe)
# Permission prompts follow Vibe's own config; a positional prompt seeds
# the interactive session.
command=(vibe)
[[ -n ${prompt:-} ]] && command+=("$prompt")
;;
*)
echo "Unsupported default agent: $agent" >&2
exit 1
Expand Down
11 changes: 10 additions & 1 deletion bin/omarchy-agent-usage-vibe
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,21 @@ def session_model(meta):
None when it names no model."""
config = obj(meta.get("config"))
model = resolve_model(config)
if not isinstance(model, dict):
# A config without a models list still names the model it ran on, and
# Vibe serves a model it names no entry for on its default backend.
alias = config.get("active_model")
model = {"alias": alias} if isinstance(alias, str) and alias.strip() else None
if not isinstance(model, dict):
return None
label = model_label(model.get("alias") or model.get("name"))
if label is None:
return None
return label, provider_owner(str(model.get("provider") or ""), config.get("providers"), str(model.get("name") or ""))
# An entry that names no provider is one of Vibe's own models: /model
# persists a bare alias and thinking level, and the built-in list serves
# it on the default Mistral backend.
provider = str(model.get("provider") or PROVIDER)
return label, provider_owner(provider, config.get("providers"), str(model.get("name") or ""))
Comment on lines +235 to +236

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Existing usage stays missing

Sessions already indexed by the old collector do not receive this fix. INDEX_VERSION remains 4, so harness_rows() reuses saved rows when the session files and config have not changed. Those rows still name no owner, leaving their sessions and tokens out of the agents panel. Even --force reuses them.

Bump INDEX_VERSION so existing sessions pass through the new provider fallback. Extend the regression test to cover an index written before the fix.

Knowledge Base Used: Agent accounts and provider usage



def count_prompts(messages_path):
Expand Down
5 changes: 3 additions & 2 deletions bin/omarchy-default-agent
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# omarchy:summary=Set and launch the default coding agent
# omarchy:args=[pi|omp|opencode|ori|claude|codex|grok|openclaw|agy|hermes|copilot|crush|cursor-agent|muse|kimi|qwen|dsh|mcode|kiro-cli|freebuff|kilo|devin|amp|commandcode]
# omarchy:args=[pi|omp|opencode|ori|claude|codex|grok|openclaw|agy|hermes|copilot|crush|cursor-agent|muse|kimi|qwen|dsh|mcode|kiro-cli|freebuff|kilo|devin|amp|commandcode|vibe]
# omarchy:examples=omarchy default agent | omarchy default agent codex | omarchy default agent claude

installing=false
Expand Down Expand Up @@ -64,8 +64,9 @@ devin | devin-cli)
;;
amp | ampcode) agent="amp"; name="Amp" ;;
commandcode | command-code | cmdc) agent="commandcode"; name="Command Code"; agent_package="npm:command-code" ;;
vibe) agent="vibe"; name="Vibe"; agent_package="pipx:mistral-vibe" ;;
*)
echo "Usage: omarchy-default-agent <pi|omp|opencode|ori|claude|codex|grok|openclaw|agy|hermes|copilot|crush|cursor-agent|muse|kimi|qwen|dsh|mcode|kiro-cli|freebuff|kilo|devin|amp|commandcode>"
echo "Usage: omarchy-default-agent <pi|omp|opencode|ori|claude|codex|grok|openclaw|agy|hermes|copilot|crush|cursor-agent|muse|kimi|qwen|dsh|mcode|kiro-cli|freebuff|kilo|devin|amp|commandcode|vibe>"
exit 1
;;
esac
Expand Down
3 changes: 3 additions & 0 deletions default/i18n/en/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,9 @@
"setup.default.agent.qwen": {
"label": "Qwen Code"
},
"setup.default.agent.vibe": {
"label": "Vibe"
},
"setup.default.browser": {
"label": "Browser",
"title": "Default Browser"
Expand Down
1 change: 1 addition & 0 deletions default/omarchy/omarchy-menu.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
"setup.default.agent.ori": {"icon":"","iconFont":"omarchy","label":"Ori","checked":"[[ \"$(omarchy-default-agent)\" == \"ori\" ]]","action":"omarchy-default-agent ori"},
"setup.default.agent.pi": {"icon":"","iconFont":"omarchy","label":"Pi","checked":"[[ \"$(omarchy-default-agent)\" == \"pi\" ]]","action":"omarchy-default-agent pi"},
"setup.default.agent.qwen": {"icon":"","iconFont":"omarchy","label":"Qwen Code","checked":"[[ \"$(omarchy-default-agent)\" == \"qwen\" ]]","action":"omarchy-default-agent qwen"},
"setup.default.agent.vibe": {"icon":"󰖐","label":"Vibe","checked":"[[ \"$(omarchy-default-agent)\" == \"vibe\" ]]","action":"omarchy-default-agent vibe"},
"setup.default.browser": {"icon":"","label":"Browser","title":"Default Browser"},
"setup.default.browser.chromium": {"icon":"","label":"Chromium","checked":"[[ \"$(omarchy-default-browser)\" == \"chromium\" ]]","action":"omarchy-default-browser chromium"},
"setup.default.browser.chrome": {"icon":"󰊯","label":"Chrome","checked":"[[ \"$(omarchy-default-browser)\" == \"chrome\" ]]","action":"omarchy-default-browser chrome"},
Expand Down
1 change: 1 addition & 0 deletions etc/mise/conf.d/omarchy-tools.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ node = { version = "latest", lazy = true, minimum_release_age = "0s" }
"npm:command-code" = { version = "latest", lazy = true, auto_update = "4h", lazy_bins = ["commandcode"], minimum_release_age = "0s" }
"npm:freebuff" = { version = "latest", lazy = true, auto_update = "4h", lazy_bins = ["freebuff"], minimum_release_age = "0s" }
oh-my-pi = { version = "latest", lazy = true, auto_update = "4h", minimum_release_age = "0s" }
"pipx:mistral-vibe" = { version = "latest", lazy = true, auto_update = "4h", lazy_bins = ["vibe"], minimum_release_age = "0s" }
opencode = { version = "latest", lazy = true, auto_update = "4h", minimum_release_age = "0s" }
ori = { version = "latest", lazy = true, minimum_release_age = "0s" }
pi = { version = "latest", lazy = true, auto_update = "4h", minimum_release_age = "0s" }
Expand Down
1 change: 1 addition & 0 deletions manual/17-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Omarchy includes launchers for the coding agents below without choosing a defaul
| `ori` | [Ori](https://openrouter.ai/docs/guides/ori/harness), OpenRouter's harness |
| `pi` | [Mario Zechner's Pi](https://github.com/badlogic/pi-mono) |
| `qwen` | [Qwen Code](https://github.com/QwenLM/qwen-code), Alibaba's coding agent |
| `vibe` | [Mistral Vibe](https://github.com/mistralai/mistral-vibe), Mistral's coding agent |

`ori` is the odd one out: it runs the other harnesses against OpenRouter's whole model catalog, so `ori claude`, `ori codex`, or `ori opencode` start those agents on whichever model you point them at, and `ori code` is Ori's own agent.

Expand Down
12 changes: 12 additions & 0 deletions test/shell.d/agent-usage-vibe-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,18 @@ with contextlib.redirect_stderr(io.StringIO()):
expect("a Unified Harness session on an alias config.toml dropped is billed to no one",
[record["todayTokensByModel"], local["todayTokensByModel"]], [{}, {}], [record, local])

# An entry /model persists names a bare alias and a thinking level, with no
# provider: it is one of Vibe's own models, served on the default Mistral
# backend, so its sessions are Mistral's.
sandbox()
(home() / ".vibe").mkdir(parents=True, exist_ok=True)
(home() / ".vibe" / "config.toml").write_text('[[models]]\nalias = "mistral-medium-3.5"\nthinking = "high"\n')
write_unified("ses_builtin", usage(500, 50), entries=[message("b1", "user", "turn_start")], alias="mistral-medium-3.5")
with contextlib.redirect_stderr(io.StringIO()):
record = vibe("--force")
expect("a model entry that names no provider runs on Vibe's default Mistral backend",
[record["todayTokensByModel"], record["todayPrompts"]], [{"mistral-medium-3.5": 550}, 1], record)

# ------------------------------------------------------- model resolution

sandbox()
Expand Down