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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat([issue-3495]): pick an Antigravity base model + effort in every picker that can save one
[._.]/ Adam Eivy25077ce8ee75
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex b9c9bc28a4..260430df98 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -95,6 +95,8 @@- **The Antigravity model dropdown made you pick your reasoning effort inside the model name.** `agy models` enumerates the effort tiers as separate ids (`gemini-3.6-flash-low|-medium|-high`), so there was no way to set the base model and the effort independently — and the Three.js Model Generator, which builds its own prompt-runner invocation, had no effort control at all. `ProviderModelSelector` grows optional `effort`/`onEffortChange` props that render a "Thinking effort" select for the effort-capable providers (Antigravity, Claude, Codex) and nothing for the rest, so callers need no guard of their own; a picker that wires those also passes `withEffort` to `useProviderModels` and then lists base models with the suffixes stripped and deduped. That pairing is deliberate rather than a global rewrite: in a picker with no effort control the suffixed ids are the only way to express a tier, so collapsing them there would strip the capability instead of relocating it. Verified against the real binary before building it: `agy` takes `--effort` as its own session flag and accepts the base id — but it validates the PAIR, erroring with `gemini-3.1-pro has no "medium" effort (available: low, high)`. So the tiers offered for an Antigravity model are derived from that provider's own catalog rather than assumed to be the full ladder, and an out-of-range effort clamps down to the nearest tier the model really has instead of producing an invocation agy rejects. A stored suffixed id — still what older installs and federated peers persist — splits into base plus `--effort`, the equivalent invocation, rather than being orphaned, and the picker seeds both controls from its two halves; one that somehow can't be split stays visible as its own option instead of blanking the select. The effort the record stores is the one that will ACTUALLY run — resolved server-side against the provider and model before persisting — so a level left over from a previous selection can not be saved and rendered for a run that never used it. Threading the effort down to `runPromptThroughProvider` also closed a gap on that path generally: it rides the provider clone the arg builders already read, and until now `buildCliArgs`/`buildTuiInvocation` emitted no effort flag at all for claude or codex there (#3480).+- **[issue-3495]** **Only one picker had gained the separate reasoning-effort control, so everywhere else Antigravity still hid the tier inside the model name.** #3480 relocated the effort out of the model id but wired it into the Three.js Model Generator alone; every other dropdown still listed `gemini-3.6-flash-low|-medium|-high` as three separate models. The remaining pickers that already persist and forward an effort now list base models with the tier picked beside them: the CoS Add Task form, the Resume Agent modal (which gains a Thinking Effort select it never had, so a resumed run keeps the tier the original ran at), the scheduled-task global config and its per-stage pipeline config, the Scheduled Jobs provider/model fields, the Agent Operations `/do:*` drawer, the game AI-feedback panel, and the Three.js Models create page (which also gains an effort control — only the detail page had one). Every one of them feeds the selected model to the effort select, so the offered tiers are the ones that model actually has rather than the full ladder — agy rejects `--model gemini-3.1-pro --effort medium` outright. A record, template, or agent saved before the split reads back as base model plus its baked tier, and where a form edits a saved record in place the stored suffixed id stays selectable as its own option instead of blanking the select — it still runs, because the server splits it into `--model` + `--effort`. Pickers whose route has no effort field at all (the editorial-checks run, the per-feature AI assignments, and the prose/vision/embedding pickers) are deliberately left listing the suffixed ids: collapsing them without somewhere to put the tier would strip the capability rather than relocate it (#3495).+- **Composite boards were the only Universe Builder surface with no thumbnail, so a rendered board looked unrendered.** Characters, places, objects and category variations all show their latest render as an `EntryThumbSlot` avatar with a click-to-preview lightbox; the Composites tab showed label + prompt only. Nothing was missing server-side — `compile.js` already stamps an `entryRef` of kind `sheet` on each queued board render and the completion hook already appends the resulting filename to that board's `imageRefs[]`, so the data was sitting in the record with nothing reading it. Composite rows now render through the same `EntryCard` shell + three-state `EntryThumbSlot` the variation and canon rows use (in-flight spinner → rendered thumbnail → empty placeholder with a one-click render button), so their spacing and locked accent can no longer drift from the other surfaces, and clicking a board opens the same page-level lightbox with the real render prompt hydrated from the gallery sidecar. `useRenderJobQueue` had been dropping `sheet`-kind jobs on the grounds that no row consumed them; with every kind the server stamps now settled by a row, the filter is deleted rather than widened — an allowlist that already covers everything can only ever fail closed on the next kind added, silently, with no spinner and no error. Two things this collapsed rather than copied: the row settles through `EntryThumbSlot`'s existing `onComplete` bridge instead of opening a second `useMediaJobProgress` subscription against a jobId the slot is already watching (which is what the variation and canon rows do, at the cost of a row re-render per diffusion tick), and the two page-level job handlers that had each inlined the same append-dedupe-cap now share `appendImageRefById` in `lib/bibleLimits.js`, the client mirror of the server's `mapAppendImageRef` (three other surfaces still inline their own copy). The settle callback is memoized rather than rebuilt per render: `MediaJobThumb` fires its completion effect on `[filename, onFilename]`, so a fresh arrow would re-settle the same job on every keystroke in the builder draft, each one a full gallery refetch — there is a test that fails against the unstable form. Codex review then surfaced the gap that made the whole thing conditional: the draft never adopted the ids the server sanitizer mints, so a board added and rendered in the same session had no `id` to match the one the server stamped onto `entryJobs` — no spinner, no thumbnail until reload, and (now that sheet jobs are tracked) a pending entry with no consumer to clear it. `handleSave` had the server record in hand the whole time and only ever used it for the universe list, so it now adopts the minted ids into both the draft and its dirty baseline — backfilling only the draft would leave the page permanently dirty. That fixes variations, which had the identical latent bug, in the same place rather than special-casing boards. A second review round found the same mismatch in its other shape: on records written before entry ids were persisted at all, `ensureEntryId` mints a fresh uuid on every read, and `POST /render` migrates the record — persisting yet another set — before queueing jobs against it, so the draft is holding ids that exist nowhere. The render flow now reconciles from the persisted record before it enqueues, and the adopt rule is stated as "keep every id the server also has, replace the ones it does not": an id the server has never heard of cannot be the key anything is stored under, while a confirmed id is never re-pointed and so can never be pulled out from under an in-flight job. And a failed board render now says so, the way the variation and canon rows already did, instead of the spinner just vanishing — `EntryThumbSlot` reports the terminal status on a dedicated `onTerminalStatus` prop so a cancel can stay silent. That status deliberately does NOT ride on `onComplete`'s second argument, which was the first thing tried: `useSingleImageRender`'s `handleComplete(filename, key)` is wired straight into that prop by the base-style probe, so a status arriving where it expects a key looked up a job that did not exist, never cleared the real one, and left the probe spinning forever after a perfectly successful render. The full client suite did not catch it — the collision only shows up through a component boundary neither module's tests cross — so `EntryThumbSlot` now asserts `onComplete` is called with exactly one argument, which fails the moment anyone overloads it again.- **[issue-3515] A failed AI goal organization stacked two identical error toasts on top of each other.** Both the Goals list and the Goals tree already showed their own "Failed to organize goals" message, but the API wrapper they called dropped the caller's request-level options on the floor, so the shared request helper had no way to be told to stay quiet and toasted the same failure a second time. `organizeGoals` now takes the provider selection and the request options as separate arguments and forwards the latter, and both views ask for silence — the wrapper is not hard-coded silent, so a future caller with no error UI of its own still gets the helper's toast. Guarded from both ends: a service-level test drives the real request helper against a failing fetch and asserts nothing toasts, and each view asserts it passes `{ silent: true }` and fires exactly one toast.diff --git a/client/src/components/ProviderModelSelector.jsx b/client/src/components/ProviderModelSelector.jsxindex 13b69d940b..f43f034862 100644--- a/client/src/components/ProviderModelSelector.jsx+++ b/client/src/components/ProviderModelSelector.jsx@@ -50,7 +50,7 @@* providers, whose ids don't encode their family.*/import { useId } from 'react';-import { effortLevelsForProvider, localToolUseHint, withToolUseOptionLabel } from '../utils/providers.js';+import { effectiveModelFor, effortLevelsForProvider, localToolUseHint, withToolUseOptionLabel } from '../utils/providers.js';import EffortSelect from './cos/EffortSelect.jsx';const SELECT_CLASS =@@ -98,8 +98,9 @@ export default function ProviderModelSelector({// A blank model ("Default model") isn't a no-op: the agent resolver then runs// the provider's own defaultModel — which for an Ollama-backed provider can be// a non-tool model that silently wedges the stage. So evaluate the EFFECTIVE- // model (explicit selection, else the provider default) for the warning.- const effectiveModel = selectedModel || selectedProvider?.defaultModel || '';+ // model (explicit selection, else the provider default) for the warning — and+ // for the effort ladder, which is per-model on Antigravity.+ const effectiveModel = effectiveModelFor(selectedProvider, selectedModel);const toolHint = highlightToolUse ? localToolUseHint(effectiveModel, selectedProvider) : null;const toolIncapable = toolHint?.toolCapable === false;// Only offer enabled providers (treat a missing `enabled` as enabled). Thediff --git a/client/src/components/apps/SlashDoRunDrawer.jsx b/client/src/components/apps/SlashDoRunDrawer.jsxindex bcea997698..c04b9de978 100644--- a/client/src/components/apps/SlashDoRunDrawer.jsx+++ b/client/src/components/apps/SlashDoRunDrawer.jsx@@ -3,7 +3,6 @@ import { Loader2, Terminal, Wand2 } from 'lucide-react';import Drawer from '../Drawer';import ProviderModelSelector from '../ProviderModelSelector';import ReviewerPicker from '../cos/ReviewerPicker';-import EffortSelect from '../cos/EffortSelect';import useProviderModels from '../../hooks/useProviderModels';import useReviewerModelOptions from '../../hooks/useReviewerModelOptions';import { reviewerModelsFromDefaults } from '../../lib/reviewerModels';@@ -16,8 +15,6 @@ import * as api from '../../services/api';// would be a new identity each render, re-firing the hook's fetch effect forever.const enabledProcessProviderFilter = (p) => Boolean(p?.enabled) && isProcessProvider(p);-const SELECT_CLASS = 'w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm min-h-[44px]';-/*** Pre-flight settings for an Agent Operations `/do:*` run: for `/do:next`, which* work item to claim (or let the agent decide); for every command, the provider /@@ -37,9 +34,11 @@ function SlashDoRunDrawerBody({ open, command, label, appId, appName, onClose, o// fetches — see its `modelOptions` prop).const reviewerModelOptions = useReviewerModelOptions();const {- providers, selectedProviderId, selectedModel, availableModels, selectedProvider,+ providers, selectedProviderId, selectedModel, availableModels,setSelectedProviderId, setSelectedModel- } = useProviderModels({ filter: enabledProcessProviderFilter, allowDefault: true, silent: true });+ // This picker renders the effort control and sends the value, so Antigravity+ // lists base models with the effort picked separately.+ } = useProviderModels({ filter: enabledProcessProviderFilter, allowDefault: true, silent: true, withEffort: true });const [effort, setEffort] = useState('');const [simplify, setSimplify] = useState(true);@@ -117,18 +116,12 @@ function SlashDoRunDrawerBody({ open, command, label, appId, appName, onClose, oavailableModels={availableModels}onProviderChange={(id) => { setSelectedProviderId(id); setEffort(''); }}onModelChange={setSelectedModel}+ effort={effort}+ onEffortChange={setEffort}emptyProviderOption="Auto (default)"emptyModelOption="Default model"highlightToolUse/>- <div className="sm:max-w-xs">- <EffortSelect- provider={selectedProvider}- value={effort}- onChange={setEffort}- className={SELECT_CLASS}- />- </div></section><section className="space-y-3">diff --git a/client/src/components/cos/TaskAddForm.jsx b/client/src/components/cos/TaskAddForm.jsxindex e3a48360b4..88a9a0396a 100644--- a/client/src/components/cos/TaskAddForm.jsx+++ b/client/src/components/cos/TaskAddForm.jsx@@ -7,7 +7,7 @@ import { processScreenshotUploads, processAttachmentUploads } from '../../servicimport { ATTACHMENT_ACCEPT } from '../../utils/fileUpload';import FilePickerButton from '../ui/FilePickerButton';import { formatBytes } from '../../utils/formatters';-import { filterSelectableModels, isTuiProvider, isCliProvider, isProcessProvider, isCodexProvider } from '../../utils/providers';+import { effectiveModelFor, effortAwareModelOptions, isTuiProvider, isCliProvider, isProcessProvider, isCodexProvider, seedModelEffort } from '../../utils/providers';import { DEFAULT_PR_COMPLETION, DEFAULT_REVIEWERS, DEFAULT_REVIEW_STOP_MODE, PR_COMPLETION_OPTIONS, prCompletionOption } from './constants';import { clickableProps } from '../../lib/a11yKeyboard';import { slashdoLabel } from '../../lib/slashdoCatalog';@@ -148,9 +148,12 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fasetPrCompletion(selectedApp?.defaultPrCompletion || DEFAULT_PR_COMPLETION);}, [appDefaultsSig]);- // Get models for selected provider+ // Get models for selected provider. The form carries its own Thinking Effort+ // select and submits it, so Antigravity lists BASE models (`gemini-3.6-flash`)+ // with the tier picked separately — a legacy suffixed id saved in a template+ // stays selectable as its own option.const selectedProvider = providers?.find(p => p.id === newTask.provider);- const availableModels = filterSelectableModels(selectedProvider?.models);+ const availableModels = effortAwareModelOptions(selectedProvider, newTask.model);const providerModelNote = (() => {if (!selectedProvider) return '';if (isTuiProvider(selectedProvider)) return `${selectedProvider.name} runs in an attachable terminal UI session.`;@@ -166,6 +169,15 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fa// untouched, `false` turns it off. Collapsing absent to false would make a// plain user template silently clear toggles it never meant to touch.const applyTemplate = useCallback(async (template) => {+ // A template saved before Antigravity split model from effort pins the+ // suffixed id (`gemini-3.6-flash-high`). Seed the two controls from its two+ // halves so the pin lands on a base model + its tier rather than an option+ // the Model select no longer offers.+ const seeded = seedModelEffort(+ providers?.find(p => p.id === template.provider),+ template.model,+ template.effort,+ );setNewTask(t => ({...t,description: template.description,@@ -176,7 +188,7 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fa// different provider in the form....(template.app ? { app: template.app } : {}),...(template.provider- ? { provider: template.provider, model: template.model || '', effort: template.effort || '' }+ ? { provider: template.provider, model: seeded.model, effort: seeded.effort }: {})}));setSlashdoCommand(template.slashdoCommand || '');@@ -192,7 +204,7 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fadescriptionRef.current?.focus();await api.applyCosTaskTemplate(template.id).catch(() => {});toast.success(`Template applied: ${template.name}`);- }, [newTask.app]);+ }, [newTask.app, providers]);// Save current form as template (inline input instead of window.prompt)const saveAsTemplate = useCallback(async () => {@@ -643,6 +655,7 @@ export default function TaskAddForm({ providers, apps, onTaskAdded, compact = fa) : null}<EffortSelectprovider={selectedProvider}+ model={effectiveModelFor(selectedProvider, newTask.model)}value={newTask.effort}onChange={effort => setNewTask(t => ({ ...t, effort }))}className="sm:w-40 w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm min-h-[44px]"diff --git a/client/src/components/cos/tabs/AgentsTab.jsx b/client/src/components/cos/tabs/AgentsTab.jsxindex 6edb4d6659..d8d69ede41 100644--- a/client/src/components/cos/tabs/AgentsTab.jsx+++ b/client/src/components/cos/tabs/AgentsTab.jsx@@ -109,12 +109,13 @@ export default function AgentsTab({ agents, onRefresh, liveOutputs, providers, aonRefresh();}, [onRefresh]);- const handleResumeSubmit = async ({ description, context, model, provider, app, type = 'user', screenshots }) => {+ const handleResumeSubmit = async ({ description, context, model, provider, effort, app, type = 'user', screenshots }) => {const result = await api.addCosTask({description,context,model: model || undefined,provider: provider || undefined,+ effort: effort || undefined,app: app || undefined,type,screenshotsdiff --git a/client/src/components/cos/tabs/JobsTab.jsx b/client/src/components/cos/tabs/JobsTab.jsxindex 54c5e10bd6..b3b52efe5c 100644--- a/client/src/components/cos/tabs/JobsTab.jsx+++ b/client/src/components/cos/tabs/JobsTab.jsx@@ -5,7 +5,7 @@ import * as api from '../../../services/api';import { timeAgo, formatDateTime } from '../../../utils/formatters';import { CRON_PRESETS, DEFAULT_CRON, describeCron } from '../../../utils/cronHelpers';import WeekdayTimePicker from '../../WeekdayTimePicker';-import { filterSelectableModels } from '../../../utils/providers';+import { effectiveModelFor, effortAwareModelOptions } from '../../../utils/providers';import ProviderModelSelector from '../../ProviderModelSelector';import EffortSelect from '../EffortSelect';import InlineConfirmRow from '../../ui/InlineConfirmRow';@@ -120,12 +120,18 @@ function BriefingConfig({ config, onChange }) {// active provider / its default model / default effort. Only rendered for agent// jobs (shell/script jobs never reach the AI runner). `data` carries// `providerId`/`model`/`effort`; `onChange` applies a partial patch back onto the-// form state. Effort only renders for effort-capable providers (claude/codex) and-// resets when the provider changes.+// form state. Effort only renders for effort-capable providers (claude/codex/agy)+// and resets when the provider changes.+//+// The stored model is left as-is rather than split into base + effort on read:+// this edits a saved record in place, so rewriting the displayed value without+// saving would put the form and the record out of sync. A legacy suffixed id+// stays visible via `effortAwareModelOptions`' pin and still runs — the server+// splits it into base + `--effort`.function JobProviderModelFields({ data, providers, onChange }) {if (!providers?.length) return null;const selectedProvider = providers.find(p => p.id === data.providerId);- const availableModels = filterSelectableModels(selectedProvider?.models);+ const availableModels = effortAwareModelOptions(selectedProvider, data.model);return (<div><span className="text-xs text-gray-400 block mb-1">AI Provider & Model (optional)</span>@@ -143,6 +149,7 @@ function JobProviderModelFields({ data, providers, onChange }) {/><EffortSelectprovider={selectedProvider}+ model={effectiveModelFor(selectedProvider, data.model)}value={data.effort}onChange={effort => onChange({ effort })}label="Thinking Effort (optional)"diff --git a/client/src/components/cos/tabs/ResumeAgentModal.jsx b/client/src/components/cos/tabs/ResumeAgentModal.jsxindex 579d3374e1..939219dbe5 100644--- a/client/src/components/cos/tabs/ResumeAgentModal.jsx+++ b/client/src/components/cos/tabs/ResumeAgentModal.jsx@@ -5,7 +5,8 @@ import toast from '../../ui/Toast';import Modal from '../../ui/Modal';import FilePickerButton from '../../ui/FilePickerButton';import { FormField } from '../../ui/FormField';-import { filterSelectableModels } from '../../../utils/providers';+import EffortSelect from '../EffortSelect';+import { effectiveModelFor, effortAwareModelOptions, seedModelEffort } from '../../../utils/providers';export default function ResumeAgentModal({ agent, taskType = 'user', providers, apps, onSubmit, onClose }) {const taskDescription = agent.metadata?.taskDescription || agent.taskId || 'Resume previous task';@@ -34,11 +35,23 @@ export default function ResumeAgentModal({ agent, taskType = 'user', providers,outputSummary ? `\n## Last Output:\n\`\`\`\n${outputSummary}\n\`\`\`` : ''].filter(Boolean).join('\n');- const [formData, setFormData] = useState({- refinedInstructions: '',- provider: agent.metadata?.providerId || agent.metadata?.provider || '',- model: agent.metadata?.model || '',- app: agent.metadata?.taskApp || agent.metadata?.app || ''+ const [formData, setFormData] = useState(() => {+ const provider = agent.metadata?.providerId || agent.metadata?.provider || '';+ // The agent being resumed may have run on a pre-split Antigravity id+ // (`gemini-3.6-flash-high`), which the Model select no longer lists. Seed the+ // two controls from its halves so the resumed run keeps the same tier.+ const seeded = seedModelEffort(+ providers?.find(p => p.id === provider),+ agent.metadata?.model,+ agent.metadata?.effort,+ );+ return {+ refinedInstructions: '',+ provider,+ model: seeded.model,+ effort: seeded.effort,+ app: agent.metadata?.taskApp || agent.metadata?.app || ''+ };});const [screenshots, setScreenshots] = useState([]);const [isSubmitting, setIsSubmitting] = useState(false);@@ -54,8 +67,10 @@ export default function ResumeAgentModal({ agent, taskType = 'user', providers,setScreenshots(prev => prev.filter(s => s.id !== id));};+ // The modal carries its own Thinking Effort select and submits it, so+ // Antigravity lists BASE models with the tier picked separately.const selectedProvider = providers?.find(p => p.id === formData.provider);- const availableModels = filterSelectableModels(selectedProvider?.models);+ const availableModels = effortAwareModelOptions(selectedProvider, formData.model);const submittingRef = useRef(false);const handleSubmit = async (e) => {@@ -73,6 +88,7 @@ export default function ResumeAgentModal({ agent, taskType = 'user', providers,context: fullContext,model: formData.model,provider: formData.provider,+ effort: formData.effort,app: formData.app,type: taskType,screenshots: screenshots.length > 0 ? screenshots.map(s => s.path) : undefined@@ -198,12 +214,12 @@ export default function ResumeAgentModal({ agent, taskType = 'user', providers,</select></FormField>- {/* Provider and Model */}- <div className="flex gap-3">+ {/* Provider, Model and Thinking Effort */}+ <div className="flex flex-col sm:flex-row gap-3"><FormField label="Provider" className="flex-1"><selectvalue={formData.provider}- onChange={e => setFormData({ ...formData, provider: e.target.value, model: '' })}+ onChange={e => setFormData({ ...formData, provider: e.target.value, model: '', effort: '' })}className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm focus:border-port-accent focus:outline-hidden"><option value="">Auto (default)</option>@@ -225,6 +241,15 @@ export default function ResumeAgentModal({ agent, taskType = 'user', providers,))}</select></FormField>+ <EffortSelect+ provider={selectedProvider}+ model={effectiveModelFor(selectedProvider, formData.model)}+ value={formData.effort}+ onChange={effort => setFormData(d => ({ ...d, effort }))}+ label="Thinking Effort"+ fieldClassName="flex-1"+ className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm focus:border-port-accent focus:outline-hidden"+ /></div>{/* Context Preview (collapsed) */}diff --git a/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx b/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsxindex 0b511b5c0a..3bb68d4516 100644--- a/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx+++ b/client/src/components/cos/tabs/schedule/GlobalConfigControls.jsx@@ -12,6 +12,7 @@ import useReviewerModelOptions from '../../../../hooks/useReviewerModelOptions';import { reviewerModelsFromDefaults } from '../../../../lib/reviewerModels';import ToggleSwitch from '../../../ToggleSwitch';import useTaskModelPins from '../../../../hooks/useTaskModelPins';+import { effectiveModelFor } from '../../../../utils/providers';import EffortSelect from '../../EffortSelect';import PromptEditor from './PromptEditor';import RunTaskButton from './RunTaskButton';@@ -170,8 +171,10 @@ export default function GlobalConfigControls({ taskType, config, onUpdate, onTri? prCompletion === '' || prCompletion === 'review-then-merge': !!config.taskMetadata?.reviewLoop;- // `selectedProvider` / `availableModels` come from useTaskModelPins above —- // it resolves the pin against the active provider and keeps a stale pin listed.+ // `selectedProvider` / `availableModels` come from useTaskModelPins above — it+ // resolves the pin against the active provider, lists Antigravity's BASE models+ // (this panel persists a separate Thinking Effort), and keeps a stale suffixed+ // pin selectable so it still runs while showing what it is.const status = config.status || {};return (@@ -317,7 +320,7 @@ export default function GlobalConfigControls({ taskType, config, onUpdate, onTri<EffortSelectprovider={selectedProvider}- model={selectedModel}+ model={effectiveModelFor(selectedProvider, selectedModel)}value={selectedEffort}onChange={handleEffortChange}disabled={updating}diff --git a/client/src/components/cos/tabs/schedule/PipelineStageConfig.jsx b/client/src/components/cos/tabs/schedule/PipelineStageConfig.jsxindex 1cfb90a299..d707b1a2d3 100644--- a/client/src/components/cos/tabs/schedule/PipelineStageConfig.jsx+++ b/client/src/components/cos/tabs/schedule/PipelineStageConfig.jsx@@ -1,4 +1,4 @@-import { filterSelectableModels } from '../../../../utils/providers';+import { effectiveModelFor, effortAwareModelOptions } from '../../../../utils/providers';import { FormField } from '../../../ui/FormField';import EffortSelect from '../../EffortSelect';import { pipelineStages } from './scheduleConstants';@@ -39,7 +39,11 @@ export default function PipelineStageConfig({ taskType, config, providers, onUpd<div className="space-y-3">{stages.map((stage, i) => {const stageProvider = providers?.find(p => p.id === stage.providerId);- const stageModels = filterSelectableModels(stageProvider?.models);+ // Each stage persists its own effort, so Antigravity lists BASE models+ // with the tier picked beside them. A stage saved before the split+ // keeps its suffixed id as its own option and still runs (the server+ // splits it into `--model` + `--effort`).+ const stageModels = effortAwareModelOptions(stageProvider, stage.model);return (<div key={i} className="bg-port-card border border-port-border rounded-lg p-3"><div className="flex items-center gap-2 mb-3">@@ -84,6 +88,7 @@ export default function PipelineStageConfig({ taskType, config, providers, onUpd</FormField><EffortSelectprovider={stageProvider}+ model={effectiveModelFor(stageProvider, stage.model)}value={stage.effort}onChange={(effort) => handleStageUpdate(i, 'effort', effort || null)}disabled={updating}diff --git a/client/src/components/games/GameFeedback.jsx b/client/src/components/games/GameFeedback.jsxindex 80240bf6c1..92ac19ac2b 100644--- a/client/src/components/games/GameFeedback.jsx+++ b/client/src/components/games/GameFeedback.jsx@@ -1,7 +1,6 @@import { useState } from 'react';import { MessageSquareText, Send } from 'lucide-react';import ProviderModelSelector from '../ProviderModelSelector.jsx';-import EffortSelect from '../cos/EffortSelect.jsx';import useProviderModels from '../../hooks/useProviderModels.js';import { formatDateShort } from '../../utils/formatters.js';@@ -16,8 +15,9 @@ export default function GameFeedback({ history, submitting, onSubmit }) {setSelectedProviderId,setSelectedModel,loading,- } = useProviderModels({ silent: true });- const selectedProvider = providers.find((provider) => provider.id === selectedProviderId);+ // This picker renders the effort control and sends the value, so Antigravity+ // lists base models with the effort picked separately.+ } = useProviderModels({ silent: true, withEffort: true });const promptId = 'game-feedback-prompt';const submit = async (event) => {@@ -48,19 +48,13 @@ export default function GameFeedback({ history, submitting, onSubmit }) {selectedProviderId={selectedProviderId}selectedModel={selectedModel}availableModels={availableModels}- onProviderChange={setSelectedProviderId}+ onProviderChange={(id) => { setSelectedProviderId(id); setEffort(''); }}onModelChange={setSelectedModel}+ effort={effort}+ onEffortChange={setEffort}disabled={loading || submitting}layout="stacked"/>- <EffortSelect- provider={selectedProvider}- value={effort}- onChange={setEffort}- label="Thinking effort"- disabled={submitting}- className="w-full min-h-[44px] rounded-lg border border-port-border bg-port-bg px-3 py-2 text-sm text-white"- /><div><label htmlFor={promptId} className="mb-1 block text-xs text-gray-400">Review request</label><textareadiff --git a/client/src/hooks/useProviderModels.js b/client/src/hooks/useProviderModels.jsindex 459504347d..b08240a470 100644--- a/client/src/hooks/useProviderModels.js+++ b/client/src/hooks/useProviderModels.js@@ -1,6 +1,6 @@import { useState, useEffect, useCallback, useMemo, useRef } from 'react';import * as api from '../services/api';-import { filterSelectableModels, isAntigravityProvider, selectableModelsForProvider, splitAntigravityModel } from '../utils/providers';+import { filterSelectableModels, selectableModelsForProvider, withStaleAntigravityPin } from '../utils/providers';// The provider's selectable model source: its `models` list, or — when that// list is empty (a cloud/manual provider configured with only a defaultModel,@@ -100,22 +100,9 @@ export default function useProviderModels({ filter, allowDefault = false, silent// cloud/manual provider configured with only a defaultModel).const models = filterSelectableModels(sourceModels(currentProvider, withEffort));const filtered = modelFilter ? models.filter((m) => modelFilter(m, currentProvider)) : models;- // Legacy-pin escape hatch: a record saved before Antigravity switched to- // base models still holds `gemini-3.6-flash-high`, which now matches no- // option and would render the select BLANK (reading as "no model"). Keep- // the stored id as its own option so the pin stays visible — the server- // splits it back into base + `--effort`, so it still runs. Same posture as- // EffortSelect's out-of-ladder option.- //- // Deliberately narrow: only an Antigravity id that carries an effort- // SUFFIX qualifies. A bare "not in the list" test would also re-surface- // the configured-default sentinel (the shipped agy `defaultModel`, which- // filterSelectableModels exists to hide) and any typo'd/stale pin.- const staleAntigravityPin = withEffort- && isAntigravityProvider(currentProvider)- && !!splitAntigravityModel(selectedModel).effort- && !filtered.includes(selectedModel);- return staleAntigravityPin ? [...filtered, selectedModel] : filtered;+ // Legacy-pin escape hatch (see `withStaleAntigravityPin`): only relevant+ // once the list has been collapsed to base models, so it rides `withEffort`.+ return withEffort ? withStaleAntigravityPin(currentProvider, filtered, selectedModel) : filtered;},[currentProvider, modelFilter, selectedModel, withEffort]);diff --git a/client/src/hooks/useTaskModelPins.js b/client/src/hooks/useTaskModelPins.jsindex 7a864ea4b7..1ecceeb0c8 100644--- a/client/src/hooks/useTaskModelPins.js+++ b/client/src/hooks/useTaskModelPins.js@@ -1,5 +1,5 @@import { useState, useEffect, useCallback, useMemo } from 'react';-import { filterSelectableModels, mergeModelLists, resolveEffectiveProvider } from '../utils/providers';+import { effortAwareModelOptions, mergeModelLists, resolveEffectiveProvider } from '../utils/providers';/*** Provider / model / effort pins for one CoS scheduled task, shared by the@@ -69,12 +69,17 @@ export function useTaskModelPins({ taskType, config, providers, activeProviderId[providers, pins.providerId, activeProviderId]);- // A pin the provider no longer lists stays selectable, or the select would- // hold a value matching no option, render blank, and read as "Default".+ // Both surfaces that use these pins persist a separate effort, so Antigravity+ // lists BASE models (`gemini-3.6-flash`) with the tier picked beside them —+ // `effortAwareModelOptions` also keeps a legacy suffixed pin selectable, since+ // the server splits it back into `--model` + `--effort` and it still runs.+ // Any OTHER pin the provider no longer lists stays selectable too, or the+ // select would hold a value matching no option, render blank, and read as+ // "Default".const availableModels = useMemo(() => {- const selectable = filterSelectableModels(provider?.models);+ const selectable = effortAwareModelOptions(provider, pins.model);return pins.model ? mergeModelLists([pins.model], selectable) : selectable;- }, [provider?.models, pins.model]);+ }, [provider, pins.model]);return {...pins,diff --git a/client/src/pages/ThreejsModelDetail.jsx b/client/src/pages/ThreejsModelDetail.jsxindex beebc00ddd..217275927e 100644--- a/client/src/pages/ThreejsModelDetail.jsx+++ b/client/src/pages/ThreejsModelDetail.jsx@@ -19,7 +19,7 @@ import {import toast from '../components/ui/Toast';import { copyToClipboard } from '../lib/clipboard';import { timeAgo } from '../utils/formatters';-import { isAntigravityProvider, splitAntigravityModel } from '../utils/providers';+import { seedModelEffort } from '../utils/providers';const providerFilter = (provider) =>provider.enabled !== false && ['api', 'cli', 'tui'].includes(provider.type);@@ -206,16 +206,13 @@ export default function ThreejsModelDetail() {const recordProvider = providers.find((provider) => provider.id === record.providerId);if (recordProvider) {// A record written before Antigravity split model from effort stores the- // suffixed id (`gemini-3.6-flash-high`). Seed the two controls from its- // two halves so the pin reads back as a base model + its effort rather- // than an option that no longer exists. Scoped to Antigravity so another- // provider's model that merely ends in `-high` isn't truncated.- const { base, effort: bakedEffort } = isAntigravityProvider(recordProvider)- ? splitAntigravityModel(record.model || '')- : { base: record.model || '', effort: null };+ // suffixed id (`gemini-3.6-flash-high`); seedModelEffort reads it back as+ // a base model + its effort so the pin isn't an option that no longer+ // exists (and leaves every other provider's id untouched).+ const seeded = seedModelEffort(recordProvider, record.model, record.effort);setSelectedProviderId(record.providerId);- setSelectedModel(base || '');- setEffort(record.effort || bakedEffort || '');+ setSelectedModel(seeded.model);+ setEffort(seeded.effort);}providerSyncRef.current = key;}, [record, providers, setSelectedProviderId, setSelectedModel]);diff --git a/client/src/pages/ThreejsModels.jsx b/client/src/pages/ThreejsModels.jsxindex 7a23bf6184..d091349553 100644--- a/client/src/pages/ThreejsModels.jsx+++ b/client/src/pages/ThreejsModels.jsx@@ -40,6 +40,7 @@ export default function ThreejsModels() {const [prompt, setPrompt] = useState('');const families = useThreejsModelFamilies();const [family, setFamily] = useState(GENERAL_FAMILY_ID);+ const [effort, setEffort] = useState('');const [creating, setCreating] = useState(false);const {providers,@@ -49,7 +50,9 @@ export default function ThreejsModels() {setSelectedProviderId,setSelectedModel,loading: providersLoading,- } = useProviderModels({ filter: providerFilter, silent: true });+ // This picker renders the effort control and sends the value, so Antigravity+ // lists base models with effort picked separately.+ } = useProviderModels({ filter: providerFilter, silent: true, withEffort: true });useEffect(() => {listThreejsModels({ silent: true })@@ -93,6 +96,7 @@ export default function ThreejsModels() {providerId: selectedProviderId,model: selectedModel || undefined,family,+ effort: effort || undefined,}, { silent: true }).catch((error) => {toast.error(error.message || 'Failed to start model generation');return null;@@ -177,8 +181,10 @@ export default function ThreejsModels() {selectedProviderId={selectedProviderId}selectedModel={selectedModel}availableModels={availableModels}- onProviderChange={setSelectedProviderId}+ onProviderChange={(id) => { setSelectedProviderId(id); setEffort(''); }}onModelChange={setSelectedModel}+ effort={effort}+ onEffortChange={setEffort}disabled={providersLoading || creating}alwaysShowModelemptyModelOption="Provider default"diff --git a/client/src/utils/providers.js b/client/src/utils/providers.jsindex 58957aba20..f11ceaa336 100644--- a/client/src/utils/providers.js+++ b/client/src/utils/providers.js@@ -238,6 +238,84 @@ export const antigravityModelEffortLevels = (model, models) => {export const selectableModelsForProvider = (provider, models) =>isAntigravityProvider(provider) ? antigravityBaseModels(models) : (models || []);+/**+ * Keeps a stored-but-no-longer-listed Antigravity id visible as its own option.+ *+ * A record saved before Antigravity split model from effort still holds+ * `gemini-3.6-flash-high`, which matches no base-model option and would render+ * the select BLANK (reading as "no model"). The server splits such an id back+ * into base + `--effort`, so the pin still runs — it just has to stay selectable.+ * Same posture as `EffortSelect`'s out-of-ladder option.+ *+ * Deliberately narrow: only an Antigravity id carrying an effort SUFFIX+ * qualifies. A bare "not in the list" test would also re-surface the+ * configured-default sentinel (the shipped agy `defaultModel`, which+ * `filterSelectableModels` exists to hide) and any typo'd/stale pin.+ *+ * CLIENT-ONLY (no server mirror) — this is a rendering concern.+ * @param {{id?:string, command?:string}|null|undefined} provider+ * @param {unknown[]} models - the already-filtered option list+ * @param {string|null|undefined} selectedModel+ * @returns {unknown[]}+ */+export const withStaleAntigravityPin = (provider, models, selectedModel) => {+ const list = models || [];+ const stale = isAntigravityProvider(provider)+ && !!splitAntigravityModel(selectedModel).effort+ && !list.includes(selectedModel);+ return stale ? [...list, selectedModel] : list;+};++/**+ * The option list for a picker that renders an effort control but reads+ * `provider.models` directly (no `useProviderModels`): base models, sentinels+ * stripped, plus any legacy suffixed pin so the stored value stays visible.+ * The hook's own list is assembled from the same two primitives, so the two+ * paths can't drift.+ *+ * CLIENT-ONLY (no server mirror).+ * @param {{id?:string, command?:string, models?:unknown[]}|null|undefined} provider+ * @param {string|null|undefined} selectedModel+ * @returns {unknown[]}+ */+export const effortAwareModelOptions = (provider, selectedModel) => withStaleAntigravityPin(+ provider,+ filterSelectableModels(selectableModelsForProvider(provider, provider?.models)),+ selectedModel,+);++/**+ * The model a run will ACTUALLY use: the explicit pin, else the provider's own+ * default. A blank model isn't a no-op — the resolver falls through to+ * `defaultModel` — so anything keyed on the model (Antigravity's effort tiers,+ * the local tool-use warning) has to evaluate this, not the raw selection.+ *+ * CLIENT-ONLY (no server mirror).+ * @param {{defaultModel?:string}|null|undefined} provider+ * @param {string|null|undefined} model+ * @returns {string}+ */+export const effectiveModelFor = (provider, model) => model || provider?.defaultModel || '';++/**+ * Seeds a picker's two controls from a record that may predate the split.+ * `{ model: 'gemini-3.6-flash-high', effort: '' }` reads back as+ * `{ model: 'gemini-3.6-flash', effort: 'high' }`; a stored `effort` always+ * wins over the suffix, and a non-Antigravity provider is left alone so a model+ * that merely ends in `-high` isn't truncated.+ *+ * CLIENT-ONLY (no server mirror) — the server reads the suffixed id directly.+ * @param {{id?:string, command?:string}|null|undefined} provider+ * @param {string|null|undefined} model+ * @param {string|null|undefined} effort+ * @returns {{model: string, effort: string}}+ */+export const seedModelEffort = (provider, model, effort) => {+ if (!isAntigravityProvider(provider)) return { model: model || '', effort: effort || '' };+ const { base, effort: bakedEffort } = splitAntigravityModel(model || '');+ return { model: base || '', effort: effort || bakedEffort || '' };+};+/*** The effort levels a provider's CLI accepts, or null when the provider has no* effort control (opencode, grok, kimi, HTTP API providers). Keyed on the launchdiff --git a/client/src/utils/providers.test.js b/client/src/utils/providers.test.jsindex 0c1ac2374d..85fea499f8 100644--- a/client/src/utils/providers.test.js+++ b/client/src/utils/providers.test.js@@ -50,6 +50,10 @@ import {antigravityBaseModels,antigravityModelEffortLevels,selectableModelsForProvider,+ withStaleAntigravityPin,+ effortAwareModelOptions,+ effectiveModelFor,+ seedModelEffort,} from './providers.js';import { PROVIDER_TYPES as SERVER_PROVIDER_TYPES } from '../../../server/lib/aiToolkit/constants.js';import {@@ -177,6 +181,88 @@ describe('Antigravity base-model split (server mirror)', () => {expect(selectableModelsForProvider({ id: 'codex', command: 'codex' }, CATALOG)).toEqual(CATALOG);expect(selectableModelsForProvider(null, CATALOG)).toEqual(CATALOG);});++ // The pickers that carry their own effort control (CoS tasks/schedules/jobs,+ // the Three.js generator, the /do:* drawer) collapse the list to base models,+ // so a record saved before the split holds an id the list no longer contains.+ describe('withStaleAntigravityPin', () => {+ const agy = { id: 'antigravity-cli', command: 'agy' };++ it('re-adds a stored suffixed id that the base list dropped', () => {+ expect(withStaleAntigravityPin(agy, BASES, 'gemini-3.6-flash-high'))+ .toEqual([...BASES, 'gemini-3.6-flash-high']);+ });++ it('leaves an id the list already offers alone', () => {+ expect(withStaleAntigravityPin(agy, BASES, 'gemini-3.6-flash')).toEqual(BASES);+ });++ it('never re-surfaces the configured-default sentinel or an unsuffixed stale pin', () => {+ // filterSelectableModels exists to hide the sentinel; a typo'd pin is not+ // a legacy tier, so neither qualifies for the escape hatch.+ expect(withStaleAntigravityPin(agy, ['gemini-3.6-flash'], ANTIGRAVITY_CONFIGURED_DEFAULT))+ .toEqual(['gemini-3.6-flash']);+ expect(withStaleAntigravityPin(agy, ['gemini-3.6-flash'], 'gemini-9-typo'))+ .toEqual(['gemini-3.6-flash']);+ });++ it('is a no-op for a non-Antigravity provider whose model merely ends in -high', () => {+ const codex = { id: 'codex', command: 'codex' };+ expect(withStaleAntigravityPin(codex, ['gpt-5'], 'some-model-high')).toEqual(['gpt-5']);+ });+ });++ describe('effortAwareModelOptions', () => {+ it('collapses to base models, strips the sentinel, and pins a legacy id', () => {+ const agy = { id: 'antigravity-cli', command: 'agy', models: CATALOG };+ expect(effortAwareModelOptions(agy, 'gemini-3.6-flash-high')).toEqual([+ 'gemini-3.6-flash', 'gemini-3.1-pro',+ 'claude-sonnet-4-6', 'claude-opus-4-6-thinking', 'gpt-oss-120b',+ 'gemini-3.6-flash-high',+ ]);+ });++ it('passes a non-Antigravity catalog through untouched', () => {+ const codex = { id: 'codex', command: 'codex', models: ['gpt-5', 'gpt-5-mini'] };+ expect(effortAwareModelOptions(codex, 'gpt-5')).toEqual(['gpt-5', 'gpt-5-mini']);+ expect(effortAwareModelOptions(null, '')).toEqual([]);+ });+ });++ describe('effectiveModelFor', () => {+ it('falls back to the provider default when no model is pinned', () => {+ expect(effectiveModelFor({ defaultModel: 'gemini-3.6-flash' }, '')).toBe('gemini-3.6-flash');+ expect(effectiveModelFor({ defaultModel: 'gemini-3.6-flash' }, 'gemini-3.1-pro')).toBe('gemini-3.1-pro');+ expect(effectiveModelFor(null, null)).toBe('');+ });+ });++ describe('seedModelEffort', () => {+ const agy = { id: 'antigravity-cli', command: 'agy' };++ it('reads a legacy suffixed id back as base + its baked tier', () => {+ expect(seedModelEffort(agy, 'gemini-3.6-flash-high', '')).toEqual({+ model: 'gemini-3.6-flash', effort: 'high',+ });+ });++ it('lets an explicitly stored effort win over the baked suffix', () => {+ expect(seedModelEffort(agy, 'gemini-3.6-flash-high', 'low')).toEqual({+ model: 'gemini-3.6-flash', effort: 'low',+ });+ });++ it('leaves another provider alone even when its model ends in -high', () => {+ const codex = { id: 'codex', command: 'codex' };+ expect(seedModelEffort(codex, 'some-model-high', '')).toEqual({+ model: 'some-model-high', effort: '',+ });+ });++ it('normalizes nullish input to empty strings', () => {+ expect(seedModelEffort(agy, null, null)).toEqual({ model: '', effort: '' });+ });+ });});// Regression guard for the provider-edit form: an Antigravity provider publishesdiff --git a/server/services/agentLifecycle.js b/server/services/agentLifecycle.jsindex 77c132c36d..e26f663847 100644--- a/server/services/agentLifecycle.js+++ b/server/services/agentLifecycle.js@@ -445,6 +445,11 @@ async function runAgentSpawn(task) {providerCommand: provider.command || null,leanMode,model: selectedModel,+ // The reasoning-effort override this run was dispatched with (null when the+ // task pinned none). Persisted next to the model because the Resume Agent+ // modal seeds its own effort select from here — without it a resume of an+ // effort-pinned run silently drops back to the provider default.+ effort: task.metadata?.effort || null,modelTier: modelSelection.tier,modelReason: modelSelection.reason,runId,