Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(tasks): give the model pickers one retirement list (#105775)

Vojta Bartoš2e4bd799d282
diff --git a/frontend/src/scenes/settings/environment/TaskAgentDefaultsSettings.tsx b/frontend/src/scenes/settings/environment/TaskAgentDefaultsSettings.tsx
index 922c2914514b..c090e84c829c 100644
--- a/frontend/src/scenes/settings/environment/TaskAgentDefaultsSettings.tsx
+++ b/frontend/src/scenes/settings/environment/TaskAgentDefaultsSettings.tsx
@@ -19,6 +19,7 @@ import {
getModelLabel,
listRuntimeAdapters,
modelsForRuntimeAdapter,
+ pickerModels,
} from 'products/posthog_ai/frontend/utils/composerModels'
import { TaskRuntimeEnumApi } from 'products/tasks/frontend/generated/api.schemas'
@@ -50,13 +51,14 @@ function PreferenceEditor({
}): JSX.Element {
const { catalogue } = useValues(modelCatalogueLogic)
- // Grouped by harness off the same catalogue the composer renders, so a model you can pick for a
- // run is always settable as a default and vice versa — including the Codex models that only
- // Slack and PostHog Desktop drive today.
+ // Grouped by harness off the same list the composer offers, so a model you can pick for a run is
+ // always settable as a default and vice versa — including the Codex models that only Slack and
+ // PostHog Desktop drive today, and the retired one this level is already set to.
+ const offeredModels = useMemo(() => pickerModels(catalogue, draft.model), [catalogue, draft.model])
const modelOptions = useMemo(() => {
- const groups = listRuntimeAdapters(catalogue).map((adapter) => ({
+ const groups = listRuntimeAdapters(offeredModels).map((adapter) => ({
title: getHarnessLabel(adapter),
- options: modelsForRuntimeAdapter(catalogue, adapter).map((choice) => ({
+ options: modelsForRuntimeAdapter(offeredModels, adapter).map((choice) => ({
value: choice.model,
label: choice.display_name,
// Menu only: cost is what you compare models on while choosing, and says
@@ -76,7 +78,7 @@ function PreferenceEditor({
return [...groups.slice(0, -1), { ...last, footer: <ModelCostFooter /> }]
}
return groups
- }, [catalogue])
+ }, [offeredModels])
const effortOptions = useMemo(() => getEffortsForModel(catalogue, draft.model), [catalogue, draft.model])
const editingDisabled = restrictionReason ?? (saving ? 'Saving…' : undefined)
diff --git a/products/desktop/packages/agent/src/agent.ts b/products/desktop/packages/agent/src/agent.ts
index 3cc4460a0e8a..f348ce55196b 100644
--- a/products/desktop/packages/agent/src/agent.ts
+++ b/products/desktop/packages/agent/src/agent.ts
@@ -4,6 +4,7 @@ import {
mergePrUrls,
readPrUrls,
} from "@posthog/shared";
+import { isRetiredModel } from "@posthog/shared/model-catalog";
import {
buildPosthogPropertyHeaderLines,
buildPosthogPropertyHeaderRecord,
@@ -20,7 +21,6 @@ import {
DEFAULT_CODEX_MODEL,
DEFAULT_GATEWAY_MODEL,
fetchModelsList,
- isBlockedModelId,
type ModelInfo,
} from "./gateway-models";
import { PostHogAPIClient, type TaskRunUpdate } from "./posthog-api";
@@ -154,7 +154,7 @@ export class Agent {
let codexModels: ModelInfo[] | undefined;
let sanitizedModel =
- options.model && !isBlockedModelId(options.model)
+ options.model && !isRetiredModel(options.model)
? options.model
: undefined;
if (codexSubscription) {
@@ -172,7 +172,6 @@ export class Agent {
projectId: this.posthogApiConfig?.projectId,
});
const gatewayCodexModels = models.filter((model) => {
- if (isBlockedModelId(model.id)) return false;
if (model.owned_by) {
return model.owned_by === "openai";
}
diff --git a/products/desktop/packages/agent/src/gateway-models.ts b/products/desktop/packages/agent/src/gateway-models.ts
index ca4357e192d5..4d3e9a41064f 100644
--- a/products/desktop/packages/agent/src/gateway-models.ts
+++ b/products/desktop/packages/agent/src/gateway-models.ts
@@ -6,7 +6,6 @@ import { buildPosthogProjectHeaderRecord } from "@posthog/shared/posthog-propert
export {
adapterForModelId,
- BLOCKED_GATEWAY_MODEL_IDS,
buildCloudTaskConfigOptions,
buildProviderModelGroups,
type CloudTaskConfigOption,
@@ -22,12 +21,12 @@ export {
getProviderName,
isAnthropicModel,
isBasetenModel,
- isBlockedModelId,
isCloudflareModel,
isCloudflareModelId,
isDeepseekModelId,
isModalModel,
isModalModelId,
+ isOfferedModel,
isOpenAIModel,
pickAllowedModel,
} from "@posthog/shared";
diff --git a/products/desktop/packages/harness/src/extensions/posthog-provider/model-catalog.test.ts b/products/desktop/packages/harness/src/extensions/posthog-provider/model-catalog.test.ts
index ecc60aad14e3..f51a6e163655 100644
--- a/products/desktop/packages/harness/src/extensions/posthog-provider/model-catalog.test.ts
+++ b/products/desktop/packages/harness/src/extensions/posthog-provider/model-catalog.test.ts
@@ -39,16 +39,13 @@ describe("resolvePosthogPiModelCatalog", () => {
"us",
);
+ // Haiku is served here but absent from the catalog, so the picker does not offer it.
expect(models).toEqual([
expect.objectContaining({
provider: "posthog",
id: "claude-opus-5",
thinkingLevels: expect.arrayContaining(["off", "high", "xhigh"]),
}),
- expect.objectContaining({
- provider: "posthog",
- id: "claude-haiku-4-5",
- }),
]);
});
@@ -83,7 +80,7 @@ describe("resolvePosthogPiModelCatalog", () => {
const models = resolvePosthogPiModelCatalog(
[
{
- id: "claude-haiku-4-5",
+ id: "claude-sonnet-5",
context_window: 200_000,
supports_vision: true,
allowed: true,
@@ -99,7 +96,7 @@ describe("resolvePosthogPiModelCatalog", () => {
);
expect(models.map((model) => model.id)).toEqual([
- "claude-haiku-4-5",
+ "claude-sonnet-5",
DEFAULT_PI_MODEL_ID,
]);
expect(models.find((model) => model.isDefault)?.id).toBe(
@@ -108,7 +105,6 @@ describe("resolvePosthogPiModelCatalog", () => {
});
it.each([
- ["claude-haiku-4-5", "Claude Haiku 4.5"],
["claude-sonnet-5", "Claude Sonnet 5"],
["claude-fable-5", "Claude Fable 5"],
["claude-opus-5", "Claude Opus 5"],
@@ -135,7 +131,7 @@ describe("resolvePosthogPiModelCatalog", () => {
expect(models).toEqual([expect.objectContaining({ id, name })]);
});
- it("keeps unknown Pi models in the catalog", () => {
+ it("leaves a model the catalog does not list out of the picker", () => {
const models = resolvePosthogPiModelCatalog(
[
{
@@ -148,42 +144,50 @@ describe("resolvePosthogPiModelCatalog", () => {
"us",
);
- expect(models).toEqual([
- expect.objectContaining({ id: "new-model", name: "New Model" }),
- ]);
- });
-
- it.each([
- "claude-sonnet-4-5",
- "claude-sonnet-4-6",
- "claude-sonnet-4-7",
- "claude-sonnet-4-8",
- "claude-opus-4-5",
- "claude-opus-4-6",
- "claude-opus-4-7",
- "claude-opus-4-8",
- "gpt-5.2",
- "gpt-5.3-codex",
- "gpt-5.4",
- "gpt-5.5",
- "gpt-5-mini",
- "@cf/zai-org/glm-5.2",
- ])("excludes %s from the Pi catalog", (id) => {
- const models = resolvePosthogPiModelCatalog(
- [
- {
- id,
- context_window: 200_000,
- supports_vision: true,
- allowed: true,
- },
- ],
- "us",
- );
-
expect(models).toEqual([]);
});
+ // One retired model and one the catalog never listed. `isOfferedModel` owns the full table,
+ // in packages/shared/src/model-catalog.test.ts; these two prove the filter is wired up here.
+ it.each(["claude-opus-4-7", "gpt-5.4"])(
+ "excludes %s from the Pi catalog",
+ (id) => {
+ const models = resolvePosthogPiModelCatalog(
+ [
+ {
+ id,
+ context_window: 200_000,
+ supports_vision: true,
+ allowed: true,
+ },
+ ],
+ "us",
+ );
+
+ expect(models).toEqual([]);
+ },
+ );
+
+ // Pi hid both while the two hide lists disagreed; every other picker offered them throughout.
+ it.each(["claude-opus-4-8", "gpt-5.5"])(
+ "offers %s in the Pi catalog",
+ (id) => {
+ const models = resolvePosthogPiModelCatalog(
+ [
+ {
+ id,
+ context_window: 200_000,
+ supports_vision: true,
+ allowed: true,
+ },
+ ],
+ "us",
+ );
+
+ expect(models).toEqual([expect.objectContaining({ id })]);
+ },
+ );
+
it("uses fallback models without fetching while offline", async () => {
process.env.PI_OFFLINE = "1";
const fetch = vi.fn();
diff --git a/products/desktop/packages/harness/src/extensions/posthog-provider/model-catalog.ts b/products/desktop/packages/harness/src/extensions/posthog-provider/model-catalog.ts
index 3a1d9e8b7a7a..5fe3e60e53ea 100644
--- a/products/desktop/packages/harness/src/extensions/posthog-provider/model-catalog.ts
+++ b/products/desktop/packages/harness/src/extensions/posthog-provider/model-catalog.ts
@@ -3,12 +3,8 @@ import {
type ModelThinkingLevel,
} from "@earendil-works/pi-ai";
import type { ModelInfo } from "@earendil-works/pi-coding-agent";
-import {
- type CloudRegion,
- formatGatewayModelName,
- isHiddenPiModelId,
-} from "@posthog/shared";
-import { labelForModel } from "@posthog/shared/model-catalog";
+import { type CloudRegion, formatGatewayModelName } from "@posthog/shared";
+import { isOfferedModel, labelForModel } from "@posthog/shared/model-catalog";
import {
fetchPosthogGatewayModels,
type GatewayModel,
@@ -46,7 +42,7 @@ export function resolvePosthogPiModelCatalog(
region: CloudRegion,
): PiModelCatalogEntry[] {
return resolveModelConfigsFromGatewayModels(gatewayModels, region)
- .filter((model) => !isHiddenPiModelId(model.id))
+ .filter((model) => isOfferedModel(model.id))
.map((model) => ({
provider: "posthog",
id: model.id,
diff --git a/products/desktop/packages/shared/src/cloud-task-models.test.ts b/products/desktop/packages/shared/src/cloud-task-models.test.ts
index 3c58416991bf..318f2126ade4 100644
--- a/products/desktop/packages/shared/src/cloud-task-models.test.ts
+++ b/products/desktop/packages/shared/src/cloud-task-models.test.ts
@@ -10,7 +10,6 @@ import {
getCloudTaskGatewayUrl,
isAnthropicModel,
isBasetenModel,
- isBlockedModelId,
isCloudflareModel,
isDeepseekModelId,
isModalModel,
@@ -74,25 +73,6 @@ describe("normalizeGatewayModelsResponse", () => {
});
});
-describe("isBlockedModelId", () => {
- it.each([
- "claude-opus-4-5",
- "claude-opus-4-6",
- "claude-opus-4-7",
- "claude-sonnet-4-5",
- "claude-sonnet-4-6",
- "ANTHROPIC/CLAUDE-HAIKU-4-5",
- "gpt-5.2",
- "gpt-5.3",
- "gpt-5.3-codex",
- "OPENAI/GPT-5.3-CODEX",
- "gpt-5.4",
- "@cf/zai-org/glm-5.2",
- ])("blocks %s", (modelId) => {
- expect(isBlockedModelId(modelId)).toBe(true);
- });
-});
-
describe("getClaudeModelRecency", () => {
it.each([
["claude-haiku-4-5", 4005],
diff --git a/products/desktop/packages/shared/src/cloud-task-models.ts b/products/desktop/packages/shared/src/cloud-task-models.ts
index ad6fb1f4be4f..8875e4d70554 100644
--- a/products/desktop/packages/shared/src/cloud-task-models.ts
+++ b/products/desktop/packages/shared/src/cloud-task-models.ts
@@ -1,7 +1,7 @@
import type { Adapter } from "./adapter";
import { getCustomCloud, isCustomCloudHost } from "./custom-cloud";
import { CODEX_MODE_PRESETS } from "./execution-modes";
-import { labelForModel } from "./model-catalog";
+import { isOfferedModel, labelForModel } from "./model-catalog";
import {
customModelMeta,
modelHarnessMeta,
@@ -57,34 +57,6 @@ export const DEFAULT_GATEWAY_MODEL = "claude-opus-5-5";
export const DEFAULT_CODEX_MODEL = "gpt-6-sol";
-export const BLOCKED_GATEWAY_MODEL_IDS = [
- "gpt-5-mini",
- "openai/gpt-5-mini",
- "gpt-5.2",
- "openai/gpt-5.2",
- "gpt-5.3",
- "openai/gpt-5.3",
- "gpt-5.3-codex",
- "openai/gpt-5.3-codex",
- "gpt-5.4",
- "openai/gpt-5.4",
- "claude-opus-4-5",
- "anthropic/claude-opus-4-5",
- "claude-opus-4-6",
- "anthropic/claude-opus-4-6",
- "claude-opus-4-7",
- "anthropic/claude-opus-4-7",
- "claude-sonnet-4-5",
- "anthropic/claude-sonnet-4-5",
- "claude-sonnet-4-6",
- "anthropic/claude-sonnet-4-6",
- "claude-haiku-4-5",
- "anthropic/claude-haiku-4-5",
- "@cf/zai-org/glm-5.2",
-] as const;
-
-const BLOCKED_GATEWAY_MODELS = new Set<string>(BLOCKED_GATEWAY_MODEL_IDS);
-
const CLAUDE_MODE_PRESETS: readonly CloudTaskModePreset[] = [
{
id: "default",
@@ -160,7 +132,7 @@ export function normalizeGatewayModelsResponse(value: unknown): GatewayModel[] {
return entries
.filter(isGatewayModel)
- .filter((model) => !isBlockedModelId(model.id))
+ .filter((model) => isOfferedModel(model.id))
.map((model) => ({
id: model.id,
owned_by: model.owned_by ?? "",
@@ -172,10 +144,6 @@ export function normalizeGatewayModelsResponse(value: unknown): GatewayModel[] {
}));
}
-export function isBlockedModelId(modelId: string): boolean {
- return BLOCKED_GATEWAY_MODELS.has(modelId.toLowerCase());
-}
-
export function isAnthropicModel(model: GatewayModel): boolean {
if (model.owned_by) {
return model.owned_by === "anthropic";
diff --git a/products/desktop/packages/shared/src/index.ts b/products/desktop/packages/shared/src/index.ts
index cc1a582b8a30..3c4bc617ea5b 100644
--- a/products/desktop/packages/shared/src/index.ts
+++ b/products/desktop/packages/shared/src/index.ts
@@ -75,7 +75,6 @@ export {
} from "./cloud-prompt";
export {
adapterForModelId,
- BLOCKED_GATEWAY_MODEL_IDS,
buildCloudTaskConfigOptions,
buildProviderModelGroups,
type CloudTaskConfigOption,
@@ -93,7 +92,6 @@ export {
isAnthropicModel,
isAnthropicModelId,
isBasetenModel,
- isBlockedModelId,
isCloudflareModel,
isCloudflareModelId,
isDeepseekModelId,
@@ -233,14 +231,18 @@ export {
formatMention,
splitMentionSegments,
} from "./mentions";
-export { supports1MContext, supportsFastMode } from "./model-catalog";
+export {
+ isOfferedModel,
+ isRetiredModel,
+ supports1MContext,
+ supportsFastMode,
+} from "./model-catalog";
export {
customModelMeta,
DEFAULT_OPTION_META_KEY,
defaultEligibleModel,
isCustomModelOption,
isDefaultSelectOption,
- isHiddenPiModelId,
isRestrictedModelOption,
modelHarnessMeta,
OPTION_DOCS_URL_META_KEY,
diff --git a/products/desktop/packages/shared/src/model-catalog.generated.ts b/products/desktop/packages/shared/src/model-catalog.generated.ts
index 99086e89bcd1..577b03a52c43 100644
--- a/products/desktop/packages/shared/src/model-catalog.generated.ts
+++ b/products/desktop/packages/shared/src/model-catalog.generated.ts
@@ -105,6 +105,9 @@ export interface CatalogModel {
/** Runs in fast mode. Absent means it does not, and a picker offers no
fast-mode toggle. */
supportsFastMode?: boolean;
+ /** Superseded: no picker offers it, and a session already pinned to it
+ still runs and still reads its name and cost from here. */
+ retired?: boolean;
}
/** The model `1×` refers to. */
@@ -132,6 +135,7 @@ export const MODELS: readonly CatalogModel[] = [
},
costMultiplier: "≈0.57×",
costSummary: "Input $1.40 · Output $4.40 per 1M tokens",
+ retired: true,
},
{
id: "zai-org/glm-5.3",
@@ -192,6 +196,7 @@ export const MODELS: readonly CatalogModel[] = [
},
costMultiplier: "2.5×",
costSummary: "Input $5 · Output $25 per 1M tokens",
+ retired: true,
},
{
id: "claude-opus-4-6",
@@ -204,6 +209,7 @@ export const MODELS: readonly CatalogModel[] = [
},
costMultiplier: "2.5×",
costSummary: "Input $5 · Output $25 per 1M tokens",
+ retired: true,
},
{
id: "claude-opus-4-7",
@@ -218,6 +224,7 @@ export const MODELS: readonly CatalogModel[] = [
costSummary: "Input $5 · Output $25 per 1M tokens",
supports1MContext: true,
supportsFastMode: true,
+ retired: true,
},
{
id: "claude-opus-4-8",
@@ -312,6 +319,7 @@ export const MODELS: readonly CatalogModel[] = [
costMultiplier: "1.5×",
costSummary: "Input $3 · Output $15 per 1M tokens",
supports1MContext: true,
+ retired: true,
},
{
id: "gpt-5",
diff --git a/products/desktop/packages/shared/src/model-catalog.test.ts b/products/desktop/packages/shared/src/model-catalog.test.ts
new file mode 100644
index 000000000000..cfe9bd1e5061
--- /dev/null
+++ b/products/desktop/packages/shared/src/model-catalog.test.ts
@@ -0,0 +1,53 @@
+import { describe, expect, it } from "vitest";
+import { isOfferedModel, isRetiredModel } from "./model-catalog";
+
+describe("isOfferedModel", () => {
+ it.each([
+ "claude-opus-4-5",
+ "claude-opus-4-6",
+ "claude-opus-4-7",
+ "claude-sonnet-4-6",
+ "@cf/zai-org/glm-5.2",
+ "claude-sonnet-4-5",
+ "ANTHROPIC/CLAUDE-HAIKU-4-5",
+ "gpt-5.2",
+ "gpt-5.3",
+ "gpt-5.3-codex",
+ "OPENAI/GPT-5.3-CODEX",
+ "gpt-5.4",
+ "gpt-5-mini",
+ ])("does not offer %s", (modelId) => {
+ expect(isOfferedModel(modelId)).toBe(false);
+ });
+
+ it.each([
+ "claude-opus-4-8",
+ "claude-opus-5-5",
+ "claude-sonnet-5",
+ "anthropic/claude-opus-5-5",
+ "zai-org/glm-5.3",
+ "gpt-5.5",
+ "gpt-6-sol",
+ "OPENAI/GPT-6-SOL",
+ ])("offers %s", (modelId) => {
+ expect(isOfferedModel(modelId)).toBe(true);
+ });
+});
+
+describe("isRetiredModel", () => {
+ it.each(["claude-opus-4-7", "claude-sonnet-4-6", "@cf/zai-org/glm-5.2"])(
+ "retires %s",
+ (modelId) => {
+ expect(isRetiredModel(modelId)).toBe(true);
+ },
+ );
+
+ // A run may use an id the catalog never listed, so only a retired one is ruled out:
+ // `gpt-5.5-codex` is a vendor variant a person's own OpenAI subscription drives.
+ it.each(["gpt-5.5-codex", "claude-haiku-4-5", "claude-opus-5-5"])(
+ "does not retire %s",
+ (modelId) => {
+ expect(isRetiredModel(modelId)).toBe(false);
+ },
+ );
+});
diff --git a/products/desktop/packages/shared/src/model-catalog.ts b/products/desktop/packages/shared/src/model-catalog.ts
index 25931ae66593..eb9c42e653fc 100644
--- a/products/desktop/packages/shared/src/model-catalog.ts
+++ b/products/desktop/packages/shared/src/model-catalog.ts
@@ -117,6 +117,26 @@ export function labelForModel(modelId: string): string | undefined {
return catalogModelFor(modelId)?.label;
}
+/**
+ * Whether a picker may offer this model. A model the catalog omits is not offered however
+ * the gateway answers, and a retired one stays listed only so a pinned session keeps
+ * running under a name and a price.
+ */
+export function isOfferedModel(modelId: string): boolean {
+ const model = catalogModelFor(modelId);
+ return model !== undefined && !model.retired;
+}
+
+/**
+ * Whether the catalog has retired this model. Narrower than the inverse of `isOfferedModel`:
+ * an id the catalog never lists is not retired, because a runtime can still drive one — a
+ * person's own OpenAI subscription runs vendor variants such as `gpt-5.5-codex` that the
+ * gateway never serves. Ask this about the model a run uses, `isOfferedModel` about a picker.
+ */
+export function isRetiredModel(modelId: string): boolean {
+ return catalogModelFor(modelId)?.retired === true;
+}
+
export function supports1MContext(modelId: string): boolean {
return catalogModelFor(modelId)?.supports1MContext ?? false;
}
diff --git a/products/desktop/packages/shared/src/models.ts b/products/desktop/packages/shared/src/models.ts
index 1f1d047dbd8b..b36f59bde329 100644
--- a/products/desktop/packages/shared/src/models.ts
+++ b/products/desktop/packages/shared/src/models.ts
@@ -88,30 +88,3 @@ export function selectOptionHarness(
const harness = meta?.[MODEL_HARNESS_META_KEY];
return harness === "claude" || harness === "codex" ? harness : undefined;
}
-
-/**
- * Gateway models the Pi harness can still run, but that no picker offers:
- * retired or superseded ids. The provider keeps them runnable so a session
- * pinned to one still starts, which means every list a person picks from must
- * filter them out here.
- */
-const HIDDEN_PI_MODEL_IDS = new Set([
- "claude-sonnet-4-5",
- "claude-sonnet-4-6",
- "claude-sonnet-4-7",
- "claude-sonnet-4-8",
- "claude-opus-4-5",
- "claude-opus-4-6",
- "claude-opus-4-7",
- "claude-opus-4-8",
- "gpt-5.2",
- "gpt-5.3-codex",
- "gpt-5.4",
- "gpt-5.5",
- "gpt-5-mini",
- "@cf/zai-org/glm-5.2",
-]);
-
-export function isHiddenPiModelId(modelId: string): boolean {
- return HIDDEN_PI_MODEL_IDS.has(modelId);
-}
diff --git a/products/desktop/packages/ui/src/features/pi-sessions/PiSessionModelControls.tsx b/products/desktop/packages/ui/src/features/pi-sessions/PiSessionModelControls.tsx
index 17c056745c49..86939764be4f 100644
--- a/products/desktop/packages/ui/src/features/pi-sessions/PiSessionModelControls.tsx
+++ b/products/desktop/packages/ui/src/features/pi-sessions/PiSessionModelControls.tsx
@@ -5,8 +5,8 @@ import type {
} from "@posthog/core/pi-runtime/piSessionController";
import type { PiControllerSessionState } from "@posthog/core/pi-runtime/piSessionStore";
import { Skeleton } from "@posthog/quill";
-import { isHiddenPiModelId } from "@posthog/shared";
import { isTerminalStatus } from "@posthog/shared/domain-types";
+import { isOfferedModel } from "@posthog/shared/model-catalog";
import { useCallback } from "react";
import { PiModelSelector } from "./PiSessionControls";
import {
@@ -54,8 +54,7 @@ export function PiSessionModelControls({
const models = hasCatalog
? catalog
: session.models.filter(
- (model) =>
- !isHiddenPiModelId(model.id) || model.id === currentModel?.id,
+ (model) => isOfferedModel(model.id) || model.id === currentModel?.id,
);
const modelsLoaded = !catalogLoading && (hasCatalog || session.modelsLoaded);
const catalogModel = catalog.find(
diff --git a/products/desktop/packages/workspace-server/src/services/agent/agent.test.ts b/products/desktop/packages/workspace-server/src/services/agent/agent.test.ts
index 8f98c837cc89..7c54dac7f8d2 100644
--- a/products/desktop/packages/workspace-server/src/services/agent/agent.test.ts
+++ b/products/desktop/packages/workspace-server/src/services/agent/agent.test.ts
@@ -145,9 +145,9 @@ vi.mock("@posthog/agent/gateway-models", () => ({
getClaudeModelRecency: vi.fn(() => 0),
getProviderName: vi.fn(),
isAnthropicModel: vi.fn((model) => model.owned_by === "anthropic"),
- isBlockedModelId: vi.fn().mockReturnValue(false),
isCloudflareModel: vi.fn((model) => model.owned_by === "cloudflare"),
isModalModel: vi.fn((model) => model.owned_by === "modal"),
+ isOfferedModel: vi.fn().mockReturnValue(true),
isOpenAIModel: vi.fn((model) => model.owned_by === "openai"),
pickAllowedModel: vi.fn((_models, preferredModelId) => preferredModelId),
}));
diff --git a/products/posthog_ai/frontend/logics/modelCatalogueLogic.test.ts b/products/posthog_ai/frontend/logics/modelCatalogueLogic.test.ts
index c2a87557b6de..46d74118e743 100644
--- a/products/posthog_ai/frontend/logics/modelCatalogueLogic.test.ts
+++ b/products/posthog_ai/frontend/logics/modelCatalogueLogic.test.ts
@@ -99,6 +99,19 @@ describe('modelCatalogueLogic', () => {
expect(logic.values.catalogue.map((choice) => choice.model)).toContain(model)
})
+ // A run already on a retired model keeps its name and its full effort range, which it reads off the
+ // catalogue. `pickerModels` is what drops retired models from the list a person picks from.
+ it('keeps a retired model in the catalogue', () => {
+ const retired = MODELS.filter((model) => model.retired)
+ expect(retired.length).toBeGreaterThan(0)
+ mountWithFlags(GATED.map((model) => model.accessFlag as string))
+
+ const known = logic.values.catalogue.map((choice) => choice.model)
+ for (const model of retired) {
+ expect(known).toContain(model.id)
+ }
+ })
+
// An empty effort list is an answer, not missing metadata: the picker renders such a model with no
// effort dropdown, and a run must not send an effort for it. Filling the gap with a default would
// offer efforts the backend rejects.
diff --git a/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskComposer.tsx b/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskComposer.tsx
index ce677967cd20..55174f1ba248 100644
--- a/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskComposer.tsx
+++ b/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskComposer.tsx
@@ -1,6 +1,6 @@
import { useActions, useMountedLogic, useValues } from 'kea'
import { router } from 'kea-router'
-import { useRef } from 'react'
+import { useMemo, useRef } from 'react'
import { AIConsentPopoverWrapper } from 'scenes/settings/organization/AIConsentPopoverWrapper'
import { urls } from 'scenes/urls'
@@ -14,7 +14,11 @@ import {
} from 'products/posthog_ai/frontend/api/primitives'
import { modelCatalogueLogic } from 'products/posthog_ai/frontend/logics/modelCatalogueLogic'
import { taskRunDefaultsLogic } from 'products/posthog_ai/frontend/logics/taskRunDefaultsLogic'
-import { getRuntimeAdapterForModel, resolveEffortForModel } from 'products/posthog_ai/frontend/utils/composerModels'
+import {
+ getRuntimeAdapterForModel,
+ pickerModels,
+ resolveEffortForModel,
+} from 'products/posthog_ai/frontend/utils/composerModels'
import {
cycleMode,
getModesForRuntimeAdapter,
@@ -49,6 +53,7 @@ export function TaskComposer(): JSX.Element {
composerAdapter,
} = useValues(taskTrackerSceneLogic)
const { catalogue } = useValues(modelCatalogueLogic)
+ const offeredModels = useMemo(() => pickerModels(catalogue, displayModel), [catalogue, displayModel])
const { myConfigLoading } = useValues(taskRunDefaultsLogic)
// The bound instance's key — 'scene' on `/ai` and `/tasks`, the panel key when embedded. The onboarding
@@ -123,7 +128,7 @@ export function TaskComposer(): JSX.Element {
onModeChange={(permissionMode) => setNewTaskData({ permissionMode })}
/>
<ComposerModelEffortPickers
- models={catalogue}
+ models={offeredModels}
selectedModel={displayModel}
defaultModel={defaultModel}
isDefaultModelLoading={myConfigLoading}
diff --git a/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunComposer.tsx b/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunComposer.tsx
index 6845edb7fbd8..2cbc53522632 100644
--- a/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunComposer.tsx
+++ b/products/posthog_ai/frontend/scenes/TaskTracker/components/TaskRunComposer.tsx
@@ -1,6 +1,6 @@
import { useActions, useValues } from 'kea'
import { router } from 'kea-router'
-import { type MutableRefObject, type RefObject, useEffect } from 'react'
+import { type MutableRefObject, type RefObject, useEffect, useMemo } from 'react'
import { projectLogic } from 'scenes/projectLogic'
import { AIConsentPopoverWrapper } from 'scenes/settings/organization/AIConsentPopoverWrapper'
@@ -11,7 +11,7 @@ import { runInteractionLogic, type RunInteractionLogicProps } from 'products/pos
import { Composer, QueuedMessageList } from 'products/posthog_ai/frontend/api/primitives'
import { modelCatalogueLogic } from 'products/posthog_ai/frontend/logics/modelCatalogueLogic'
import { taskRunDefaultsLogic } from 'products/posthog_ai/frontend/logics/taskRunDefaultsLogic'
-import { getRuntimeAdapterForModel } from 'products/posthog_ai/frontend/utils/composerModels'
+import { getRuntimeAdapterForModel, pickerModels } from 'products/posthog_ai/frontend/utils/composerModels'
import { cycleMode, getModesForRuntimeAdapter } from 'products/posthog_ai/frontend/utils/composerModes'
import { AttachedContextBar } from '../../../components/composer/AttachedContextBar'
@@ -50,6 +50,7 @@ export function TaskRunComposer({
cancellationState,
} = useValues(runInteractionLogic(logicProps))
const { catalogue } = useValues(modelCatalogueLogic)
+ const offeredModels = useMemo(() => pickerModels(catalogue, selectedModel), [catalogue, selectedModel])
const { user } = useValues(userLogic)
const { currentProjectId } = useValues(projectLogic)
const { myConfigLoading } = useValues(taskRunDefaultsLogic)
@@ -149,7 +150,7 @@ export function TaskRunComposer({
modes={getModesForRuntimeAdapter(composerAdapter)}
/>
<ComposerModelEffortPickers
- models={catalogue}
+ models={offeredModels}
selectedModel={selectedModel}
defaultModel={defaultModel}
isDefaultModelLoading={myConfigLoading}
diff --git a/products/posthog_ai/frontend/utils/composerModels.test.ts b/products/posthog_ai/frontend/utils/composerModels.test.ts
index 850e1c741e64..1b93a9e02344 100644
--- a/products/posthog_ai/frontend/utils/composerModels.test.ts
+++ b/products/posthog_ai/frontend/utils/composerModels.test.ts
@@ -19,6 +19,7 @@ import {
getRuntimeAdapterForModel,
listRuntimeAdapters,
modelsForRuntimeAdapter,
+ pickerModels,
} from './composerModels'
import { type PermissionMode } from './composerModes'
@@ -235,4 +236,29 @@ describe('composerModels', () => {
'gpt-5.6-luna',
])
})
+
+ describe('pickerModels', () => {
+ const RETIRED: ModelChoiceApi = {
+ runtime_adapter: 'claude',
+ model: 'claude-opus-4-7',
+ display_name: 'Claude Opus 4.7',
+ supported_efforts: ['low', 'medium', 'high', 'xhigh', 'max', 'ultracode'],
+ }
+ const FULL = [...CATALOGUE, RETIRED]
+
+ it('lists the retired model this run is on, so its name and efforts survive', () => {
+ expect(pickerModels(FULL, 'claude-opus-4-7')).toEqual(FULL)
+ })
+
+ it('resolves the run model through the same normalization the catalogue uses', () => {
+ expect(pickerModels(FULL, 'anthropic/claude-opus-4-7')).toEqual(FULL)
+ })
+
+ it.each([null, undefined, 'claude-opus-4-8', 'model-no-catalogue-knows'])(
+ 'drops every retired model for %s',
+ (selected: string | null | undefined) => {
+ expect(pickerModels(FULL, selected)).toEqual(CATALOGUE)
+ }
+ )
+ })
})
diff --git a/products/posthog_ai/frontend/utils/composerModels.ts b/products/posthog_ai/frontend/utils/composerModels.ts
index 9a307b273255..8542383cec16 100644
--- a/products/posthog_ai/frontend/utils/composerModels.ts
+++ b/products/posthog_ai/frontend/utils/composerModels.ts
@@ -8,7 +8,7 @@ import {
RuntimeAdapterEnumApi,
TaskRunCreateRequestSchemaApi,
} from 'products/tasks/frontend/generated/api.schemas'
-import { normalizeModelId } from 'products/tasks/frontend/modelCatalog'
+import { isOfferedModel, normalizeModelId } from 'products/tasks/frontend/modelCatalog'
import {
CAPABILITY_LADDER_BY_RUNTIME_ADAPTER,
DEFAULT_MODEL_BY_RUNTIME_ADAPTER,
@@ -78,6 +78,14 @@ export function modelsForRuntimeAdapter(
return catalogue.filter((option) => option.runtime_adapter === runtimeAdapter)
}
+// Everything still offered, plus the model this run is already on when the catalogue has since retired it — without
+// that entry the picker names the run's own model by its raw id. Call it through `useMemo`: composers re-render on
+// every keystroke.
+export function pickerModels(catalogue: ModelChoiceApi[], selectedModel: string | null | undefined): ModelChoiceApi[] {
+ const selected = catalogueEntry(catalogue, selectedModel)
+ return catalogue.filter((option) => isOfferedModel(option.model) || option.model === selected?.model)
+}
+
// The model the ladder runs at the default effort. Landing there puts a fresh selection on a slider notch,
// so the picker opens on Faster/Smarter; a default that sits off the ladder sends it straight to Advanced.
function ladderDefaultModel(runtimeAdapter: RuntimeAdapterEnumApi): string | undefined {
diff --git a/products/slack_app/backend/services/model_catalogue.py b/products/slack_app/backend/services/model_catalogue.py
index 1d77746d5162..14a199896019 100644
--- a/products/slack_app/backend/services/model_catalogue.py
+++ b/products/slack_app/backend/services/model_catalogue.py
@@ -23,6 +23,7 @@ from products.tasks.backend.facade.model_catalogue import (
filter_unsupported_effort,
group_by_runtime,
label_for,
+ offered_model_choices,
runtime_adapter_for,
)
@@ -34,6 +35,9 @@ def available_model_choices() -> tuple[ModelChoice, ...]:
answers — whether a mention names a real model, which runtime drives it, and what
efforts it takes — so the list no longer depends on a network call that can come
back empty and leave a mention with nothing to match against.
+
+ Wider than what the App Home picker offers: a mention naming a retired model still
+ resolves to it, because a person who asks for one by name is not choosing from a list.
"""
return catalog_model_choices()
@@ -55,6 +59,7 @@ __all__ = [
"RuntimeGroup",
"available_model_choices",
"describe_run_model",
+ "offered_model_choices",
"filter_unsupported_effort",
"display_name_for_model",
"group_by_runtime",
diff --git a/products/slack_app/backend/services/slack_app_home.py b/products/slack_app/backend/services/slack_app_home.py
index 7670d8e5522e..71f47166cc1e 100644
--- a/products/slack_app/backend/services/slack_app_home.py
+++ b/products/slack_app/backend/services/slack_app_home.py
@@ -40,11 +40,14 @@ from products.slack_app.backend.services.model_catalogue import (
COST_BASELINE_MODEL,
REASONING_EFFORT_DISPLAY_NAMES,
RUNTIME_ADAPTER_DISPLAY_NAMES,
+ ModelChoice,
available_model_choices,
describe_run_model,
display_name_for_model,
group_by_runtime,
label_for,
+ offered_model_choices,
+ runtime_adapter_for,
)
from products.slack_app.backend.services.run_preferences import SLACK_DEFAULT_MODEL
from products.slack_app.backend.services.slack_app_home_stats import (
@@ -183,36 +186,52 @@ def _describe_cost(cost_multiplier: str | None) -> str | None:
return f"Cost per token vs {display_name_for_model(COST_BASELINE_MODEL)}: {cost_multiplier}"
+def _picker_model(choice: ModelChoice) -> PickerModel:
+ """One model dressed in the effort labels the modal's linked dropdowns render."""
+ return PickerModel(
+ value=choice.model,
+ label=choice.label,
+ supported_efforts=tuple(
+ PickerEffort(value=e, label=label_for(e, REASONING_EFFORT_DISPLAY_NAMES)) for e in choice.supported_efforts
+ ),
+ cost_description=_describe_cost(choice.cost_multiplier),
+ )
+
+
def get_picker_choices() -> tuple[PickerAdapter, ...]:
- """Dress the catalogue's runtime → model tree in the effort labels the modal's linked
- dropdowns render. Adapters with no available models are omitted entirely."""
+ """The runtime → model tree the modal offers, retired models left out.
+
+ Adapters with no models are omitted entirely.
+ """
return tuple(
PickerAdapter(
value=group.runtime_adapter,
label=group.label,
- models=tuple(
- PickerModel(
- value=choice.model,
- label=choice.label,
- supported_efforts=tuple(
- PickerEffort(value=e, label=label_for(e, REASONING_EFFORT_DISPLAY_NAMES))
- for e in choice.supported_efforts
- ),
- cost_description=_describe_cost(choice.cost_multiplier),
- )
- for choice in group.choices
- ),
+ models=tuple(_picker_model(choice) for choice in group.choices),
)
- for group in group_by_runtime(available_model_choices())
+ for group in group_by_runtime(offered_model_choices())
)
-def _models_for(runtime_adapter: str) -> tuple[PickerModel, ...]:
- """The models the modal's model dropdown offers for one runtime."""
- for adapter in get_picker_choices():
- if adapter.value == runtime_adapter:
- return adapter.models
- return ()
+def _models_for(runtime_adapter: str, keep: str | None = None) -> tuple[PickerModel, ...]:
+ """The models the modal's model dropdown offers for one runtime.
+
+ ``keep`` names a model to list even where the catalog retired it, so someone whose
+ stored preference is on one still sees it selected, and saving the modal does not
+ quietly move them off it.
+ """
+ models = next((adapter.models for adapter in get_picker_choices() if adapter.value == runtime_adapter), ())
+ if not keep or any(model.value == keep for model in models):
+ return models
+ retained = next(
+ (
+ choice
+ for choice in available_model_choices()
+ if choice.runtime_adapter == runtime_adapter and choice.model == keep
+ ),
+ None,
+ )
+ return (*models, _picker_model(retained)) if retained else models
def _runtime_adapter_options() -> tuple[tuple[str, str], ...]:
@@ -1371,7 +1390,7 @@ def render_edit_modal(
else {}
),
}
- for model in _models_for(current.runtime_adapter)
+ for model in _models_for(current.runtime_adapter, keep=current.model)
]
if model_options:
model_element: dict[str, Any] = {
@@ -1804,7 +1823,7 @@ def _drop_invalidated_selections(
effort. The scoped block ids stop Slack handing those back on the next interaction;
this stops the view we render from the same payload showing them in the meantime.
"""
- if model and model not in {offered.value for offered in _models_for(runtime_adapter or "")}:
+ if model and runtime_adapter_for(model) != runtime_adapter:
model = None
if reasoning_effort and reasoning_effort not in (_supported_efforts(runtime_adapter, model) or ()):
reasoning_effort = None
diff --git a/products/slack_app/backend/tests/services/test_slack_app_home.py b/products/slack_app/backend/tests/services/test_slack_app_home.py
index 138ce2c9bd3b..0996537b4e27 100644
--- a/products/slack_app/backend/tests/services/test_slack_app_home.py
+++ b/products/slack_app/backend/tests/services/test_slack_app_home.py
@@ -961,6 +961,8 @@ class TestRenderEditModal:
effort_block = _find_block(view, MODAL_BLOCK_REASONING_EFFORT)
assert runtime_block and model_block and effort_block
assert runtime_block["element"]["initial_option"]["value"] == "claude"
+ # Opus 4.7 is retired, so the picker lists it only because this preference is on it.
+ # Leaving it out would show the modal with no model selected and save a different one.
assert model_block["element"]["initial_option"]["value"] == "claude-opus-4-7"
assert effort_block["element"]["initial_option"]["value"] == "high"
# Slack rejects the whole view when an initial option is not one of the offered
diff --git a/products/tasks/backend/facade/model_catalogue.py b/products/tasks/backend/facade/model_catalogue.py
index a2190222601d..25ae490fd977 100644
--- a/products/tasks/backend/facade/model_catalogue.py
+++ b/products/tasks/backend/facade/model_catalogue.py
@@ -21,6 +21,7 @@ from products.tasks.backend.logic.services.model_catalogue import (
filter_unsupported_effort,
group_by_runtime,
label_for,
+ offered_model_choices,
runtime_adapter_for,
)
@@ -38,5 +39,6 @@ __all__ = [
"filter_unsupported_effort",
"group_by_runtime",
"label_for",
+ "offered_model_choices",
"runtime_adapter_for",
]
diff --git a/products/tasks/backend/logic/services/model_catalogue.py b/products/tasks/backend/logic/services/model_catalogue.py
index de07fabb684b..1fbc1558d1b8 100644
--- a/products/tasks/backend/logic/services/model_catalogue.py
+++ b/products/tasks/backend/logic/services/model_catalogue.py
@@ -215,6 +215,17 @@ def catalog_model_choices() -> tuple[ModelChoice, ...]:
)
+@lru_cache(maxsize=1)
+def offered_model_choices() -> tuple[ModelChoice, ...]:
+ """The models a picker may offer: every catalog model except the retired ones.
+
+ A caller that recognises a model a person named, rather than asking them to choose one,
+ wants ``catalog_model_choices`` instead. A retired model still runs and still reads its
+ name and cost from the catalog.
+ """
+ return tuple(choice for choice in catalog_model_choices() if model_catalog.is_offered_model(choice.model))
+
+
def runtime_adapter_for(model: str | None) -> str | None:
"""Which runtime drives this model, per the static run-config map.
@@ -282,6 +293,7 @@ __all__ = [
"RuntimeGroup",
"available_model_choices",
"catalog_model_choices",
+ "offered_model_choices",
"display_name_for_model",
"filter_unsupported_effort",
"group_by_runtime",
diff --git a/products/tasks/backend/model_catalog.py b/products/tasks/backend/model_catalog.py
index ca65f69eddb1..f7a94ea005e0 100644
--- a/products/tasks/backend/model_catalog.py
+++ b/products/tasks/backend/model_catalog.py
@@ -128,6 +128,10 @@ class CatalogModel:
the option from the request everywhere else, so a model that never learns it here runs at
the default context window with fast mode off.
+ ``retired`` marks a model no picker offers any more, while a session already pinned to it
+ still starts and still resolves its name, cost and efforts. Superseded models stay listed
+ here for that reason rather than being deleted.
+
Both gates fail closed, so clear ``access_flag`` when the rollout reaches everyone. A flag
left behind keeps the model away from every caller the flag service cannot answer for, and
from every surface that reads flags before they load.
@@ -141,6 +145,7 @@ class CatalogModel:
cost: ModelCost | None = None
supports_1m_context: bool = False
supports_fast_mode: bool = False
+ retired: bool = False
# Rates a model family lists at. Sources, checked 2026-09-17: Anthropic and OpenAI publish
@@ -167,7 +172,7 @@ MODELS: tuple[CatalogModel, ...] = (
# GLM 5.2 is Cloudflare-served and driven through the `claude` adapter: the LLM gateway
# exposes it over its Anthropic-Messages surface and translates the `@cf/` id upstream,
# so the `anthropic` provider is the intended routing rather than a direct Anthropic call.
- CatalogModel("@cf/zai-org/glm-5.2", CLAUDE, _GLM, label="GLM-5.2", cost=_GLM_COST),
+ CatalogModel("@cf/zai-org/glm-5.2", CLAUDE, _GLM, label="GLM-5.2", cost=_GLM_COST, retired=True),
CatalogModel("zai-org/glm-5.3", CLAUDE, _GLM, label="GLM-5.3", cost=_GLM_COST),
CatalogModel("zai-org/glm-5.3-flash", CLAUDE, _GLM, label="GLM-5.3 Flash", cost=_GLM_FLASH_COST),
CatalogModel("moonshotai/kimi-k3", CLAUDE, _NO_EFFORT, label="Kimi K3", cost=_KIMI_COST),
@@ -178,8 +183,8 @@ MODELS: tuple[CatalogModel, ...] = (
label="DeepSeek V4 Flash",
cost=_DEEPSEEK_COST,
),
- CatalogModel("claude-opus-4-5", CLAUDE, _STANDARD, cost=_OPUS_COST),
- CatalogModel("claude-opus-4-6", CLAUDE, _THROUGH_MAX, cost=_OPUS_COST),
+ CatalogModel("claude-opus-4-5", CLAUDE, _STANDARD, cost=_OPUS_COST, retired=True),
+ CatalogModel("claude-opus-4-6", CLAUDE, _THROUGH_MAX, cost=_OPUS_COST, retired=True),
CatalogModel(
"claude-opus-4-7",
CLAUDE,
@@ -187,6 +192,7 @@ MODELS: tuple[CatalogModel, ...] = (
cost=_OPUS_COST,
supports_1m_context=True,
supports_fast_mode=True,
+ retired=True,
),
CatalogModel(
"claude-opus-4-8",
@@ -215,7 +221,14 @@ MODELS: tuple[CatalogModel, ...] = (
CatalogModel("claude-fable-5", CLAUDE, _EXTENDED, cost=_FABLE_COST, supports_1m_context=True),
CatalogModel("claude-fable-5-1", CLAUDE, _EXTENDED, cost=_FABLE_COST, supports_1m_context=True),
CatalogModel("claude-sonnet-5", CLAUDE, _EXTENDED, cost=_SONNET_COST, supports_1m_context=True),
- CatalogModel("claude-sonnet-4-6", CLAUDE, _STANDARD, cost=_SONNET_4_COST, supports_1m_context=True),
+ CatalogModel(
+ "claude-sonnet-4-6",
+ CLAUDE,
+ _STANDARD,
+ cost=_SONNET_4_COST,
+ supports_1m_context=True,
+ retired=True,
+ ),
# No cost: the gateway does not serve bare `gpt-5` to a task run, so there is no rate
# anyone can check it against.
CatalogModel("gpt-5", CODEX, _STANDARD),
@@ -352,6 +365,17 @@ def access_flag_for_model(model_id: str) -> str | None:
return model.access_flag if model else None
+def is_offered_model(model_id: str) -> bool:
+ """Whether a picker may offer this model.
+
+ The catalog is the offer list, so a model it does not name is not offered however the
+ gateway answers. A retired model stays here to keep a pinned session running and to name
+ and price it, which is a different question from whether a person may choose it now.
+ """
+ model = _MODEL_BY_ID.get(normalize_model_id(model_id))
+ return model is not None and not model.retired
+
+
def supports_1m_context(model_id: str) -> bool:
"""Whether this model runs with the 1M-token context window, ``False`` for one the catalog omits."""
model = _MODEL_BY_ID.get(normalize_model_id(model_id))
@@ -523,6 +547,7 @@ __all__ = [
"cost_multiplier_for",
"cost_multiplier_label",
"format_cost_rates",
+ "is_offered_model",
"label_for_model",
"models_for_runtime_adapter",
"normalize_model_id",
diff --git a/products/tasks/backend/tests/__snapshots__/test_model_catalog/test_every_model_resolves_to_the_recorded_triple.json b/products/tasks/backend/tests/__snapshots__/test_model_catalog/test_every_model_resolves_to_the_recorded_triple.json
index e3eb11f75617..d14c4f6115fc 100644
--- a/products/tasks/backend/tests/__snapshots__/test_model_catalog/test_every_model_resolves_to_the_recorded_triple.json
+++ b/products/tasks/backend/tests/__snapshots__/test_model_catalog/test_every_model_resolves_to_the_recorded_triple.json
@@ -128,6 +128,7 @@
"models": {
"@cf/zai-org/glm-5.2": {
"cost_multiplier": "≈0.57×",
+ "offered": false,
"reasoning_efforts": [
"high",
"max"
@@ -137,6 +138,7 @@
},
"claude-fable-5": {
"cost_multiplier": "5×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -150,6 +152,7 @@
},
"claude-fable-5-1": {
"cost_multiplier": "5×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -163,6 +166,7 @@
},
"claude-opus-4-5": {
"cost_multiplier": "2.5×",
+ "offered": false,
"reasoning_efforts": [
"low",
"medium",
@@ -173,6 +177,7 @@
},
"claude-opus-4-6": {
"cost_multiplier": "2.5×",
+ "offered": false,
"reasoning_efforts": [
"low",
"medium",
@@ -185,6 +190,7 @@
},
"claude-opus-4-7": {
"cost_multiplier": "2.5×",
+ "offered": false,
"reasoning_efforts": [
"low",
"medium",
@@ -198,6 +204,7 @@
},
"claude-opus-4-8": {
"cost_multiplier": "2.5×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -211,6 +218,7 @@
},
"claude-opus-5": {
"cost_multiplier": "2.5×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -224,6 +232,7 @@
},
"claude-opus-5-5": {
"cost_multiplier": "2×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -237,6 +246,7 @@
},
"claude-sonnet-4-6": {
"cost_multiplier": "1.5×",
+ "offered": false,
"reasoning_efforts": [
"low",
"medium",
@@ -247,6 +257,7 @@
},
"claude-sonnet-5": {
"cost_multiplier": "1×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -260,18 +271,21 @@
},
"deepseek-ai/deepseek-v4-flash-0731": {
"cost_multiplier": "≈0.05×",
+ "offered": true,
"reasoning_efforts": [],
"supports_1m_context": false,
"supports_fast_mode": false
},
"moonshotai/kimi-k3": {
"cost_multiplier": "1.5×",
+ "offered": true,
"reasoning_efforts": [],
"supports_1m_context": false,
"supports_fast_mode": false
},
"zai-org/glm-5.3": {
"cost_multiplier": "≈0.57×",
+ "offered": true,
"reasoning_efforts": [
"high",
"max"
@@ -281,6 +295,7 @@
},
"zai-org/glm-5.3-flash": {
"cost_multiplier": "≈0.06×",
+ "offered": true,
"reasoning_efforts": [
"high",
"max"
@@ -301,6 +316,7 @@
"models": {
"gpt-5": {
"cost_multiplier": null,
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -311,6 +327,7 @@
},
"gpt-5.5": {
"cost_multiplier": "≈2.8×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -322,6 +339,7 @@
},
"gpt-5.6-luna": {
"cost_multiplier": "≈0.55×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -334,6 +352,7 @@
},
"gpt-5.6-sol": {
"cost_multiplier": "≈2.8×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -346,6 +365,7 @@
},
"gpt-5.6-terra": {
"cost_multiplier": "≈1.4×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -358,6 +378,7 @@
},
"gpt-6-astra": {
"cost_multiplier": "5×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -370,6 +391,7 @@
},
"gpt-6-luna": {
"cost_multiplier": "0.05×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
@@ -382,6 +404,7 @@
},
"gpt-6-sol": {
"cost_multiplier": "1×",
+ "offered": true,
"reasoning_efforts": [
"low",
"medium",
diff --git a/products/tasks/backend/tests/test_model_catalog.py b/products/tasks/backend/tests/test_model_catalog.py
index a0aae8dc4e10..fa64cded8940 100644
--- a/products/tasks/backend/tests/test_model_catalog.py
+++ b/products/tasks/backend/tests/test_model_catalog.py
@@ -55,6 +55,7 @@ def _resolved_catalog() -> dict[str, Any]:
"cost_multiplier": model_catalog.cost_multiplier_label(model_id),
"supports_1m_context": model_catalog.supports_1m_context(model_id),
"supports_fast_mode": model_catalog.supports_fast_mode(model_id),
+ "offered": model_catalog.is_offered_model(model_id),
}
for model_id in model_catalog.models_for_runtime_adapter(adapter)
},
diff --git a/products/tasks/frontend/modelCatalog.generated.ts b/products/tasks/frontend/modelCatalog.generated.ts
index 92e5091c5a3b..098fd96fcef5 100644
--- a/products/tasks/frontend/modelCatalog.generated.ts
+++ b/products/tasks/frontend/modelCatalog.generated.ts
@@ -92,6 +92,9 @@ export interface CatalogModel {
/** Runs in fast mode. Absent means it does not, and a picker offers no
fast-mode toggle. */
supportsFastMode?: boolean
+ /** Superseded: no picker offers it, and a session already pinned to it
+ still runs and still reads its name and cost from here. */
+ retired?: boolean
}
/** The model `1×` refers to. */
@@ -119,6 +122,7 @@ export const MODELS: readonly CatalogModel[] = [
},
costMultiplier: '≈0.57×',
costSummary: 'Input $1.40 · Output $4.40 per 1M tokens',
+ retired: true,
},
{
id: 'zai-org/glm-5.3',
@@ -179,6 +183,7 @@ export const MODELS: readonly CatalogModel[] = [
},
costMultiplier: '2.5×',
costSummary: 'Input $5 · Output $25 per 1M tokens',
+ retired: true,
},
{
id: 'claude-opus-4-6',
@@ -191,6 +196,7 @@ export const MODELS: readonly CatalogModel[] = [
},
costMultiplier: '2.5×',
costSummary: 'Input $5 · Output $25 per 1M tokens',
+ retired: true,
},
{
id: 'claude-opus-4-7',
@@ -205,6 +211,7 @@ export const MODELS: readonly CatalogModel[] = [
costSummary: 'Input $5 · Output $25 per 1M tokens',
supports1MContext: true,
supportsFastMode: true,
+ retired: true,
},
{
id: 'claude-opus-4-8',
@@ -299,6 +306,7 @@ export const MODELS: readonly CatalogModel[] = [
costMultiplier: '1.5×',
costSummary: 'Input $3 · Output $15 per 1M tokens',
supports1MContext: true,
+ retired: true,
},
{
id: 'gpt-5',
diff --git a/products/tasks/frontend/modelCatalog.ts b/products/tasks/frontend/modelCatalog.ts
index 109564ad7c36..1229b5ce615b 100644
--- a/products/tasks/frontend/modelCatalog.ts
+++ b/products/tasks/frontend/modelCatalog.ts
@@ -1,4 +1,4 @@
-import { PROVIDER_BY_RUNTIME_ADAPTER } from './modelCatalog.generated'
+import { MODELS, PROVIDER_BY_RUNTIME_ADAPTER } from './modelCatalog.generated'
/**
* The form a model id is looked up under.
@@ -21,3 +21,10 @@ export function normalizeModelId(modelId: string): string {
}
return normalized
}
+
+const RETIRED_MODEL_IDS: ReadonlySet<string> = new Set(MODELS.filter((model) => model.retired).map((model) => model.id))
+
+/** Whether a picker may offer this model. Mirrors `isOfferedModel` in the desktop app's `model-catalog.ts`. */
+export function isOfferedModel(modelId: string): boolean {
+ return !RETIRED_MODEL_IDS.has(normalizeModelId(modelId))
+}
diff --git a/products/tasks/scripts/build_model_catalog.py b/products/tasks/scripts/build_model_catalog.py
index 345b5ab0ecd7..1e015cfe050a 100755
--- a/products/tasks/scripts/build_model_catalog.py
+++ b/products/tasks/scripts/build_model_catalog.py
@@ -148,6 +148,7 @@ def render(catalog: dict[str, Any], style: Style) -> str:
*cost_lines(model),
*([f"{i}{i}supports1MContext: true,"] if model.supports_1m_context else []),
*([f"{i}{i}supportsFastMode: true,"] if model.supports_fast_mode else []),
+ *([f"{i}{i}retired: true,"] if model.retired else []),
f"{i}}},",
]
)
@@ -267,6 +268,9 @@ export interface CatalogModel {{
{i}/** Runs in fast mode. Absent means it does not, and a picker offers no
{i} fast-mode toggle. */
{i}supportsFastMode?: boolean{semi}
+{i}/** Superseded: no picker offers it, and a session already pinned to it
+{i} still runs and still reads its name and cost from here. */
+{i}retired?: boolean{semi}
}}
/** The model `1×` refers to. */