Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(spend): disclose the embed --max-usd overrides and restamp-estimate changes (#6984, #6959)

time-attack49581398383f
diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.ts
index 3c5019cdb8..0ea4dec04b 100644
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@ -942,6 +942,8 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;
{ since: '0.60.312.0', text: 'A Codex connection installed with `gbrain connect --harness codex --install` (or `bootstrap harness`) now keeps Codex\'s own per-tool settings (`[mcp_servers.<name>.tools.<tool>]`, written when you pick "always allow") instead of refusing the next install or `--fresh-token` renewal with `configuration_conflict`: settings inside the gbrain-managed block are carried into the rewritten block, settings outside it stay where they are, and any other edit to the entry (its URL, headers or other keys) still refuses. Removing the connection refuses with `configuration_conflict` while such settings sit outside the block, naming the tables to delete, so the server is never left half-defined.' },
// #6796 (apply-migrations applied_pending_host_work).
{ since: '0.60.312.0', text: '`gbrain apply-migrations --list` now shows v0.53.0 as `applied_pending_host_work` instead of `applied` while its stored shared-skills report still names host work (a source\'s inventory, writer, projection or publication-policy stage, or a brain-level pending action), and no longer prints "All migrations up to date" for it; `--list --json` rows carry that status and an `applied_pending_host_work` array whose fix is the read-only `gbrain apply-migrations --migration 0.53.0 --dry-run --json` inventory. Scripts that match `applied` should accept both. `gbrain doctor` warns on `minions_migration` (`details.code: migration_host_work_pending`) until a later `gbrain apply-migrations --yes` re-check finds the work done. Unenrolled members (every new brain), sources that opted out and a declined migration are never reported.' },
+ { since: '0.60.312.0', text: 'A foreground `gbrain embed --max-usd <n>` run (and `--images`, and the `--slugs` / `--held` approval preflight) now prices with the brain\'s `pricing.overrides` as queued embed jobs already did (#6984). A run on a model priced only by an override, which used to stop with `no_pricing` before embedding anything, now proceeds and can spend up to the cap; an override that lowers a shipped rate lets the run embed more before the cap stops it.' },
+ { since: '0.60.312.0', text: 'A provider migration without a column rebuild (`gbrain migrate embeddings`, and its `--dry-run` plan) now leaves out of its paid estimate the vectors it keeps and only restamps (same model, text hash and width) (#6959): `total_chars` and `est_cost_usd` drop by that text, and the worst-case figure an approval (`--max-cost-usd` / `--yes`) is checked against no longer charges for it, so an approval that covers the real re-embed work is no longer refused. A width change still prices every chunk.' },
{ since: '0.60.312.0', text: 'A queued job under a cost cap you set that calls a model with a registered price but no known context-token ceiling (OpenRouter models) now stops with `no_context_ceiling` instead of `no_pricing`. The message says the price is already known; the fix asks before rerunning without your cap (`--yes` in place of `--max-usd`), or asks for the model\'s context size for the brain-host operator. Under a default or derived cap the warning names the missing ceiling. Nothing else changed: no provider call is made either way.' },
{ since: '0.60.312.0', text: 'A `claude-cli:` chat call capped at 1024 output tokens or fewer (the `gbrain models doctor` probe, query intent, fact classification, decisions, calibration and grading calls) now runs with Claude Code\'s thinking turned off (`MAX_THINKING_TOKENS=0`), because the API needs a thinking budget of at least 1024 tokens below the cap; those calls failed with a 400 before. The call reports `thinking: \'disabled_below_floor\'` in its claude-cli provider metadata. Calls with a larger cap are unchanged.' },
{ since: '0.60.312.0', text: 'A database-plane `chat_model` or `expansion_model` (`gbrain config set chat_model …`) now selects the model when no `models.*` key, `GBRAIN_MODEL`, `GBRAIN_CHAT_MODEL` / `GBRAIN_EXPANSION_MODEL` or config.json pin outranks it; before, the gateway ignored a stored value and used the built-in default. So a brain that stored a `chat_model` or `expansion_model` earlier now runs that model after upgrading, which can change which model runs and therefore what each chat call spends; check with `gbrain models` and remove it with `gbrain config unset chat_model` to keep the default. Its provenance reads `config_key` / `chat_model`. When one of those does outrank the write, `config set` still stores it but warns, naming the key, variable or file (never its value) and the fix (`gbrain config unset <models key>`, the new `gbrain config unset chat_model --file`, or unsetting the variable); `config set chat_model|expansion_model … --json` reports `effective` and `shadowed_by`.' },
diff --git a/test/behavior-change-wave20-lane3.test.ts b/test/behavior-change-wave20-lane3.test.ts
index fa8ce02171..04dc6656e3 100644
--- a/test/behavior-change-wave20-lane3.test.ts
+++ b/test/behavior-change-wave20-lane3.test.ts
@@ -17,4 +17,19 @@ describe('wave 20 lane 3 spend rows', () => {
expect(row).toMatch(/change which model runs/);
expect(row).toMatch(/spend/);
});
+
+ test('#6984: embed --max-usd prices with pricing.overrides and can now spend up to the cap', () => {
+ const [row] = find('(#6984)');
+ expect(row).toBeDefined();
+ expect(row).toContain('pricing.overrides');
+ expect(row).toContain('no_pricing');
+ expect(row).toMatch(/spend up to the cap/);
+ });
+
+ test('#6959: restamp-only vectors are left out of paid migration estimates and approvals', () => {
+ const [row] = find('(#6959)');
+ expect(row).toBeDefined();
+ expect(row).toMatch(/estimate/);
+ expect(row).toMatch(/approv/);
+ });
});