Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: treat agy's configured-default sentinel as an unknown model, not a tier-less one (review round 1)

[._.]/ Adam Eivyac90e6010417
diff --git a/client/src/components/ProviderModelSelector.test.jsx b/client/src/components/ProviderModelSelector.test.jsx
index 9435610043..324eb80b9a 100644
--- a/client/src/components/ProviderModelSelector.test.jsx
+++ b/client/src/components/ProviderModelSelector.test.jsx
@@ -233,6 +233,14 @@ describe('ProviderModelSelector', () => {
expect(options).toEqual(['', 'low', 'high']);
});
+ it('still offers the full ladder on the configured-default sentinel', () => {
+ // The sentinel is the shipped agy defaultModel, so the picker auto-selects
+ // it — the effort control must not hide until a model is chosen.
+ renderEffort({ selectedModel: 'antigravity-configured-default' });
+ const options = [...screen.getByLabelText('Thinking effort').querySelectorAll('option')].map((o) => o.value);
+ expect(options).toEqual(['', 'low', 'medium', 'high']);
+ });
+
it('hides itself (label and all) for an Antigravity model with no tiers', () => {
renderEffort({ selectedModel: 'claude-sonnet-4-6' });
expect(screen.queryByLabelText('Thinking effort')).not.toBeInTheDocument();
diff --git a/client/src/utils/providers.js b/client/src/utils/providers.js
index 3cbfdd8dc2..143cab51f1 100644
--- a/client/src/utils/providers.js
+++ b/client/src/utils/providers.js
@@ -207,8 +207,11 @@ export const antigravityBaseModels = (models) => {
/**
* The effort tiers an Antigravity base model offers per the provider's catalog:
- * the present suffixes, `[]` when the model has none, or `null` when the catalog
- * is unknown (caller falls back to the full ladder).
+ * the present suffixes, `[]` when the model has none, or `null` when the MODEL
+ * is unknown — blank, the configured-default sentinel, or an empty catalog — so
+ * the caller falls back to the full ladder. The sentinel case matters: it is the
+ * shipped agy `defaultModel`, and reporting `[]` for it would hide the effort
+ * control on every freshly-opened picker.
* @param {string|null|undefined} model
* @param {unknown[]} models
* @returns {readonly string[]|null}
@@ -216,6 +219,7 @@ export const antigravityBaseModels = (models) => {
export const antigravityModelEffortLevels = (model, models) => {
const list = (Array.isArray(models) ? models : []).filter(m => typeof m === 'string');
if (list.length === 0) return null;
+ if (isConfiguredDefaultModel(model)) return null;
const { base } = splitAntigravityModel(model);
if (typeof base !== 'string' || base === '') return null;
return Object.freeze(ANTIGRAVITY_EFFORT_LEVELS.filter(level => list.includes(`${base}-${level}`)));
diff --git a/client/src/utils/providers.test.js b/client/src/utils/providers.test.js
index 0eb97b3fb8..0c1ac2374d 100644
--- a/client/src/utils/providers.test.js
+++ b/client/src/utils/providers.test.js
@@ -149,6 +149,9 @@ describe('Antigravity base-model split (server mirror)', () => {
['gemini-3.1-pro', ['low', 'high']],
['gpt-oss-120b', ['medium']],
['claude-sonnet-4-6', []],
+ // The sentinel is the shipped agy defaultModel, so a picker opens on it —
+ // it means "model unknown" (full ladder), not "this model has no tiers".
+ [ANTIGRAVITY_CONFIGURED_DEFAULT, null],
])('antigravityModelEffortLevels(%s)', (model, expected) => {
expect(antigravityModelEffortLevels(model, CATALOG)).toEqual(expected);
expect(serverAntigravityModelEffortLevels(model, CATALOG)).toEqual(expected);
diff --git a/server/lib/providerModels.js b/server/lib/providerModels.js
index a9b495997d..0551435a3a 100644
--- a/server/lib/providerModels.js
+++ b/server/lib/providerModels.js
@@ -138,8 +138,12 @@ export function antigravityBaseModels(models) {
* - `['low','high']` — the suffixed variants present for that base.
* - `[]` — the base is in the catalog with no suffixed variants
* (`claude-sonnet-4-6`): agy has no effort knob for it.
- * - `null` — the catalog is unknown/empty, so the caller should
+ * - `null` — the model is UNKNOWN (blank, the configured-default
+ * sentinel, or an empty catalog), so the caller should
* fall back to the full ladder rather than assume none.
+ * The sentinel case matters: it is the shipped agy
+ * `defaultModel`, and reporting `[]` for it would hide
+ * the effort control on every freshly-opened picker.
* @param {string|null|undefined} model - base or suffixed model id
* @param {unknown[]} models - the provider's model list
* @returns {readonly string[]|null}
@@ -147,6 +151,7 @@ export function antigravityBaseModels(models) {
export function antigravityModelEffortLevels(model, models) {
const list = (Array.isArray(models) ? models : []).filter(m => typeof m === 'string');
if (list.length === 0) return null;
+ if (isConfiguredDefaultModel(model)) return null;
const { base } = splitAntigravityModel(model);
if (typeof base !== 'string' || base === '') return null;
return Object.freeze(ANTIGRAVITY_EFFORT_LEVELS.filter(level => list.includes(`${base}-${level}`)));
diff --git a/server/lib/providerModels.test.js b/server/lib/providerModels.test.js
index 9370d2151a..52eb6b14c2 100644
--- a/server/lib/providerModels.test.js
+++ b/server/lib/providerModels.test.js
@@ -287,6 +287,16 @@ describe('providerModels', () => {
expect(antigravityModelEffortLevels('gemini-3.6-flash', null)).toBeNull();
expect(antigravityModelEffortLevels('', AGY_CATALOG)).toBeNull();
});
+
+ // The sentinel IS the shipped agy defaultModel, so a picker opens on it.
+ // Reporting `[]` would hide the effort control until a model is chosen.
+ it('treats the configured-default sentinel as an UNKNOWN model, not a tier-less one', () => {
+ expect(antigravityModelEffortLevels(ANTIGRAVITY_CONFIGURED_DEFAULT, AGY_CATALOG)).toBeNull();
+ expect(effortLevelsForProvider(
+ { id: 'antigravity-cli', command: 'agy', models: AGY_CATALOG },
+ ANTIGRAVITY_CONFIGURED_DEFAULT,
+ )).toBe(ANTIGRAVITY_EFFORT_LEVELS);
+ });
});
describe('isCodexProvider', () => {