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: give the catalog its model list so Antigravity's per-model effort rungs survive

[._.]/ Adam Eivyb4006de5f5a2
diff --git a/server/services/compositeProviders.js b/server/services/compositeProviders.js
index 18f2daee56..8718819990 100644
--- a/server/services/compositeProviders.js
+++ b/server/services/compositeProviders.js
@@ -224,9 +224,15 @@ export async function withCompositeCandidates(providersMap, ids) {
return providersMap;
}
-/** The ladder a harness accepts, read through the same function every route uses. */
-const harnessEffortLevels = (harness, model = null) => effortLevelsForProvider(
- { harnessId: harness.id, command: harness.recipe?.command ?? null, type: harness.modes[0] },
+/**
+ * The ladder a harness accepts, read through the same function every route uses.
+ * `models` is the catalog the ladder is narrowed against: Antigravity publishes
+ * one entry per rung (`<base>-low|medium|high`), so `effortLevelsForProvider`
+ * needs the surrounding catalog to tell which rungs a model actually offers.
+ * Omitting it collapsed every per-model ladder onto the harness default.
+ */
+const harnessEffortLevels = (harness, model = null, models = []) => effortLevelsForProvider(
+ { harnessId: harness.id, command: harness.recipe?.command ?? null, type: harness.modes[0], models },
model,
);
@@ -261,8 +267,9 @@ export async function buildProviderCatalog({ presets = [] } = {}) {
const base = effortLevels[harness.id];
const models = new Set(compatible.get(harness.id)
.flatMap(({ connection, instance }) => applyServicePlanFilter(instance.definition, instance.plan, connection.catalog?.models || [])));
- const perModel = [...models]
- .map((model) => [model, harnessEffortLevels(harness, model)])
+ const catalogModels = [...models];
+ const perModel = catalogModels
+ .map((model) => [model, harnessEffortLevels(harness, model, catalogModels)])
.filter(([, ladder]) => !sameLadder(ladder, base));
return [harness.id, Object.fromEntries(perModel)];
}));
diff --git a/server/services/compositeProviders.test.js b/server/services/compositeProviders.test.js
index f5418d96db..7bfc2a9da2 100644
--- a/server/services/compositeProviders.test.js
+++ b/server/services/compositeProviders.test.js
@@ -79,6 +79,10 @@ const GRAPH = {
transports: { anthropic: { baseUrl: 'https://api.anthropic.com' } }, credentials: {}, credentialVia: 'bootstrap' }),
connection(6, { kind: 'gateway:nvidia-nim', label: 'NIM (off)', slug: 'nvidia-nim-off', definitionId: 'nvidia-nim', plan: 'paid',
transports: { openai: { baseUrl: 'https://integrate.api.nvidia.com/v1' } }, credentials: { apiKey: 'other' }, enabled: false }),
+ // Antigravity publishes one catalog entry PER RUNG (`<base>-low|medium|high`),
+ // which is what the per-model effort ladders are derived from.
+ connection(7, { kind: 'subscription', label: 'Antigravity', slug: 'antigravity', definitionId: 'antigravity', plan: 'subscription',
+ credentials: {}, catalog: { state: 'known', models: ['gemini-3.8-flash-low', 'gemini-3.8-flash-high', 'gemini-3.1-pro-high'] } }),
],
};
const BOOTSTRAPS = { 'corp-auth': { label: 'Corp auth', command: 'corp-auth', args: ['run'], argsSeparator: '--', harnessNames: { claude: 'claude-code' } } };
@@ -297,6 +301,15 @@ describe('describeCompositeProvider / resolveCompositeProvider over the live sto
expect(catalog.bootstraps).toEqual([{ slug: 'corp-auth', label: 'Corp auth', harnessNames: { claude: 'claude-code' } }]);
expect(catalog.effortLevels).toMatchObject({ pi: ['low', 'medium', 'high', 'xhigh', 'max'], direct: null, claude: ['low', 'medium', 'high', 'xhigh', 'max'] });
expect(catalog.effortLevelsByModel).toMatchObject({ pi: {}, direct: {} });
+ // A per-model ladder is NARROWED by the surrounding catalog: Antigravity
+ // offers a rung only where `<base>-<rung>` is itself a catalog entry. Without
+ // the catalog every model collapsed onto the harness default and this map
+ // came back empty, silently dropping the whole per-model axis.
+ expect(catalog.effortLevelsByModel.antigravity).toEqual({
+ 'gemini-3.8-flash-low': ['low', 'high'],
+ 'gemini-3.8-flash-high': ['low', 'high'],
+ 'gemini-3.1-pro-high': ['high'],
+ });
// Nothing in the catalog carries a credential.
expect(JSON.stringify(catalog)).not.toMatch(/nim-key|or-key|corp-auth run/);
expect(store.readGraph).toHaveBeenCalledTimes(1);