vibeostheog 0.23.4 → 0.23.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/bin/setup.js +0 -0
- package/package.json +1 -1
- package/src/lib/hooks/chat-transform.js +3 -2
- package/src/lib/pricing.js +4 -1
- package/src/lib/trinity-tool.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 0.23.6
|
|
2
|
+
- fix: trinity mode persistence — write to sid+_opt key, respect user's explicit mode
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## 0.23.5
|
|
6
|
+
- fix: tier-based median cost fallback for unknown models
|
|
7
|
+
|
|
8
|
+
|
|
1
9
|
## 0.23.4
|
|
2
10
|
- fix: add complete OpenCode Go + Zen pricing maps, footer dedup/regex fix, free icon
|
|
3
11
|
|
package/bin/setup.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibeostheog",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.6",
|
|
4
4
|
"description": "Cost-aware delegation enforcer for OpenCode. Tracks model usage, routes Task subagents to cheaper tiers, surfaces cumulative savings in chat. Includes research audit, reporting framework, project memory, progressive scratchpad decadence, and trinity CLI for brain/medium/cheap slot switching.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"release": "node scripts/release.mjs",
|
|
@@ -193,9 +193,10 @@ export function syncControlSettings(cv, options = {}) {
|
|
|
193
193
|
}
|
|
194
194
|
if (cv.thinking_mode && currentSel.thinking_level !== "full")
|
|
195
195
|
writeIf("thinking_level", cv.thinking_mode);
|
|
196
|
-
const
|
|
196
|
+
const userSetMode = loadSessionOptMode(sid + "_opt");
|
|
197
|
+
const userOptMode = userSetMode || loadOptimizationMode();
|
|
197
198
|
if (persistOptimizationMode && cv.optimization_mode && userOptMode !== "auto") {
|
|
198
|
-
if (userOptMode !== cv.optimization_mode) {
|
|
199
|
+
if (userOptMode !== cv.optimization_mode && !userSetMode) {
|
|
199
200
|
writeSessionSlot(sid + "_opt", cv.optimization_mode);
|
|
200
201
|
saveOptimizationMode(cv.optimization_mode);
|
|
201
202
|
}
|
package/src/lib/pricing.js
CHANGED
|
@@ -799,7 +799,10 @@ export function modelCostPerTurn(model) {
|
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
801
|
console.error(`[vibeOS] modelCostPerTurn: unknown model '${model}' (normalized: '${key}') — add to MODEL_USD_PER_TURN`);
|
|
802
|
-
|
|
802
|
+
// Fallback by tier: use median cost of all known models in the same tier
|
|
803
|
+
const tier = classify(model);
|
|
804
|
+
const TIER_FALLBACK = { high: 0.01175, mid: 0.00660, budget: 0.00144 };
|
|
805
|
+
return TIER_FALLBACK[tier] ?? 0.00144;
|
|
803
806
|
}
|
|
804
807
|
export function isModelFree(model) {
|
|
805
808
|
if (!model || typeof model !== "string")
|
package/src/lib/trinity-tool.js
CHANGED
|
@@ -202,6 +202,7 @@ export function createTrinityTool(deps) {
|
|
|
202
202
|
const ok = deps.saveOptimizationMode(resolvedSlot);
|
|
203
203
|
if (!ok)
|
|
204
204
|
return `Failed to write mode`;
|
|
205
|
+
deps.writeSessionSlot(deps._OC_SID + "_opt", resolvedSlot);
|
|
205
206
|
const allEntries = [...BRANDED_MODES, ...RUNTIME_MODES];
|
|
206
207
|
const modeEntry = allEntries.find(e => e.id === slot);
|
|
207
208
|
if (modeEntry) {
|