show-me-the-env 0.95.0 → 0.95.1
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/package.json +1 -1
- package/src/machines/model-pick.mjs +18 -10
- package/src/machines/queue.mjs +1 -1
package/package.json
CHANGED
|
@@ -125,8 +125,8 @@ function resolveEffort(effort, omoReasoning) {
|
|
|
125
125
|
return EFFORTS[Math.min(want, ceiling)];
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
// pick(u, settings, { claudeShareLeft, effortPin, throttled, now }) -> { model, effort, held, basis }; throttled maps a model
|
|
129
|
-
// time a session of it ended on a 429.
|
|
128
|
+
// pick(u, settings, { claudeShareLeft, effortPin, throttled, now }) -> { model, effort, held, why, basis }; throttled maps a model
|
|
129
|
+
// to the time a session of it ended on a 429, and why says what holds a held unit.
|
|
130
130
|
export function pick(u, settings, { claudeShareLeft = Infinity, effortPin = null, throttled = {}, now = Date.now() } = {}) {
|
|
131
131
|
const agents = readOmo(settings.omo);
|
|
132
132
|
const allowed = new Set(Object.values(agents).map((a) => a.model));
|
|
@@ -140,23 +140,31 @@ export function pick(u, settings, { claudeShareLeft = Infinity, effortPin = null
|
|
|
140
140
|
let extra = '';
|
|
141
141
|
const hot = (m) => now - (throttled[m] ?? 0) < THROTTLE_MS;
|
|
142
142
|
let held = false;
|
|
143
|
+
let why = '';
|
|
143
144
|
const elsewhere = settings.whenThrottled[model];
|
|
145
|
+
// A fallback that ended a session on a 429 within 30 min takes no unit (2026-12-04 11:1x: coggs-module-audit-1204 and both
|
|
146
|
+
// relaunches went to the reserve's model while its one account cooled down, and each ended on a 429 within seconds).
|
|
147
|
+
const fallbackHot = Boolean(elsewhere) && hot(elsewhere);
|
|
144
148
|
if (isVisual(u)) {
|
|
145
149
|
model = newestFable(settings.routes);
|
|
146
150
|
if (EFFORTS.indexOf(effort) < EFFORTS.indexOf('high')) effort = 'high';
|
|
147
151
|
extra = '; visual unit, forced to ' + model + ' (newest Fable in ' + settings.routes.replaceAll('\\', '/') + ')';
|
|
148
|
-
if (hot(model)) { held = true;
|
|
152
|
+
if (hot(model)) { held = true; why = model + ' ended a session on 429 within 30 min'; extra += '; ' + why + ', held'; }
|
|
149
153
|
} else if (claudeShareLeft <= 0 && elsewhere) {
|
|
150
|
-
|
|
151
|
-
model = elsewhere;
|
|
154
|
+
if (fallbackHot) { held = true; why = 'no Claude share left and ' + elsewhere + ' ended a session on 429 within 30 min'; extra = '; ' + why + ', held'; }
|
|
155
|
+
else { extra = '; no Claude share left at the account guard, ' + model + ' runs as ' + elsewhere; model = elsewhere; }
|
|
152
156
|
} else if (claudeShareLeft < settings.claudeReserve && elsewhere && (chk.domain === 'knowledge' || chk.domain === 'writing')) {
|
|
153
|
-
|
|
154
|
-
|
|
157
|
+
if (fallbackHot) {
|
|
158
|
+
held = hot(model);
|
|
159
|
+
why = model + ' and ' + elsewhere + ' each ended a session on 429 within 30 min';
|
|
160
|
+
extra = '; Claude share ' + claudeShareLeft + ' under the reserve ' + settings.claudeReserve + ', but ' + elsewhere + ' ended a session on 429 within 30 min, so the ' + chk.domain + ' unit stays on ' + model + (held ? ', which did too, held' : '');
|
|
161
|
+
} else { extra = '; Claude share ' + claudeShareLeft + ' under the reserve ' + settings.claudeReserve + ', a ' + chk.domain + ' unit runs as ' + elsewhere; model = elsewhere; }
|
|
155
162
|
} else if (hot(model) && elsewhere) {
|
|
156
|
-
|
|
157
|
-
model = elsewhere;
|
|
163
|
+
if (fallbackHot) { held = true; why = model + ' and ' + elsewhere + ' each ended a session on 429 within 30 min'; extra = '; ' + why + ', held'; }
|
|
164
|
+
else { extra = '; ' + model + ' ended a session on 429 within 30 min, runs as ' + elsewhere; model = elsewhere; }
|
|
158
165
|
}
|
|
159
166
|
if (effortPin) effort = effortPin;
|
|
160
167
|
const basis = 'omo.jsonc [codex].agents.' + key + ' = ' + omoRow.model + ' ' + omoRow.reasoning + '; model-ladder: ' + lad.line + '; modelchk: ' + chk.tier + ' + ' + chk.effort + ', ' + chk.domain + ' (' + chk.why + ')' + extra + (effortPin ? '; effort pinned ' + effortPin : '');
|
|
161
|
-
|
|
168
|
+
if (!held && heldVisual(u, model)) { held = true; why = 'a visual unit would start on ' + model + ', not Fable'; }
|
|
169
|
+
return { model, effort, held, why, basis };
|
|
162
170
|
}
|
package/src/machines/queue.mjs
CHANGED
|
@@ -578,7 +578,7 @@ export async function fillPass({ fleet, queueFile, options = {}, shadow = false,
|
|
|
578
578
|
if (onDisk.hold.has(u.id) || onDisk.skip.has(u.id)) { say('launch HELD ' + u.id + ': ' + (onDisk.hold.has(u.id) ? 'held' : 'skipped') + ' in the state file while this pass ran'); return; }
|
|
579
579
|
const chosen = pickModel(u, fleet.models, { claudeShareLeft: shareLeft(fleet.models.shareFile), effortPin: pins[u.id] ?? u.effort ?? null, throttled: st.throttled ?? {} });
|
|
580
580
|
say('pick ' + u.id + ' -> ' + chosen.model + ' ' + chosen.effort + ': ' + chosen.basis);
|
|
581
|
-
if (chosen.held) { say('launch HELD ' + u.id + ':
|
|
581
|
+
if (chosen.held) { say('launch HELD ' + u.id + ': ' + chosen.why); return; }
|
|
582
582
|
const started = await io.startSession(fleet, runnerOf(runner), {
|
|
583
583
|
name, promptFile: p.prompt, repoDir: path.join(fleet.workspace, p.repo), sha: p.sha, mode: 'write', model: chosen.model, effort: chosen.effort, minutes,
|
|
584
584
|
branch: 'fleet/' + name, cap: capOverride ?? runnerOf(runner).cap, inputsDir: p.inputs.bytes > 0 || p.inputs.skipped || p.inputs.shared.length ? p.inputs.dir : null,
|