@tiens.nguyen/gu-cli 1.0.914 → 1.0.916

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.
Files changed (2) hide show
  1. package/free-model.mjs +8 -0
  2. package/package.json +1 -1
package/free-model.mjs CHANGED
@@ -325,6 +325,14 @@ export async function applyPreset(preset, api, { rotateOnly = false } = {}) {
325
325
  const fresh = (await api.settings()) ?? {};
326
326
  const row = (fresh.agentCodingBackends ?? []).find((r) => r && sameServer(r.url, preset.baseUrl));
327
327
  if (!row?.id) return { ok: false, why: "the server row was not saved" };
328
+ // THE DEFAULT CODING SERVER, not only the account's coding model (found on a new Windows 11 machine, 2026-11-19): that
329
+ // machine's first-run setup had left agentCodingDefaultKind = "ollama" and no default row, and the default coder resolves
330
+ // from the kind unless a default ROW is named — so gu said "deepseek is now your coding model" and the banner still showed
331
+ // the shared Ollama as the coder; the question went there and never came back. Naming the row outranks the kind (the other
332
+ // preset path, preset-apply.mjs, does the same). Only on the first apply: a key rotation never moves the person's coder.
333
+ if (!rotateOnly && !(await api.saveSettings({ agentCodingDefaultBackendId: row.id }))) {
334
+ return { ok: false, why: "couldn't make the free model the default coding server" };
335
+ }
328
336
  // The key: re-added only when it changed (its fingerprint), so a restart adds nothing.
329
337
  const keys = (await api.keys()) ?? [];
330
338
  const named = keys.find((k) => k?.backendId === row.id && k?.name === `${FREE_KEY_NAME} ${preset.keyId}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiens.nguyen/gu-cli",
3
- "version": "1.0.914",
3
+ "version": "1.0.916",
4
4
  "description": "gu: the coding agent in your terminal. It reads your repo, makes the change and runs the tests, with your own models (Ollama or any OpenAI-compatible provider). Free installs keep the agent, its API and its database on your machine. macOS, Linux and Windows.",
5
5
  "keywords": [
6
6
  "ai",