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): name every reasoning depth the same way across surfaces (#104955)

Vojta Bartoš86c3c468b446
diff --git a/products/desktop/apps/mobile/src/features/tasks/composer/AgentConfigControls.test.tsx b/products/desktop/apps/mobile/src/features/tasks/composer/AgentConfigControls.test.tsx
index f4f8fc0262d9..ceb1e9259281 100644
--- a/products/desktop/apps/mobile/src/features/tasks/composer/AgentConfigControls.test.tsx
+++ b/products/desktop/apps/mobile/src/features/tasks/composer/AgentConfigControls.test.tsx
@@ -161,7 +161,7 @@ describe("AgentConfigControls", () => {
act(() =>
findPressableWithText(
renderer,
- "Claude Opus 5.5 · Extra High",
+ "Claude Opus 5.5 · Extra high",
).props.onPress(),
);
diff --git a/products/desktop/apps/mobile/src/features/tasks/composer/options.test.ts b/products/desktop/apps/mobile/src/features/tasks/composer/options.test.ts
index a781f684aa9d..69fcaee1f314 100644
--- a/products/desktop/apps/mobile/src/features/tasks/composer/options.test.ts
+++ b/products/desktop/apps/mobile/src/features/tasks/composer/options.test.ts
@@ -78,7 +78,7 @@ describe("mobile composer options", () => {
model: "claude-opus-5-5",
effort: "xhigh",
modelLabel: "Claude Opus 5.5",
- effortLabel: "Extra High",
+ effortLabel: "Extra high",
},
]);
});
diff --git a/products/desktop/packages/agent/src/adapters/codex-app-server/models.test.ts b/products/desktop/packages/agent/src/adapters/codex-app-server/models.test.ts
index d361ca851d1b..811dba141a34 100644
--- a/products/desktop/packages/agent/src/adapters/codex-app-server/models.test.ts
+++ b/products/desktop/packages/agent/src/adapters/codex-app-server/models.test.ts
@@ -17,7 +17,7 @@ describe("getReasoningEffortOptions", () => {
getReasoningEffortOptions(modelId).map((o) => o.value);
it.each(["gpt-5.5", "gpt-5.5-codex", "openai/gpt-5.5", "GPT-5.5"])(
- "offers Extra High for the gpt-5.5 family (%s)",
+ "offers Extra high for the gpt-5.5 family (%s)",
(modelId) => {
expect(values(modelId)).toEqual(["low", "medium", "high", "xhigh"]);
},
@@ -41,11 +41,11 @@ describe("getReasoningEffortOptions", () => {
},
);
- it('labels the extra tier "Extra High"', () => {
+ it('labels the extra tier "Extra high"', () => {
const xhigh = getReasoningEffortOptions("gpt-5.5").find(
(o) => o.value === "xhigh",
);
- expect(xhigh?.name).toBe("Extra High");
+ expect(xhigh?.name).toBe("Extra high");
});
});
diff --git a/products/desktop/packages/agent/src/adapters/reasoning-effort.ts b/products/desktop/packages/agent/src/adapters/reasoning-effort.ts
index 126e1e478f83..3d0f01a25cea 100644
--- a/products/desktop/packages/agent/src/adapters/reasoning-effort.ts
+++ b/products/desktop/packages/agent/src/adapters/reasoning-effort.ts
@@ -1,4 +1,8 @@
-import type { Adapter } from "@posthog/shared";
+import {
+ type Adapter,
+ type CapabilityNotch,
+ getCapabilityLadder,
+} from "@posthog/shared";
import type { EffortLevel } from "@posthog/shared/domain-types";
import {
getContextWindowOptions as getClaudeContextWindowOptions,
@@ -59,31 +63,4 @@ export function getFastModeOptions(
return adapter === "codex" ? null : getClaudeFastModeOptions(modelId);
}
-/** One stop on the Faster/Smarter slider: a model plus effort pairing. */
-export interface CapabilityNotch {
- model: string;
- effort: EffortLevel;
-}
-
-const CLAUDE_CAPABILITY_LADDER: CapabilityNotch[] = [
- { model: "claude-sonnet-5", effort: "medium" },
- { model: "claude-sonnet-5", effort: "high" },
- { model: "claude-opus-5-5", effort: "medium" },
- { model: "claude-opus-5-5", effort: "xhigh" },
- { model: "claude-fable-5-1", effort: "max" },
-];
-
-const CODEX_CAPABILITY_LADDER: CapabilityNotch[] = [
- { model: "gpt-6-luna", effort: "low" },
- { model: "gpt-6-sol", effort: "low" },
- { model: "gpt-6-sol", effort: "medium" },
- { model: "gpt-6-sol", effort: "high" },
- { model: "gpt-6-sol", effort: "xhigh" },
- { model: "gpt-6-astra", effort: "max" },
-];
-
-export function getCapabilityLadder(adapter: Adapter): CapabilityNotch[] {
- return adapter === "codex"
- ? CODEX_CAPABILITY_LADDER
- : CLAUDE_CAPABILITY_LADDER;
-}
+export { type CapabilityNotch, getCapabilityLadder };
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 23b7816a51b3..3a1d9e8b7a7a 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
@@ -8,6 +8,7 @@ import {
formatGatewayModelName,
isHiddenPiModelId,
} from "@posthog/shared";
+import { labelForModel } from "@posthog/shared/model-catalog";
import {
fetchPosthogGatewayModels,
type GatewayModel,
@@ -16,25 +17,6 @@ import {
export const DEFAULT_PI_MODEL_ID = "gpt-5.6-terra";
-const PI_MODEL_LABELS: Record<string, string> = {
- "claude-haiku-4-5": "Claude Haiku 4.5",
- "claude-sonnet-5": "Claude Sonnet 5",
- "claude-fable-5": "Claude Fable 5",
- "claude-fable-5-1": "Claude Fable 5.1",
- "claude-opus-5": "Claude Opus 5",
- "claude-opus-5-5": "Claude Opus 5.5",
- "gpt-5.6-sol": "GPT-5.6 Sol",
- "gpt-5.6-terra": "GPT-5.6 Terra",
- "gpt-5.6-luna": "GPT-5.6 Luna",
- "gpt-6-astra": "GPT-6 Astra",
- "gpt-6-sol": "GPT-6 Sol",
- "gpt-6-luna": "GPT-6 Luna",
- "@cf/zai-org/glm-5.2": "GLM-5.2",
- "zai-org/glm-5.3": "GLM-5.3",
- "zai-org/glm-5.3-flash": "GLM-5.3 Flash",
- "moonshotai/kimi-k3": "Kimi K3",
-};
-
export type PiModelCatalogEntry = Omit<
Pick<ModelInfo, "provider" | "id" | "contextWindow">,
"provider"
@@ -68,7 +50,8 @@ export function resolvePosthogPiModelCatalog(
.map((model) => ({
provider: "posthog",
id: model.id,
- name: PI_MODEL_LABELS[model.id] ?? piModelDisplayName(model),
+ // Catalog name first, so Pi reads the same as every other picker.
+ name: labelForModel(model.id) ?? piModelDisplayName(model),
isDefault: model.id === DEFAULT_PI_MODEL_ID,
contextWindow: model.contextWindow,
thinkingLevels: getSupportedThinkingLevels({
diff --git a/products/desktop/packages/shared/src/domain-types.ts b/products/desktop/packages/shared/src/domain-types.ts
index d61b6b8ae987..31fd8e0fcc36 100644
--- a/products/desktop/packages/shared/src/domain-types.ts
+++ b/products/desktop/packages/shared/src/domain-types.ts
@@ -2,6 +2,7 @@ import { z } from "zod";
import type { Adapter } from "./adapter";
import type { AgentRuntime } from "./agent-runtime";
import type { ReportStateReason } from "./dismissal-reasons";
+import { REASONING_EFFORT_LABELS } from "./model-catalog.generated";
import type { StoredLogEntry } from "./session-events";
import type { UploadableSkillSource } from "./skills";
@@ -43,14 +44,10 @@ export type ServiceTier = z.infer<typeof serviceTierSchema>;
export const SERVICE_TIERS = serviceTierSchema.options;
-export const EFFORT_LEVEL_LABELS: Record<EffortLevel, string> = {
- low: "Low",
- medium: "Medium",
- high: "High",
- xhigh: "Extra High",
- max: "Max",
- ultracode: "Ultracode",
-};
+// The annotation is the check: a depth added to `EffortLevel` but not to the catalog (or
+// the reverse) fails to compile here.
+export const EFFORT_LEVEL_LABELS: Record<EffortLevel, string> =
+ REASONING_EFFORT_LABELS;
/** Claude Code docs for the tiers that need explaining. */
export const EFFORT_LEVEL_DOCS_URLS: Partial<Record<EffortLevel, string>> = {
diff --git a/products/desktop/packages/shared/src/index.ts b/products/desktop/packages/shared/src/index.ts
index c418bc191403..618624adafbe 100644
--- a/products/desktop/packages/shared/src/index.ts
+++ b/products/desktop/packages/shared/src/index.ts
@@ -302,6 +302,7 @@ export {
} from "./pr-urls";
export { isPrivateIpv4Octets, isPrivateIpv6Literal } from "./private-network";
export {
+ type CapabilityNotch,
DEFAULT_REASONING_EFFORT,
getCapabilityLadder,
getReasoningEffortOptions,
diff --git a/products/desktop/packages/shared/src/model-catalog.generated.ts b/products/desktop/packages/shared/src/model-catalog.generated.ts
index 077e6eb1fa3c..fa156aebd6b9 100644
--- a/products/desktop/packages/shared/src/model-catalog.generated.ts
+++ b/products/desktop/packages/shared/src/model-catalog.generated.ts
@@ -56,6 +56,16 @@ export const REASONING_EFFORTS: readonly ReasoningEffort[] = [
"ultracode",
];
+/** What a picker calls each depth. */
+export const REASONING_EFFORT_LABELS: Record<ReasoningEffort, string> = {
+ low: "Low",
+ medium: "Medium",
+ high: "High",
+ xhigh: "Extra high",
+ max: "Max",
+ ultracode: "Ultracode",
+};
+
/** A value for each runtime adapter. */
export type ByRuntimeAdapter<T> = Record<RuntimeAdapter, T>;
@@ -383,6 +393,67 @@ export const DEFAULT_MODEL_BY_RUNTIME_ADAPTER: ByRuntimeAdapter<string> = {
codex: "gpt-5",
};
+export interface CapabilityNotch {
+ model: string;
+ effort: ReasoningEffort;
+}
+
+type CapabilityLadders = ByRuntimeAdapter<readonly CapabilityNotch[]>;
+
+/** The Faster → Smarter rungs each harness offers, cheapest first. Filter them
+ against what the gateway serves before rendering, so a rung naming a retired
+ model drops out instead of becoming a stop that fails on send. */
+export const CAPABILITY_LADDER_BY_RUNTIME_ADAPTER: CapabilityLadders = {
+ claude: [
+ {
+ model: "claude-sonnet-5",
+ effort: "medium",
+ },
+ {
+ model: "claude-sonnet-5",
+ effort: "high",
+ },
+ {
+ model: "claude-opus-5-5",
+ effort: "medium",
+ },
+ {
+ model: "claude-opus-5-5",
+ effort: "xhigh",
+ },
+ {
+ model: "claude-fable-5-1",
+ effort: "max",
+ },
+ ],
+ codex: [
+ {
+ model: "gpt-6-luna",
+ effort: "low",
+ },
+ {
+ model: "gpt-6-sol",
+ effort: "low",
+ },
+ {
+ model: "gpt-6-sol",
+ effort: "medium",
+ },
+ {
+ model: "gpt-6-sol",
+ effort: "high",
+ },
+ {
+ model: "gpt-6-sol",
+ effort: "xhigh",
+ },
+ {
+ model: "gpt-6-astra",
+ effort: "max",
+ },
+ ],
+};
+
export interface ModelFamily {
runtimeAdapter: RuntimeAdapter;
prefix: string;
diff --git a/products/desktop/packages/shared/src/reasoning-effort.ts b/products/desktop/packages/shared/src/reasoning-effort.ts
index d9de069bca35..a6667c664583 100644
--- a/products/desktop/packages/shared/src/reasoning-effort.ts
+++ b/products/desktop/packages/shared/src/reasoning-effort.ts
@@ -1,6 +1,10 @@
import type { Adapter } from "./adapter";
import { EFFORT_LEVEL_LABELS, type EffortLevel } from "./domain-types";
import { normalizeModelId, reasoningEffortsForModel } from "./model-catalog";
+import {
+ CAPABILITY_LADDER_BY_RUNTIME_ADAPTER,
+ type CapabilityNotch,
+} from "./model-catalog.generated";
export type SupportedReasoningEffort = EffortLevel;
@@ -34,37 +38,12 @@ export function isSupportedReasoningEffort(
);
}
-/** One stop on the Faster/Smarter capability scale: a model plus effort pairing. */
-export interface CapabilityNotch {
- model: string;
- effort: SupportedReasoningEffort;
-}
-
-// Mirrors the desktop ladder in @posthog/agent (unreachable from mobile); the
-// two must stay in sync.
-const CLAUDE_CAPABILITY_LADDER: readonly CapabilityNotch[] = [
- { model: "claude-sonnet-5", effort: "medium" },
- { model: "claude-sonnet-5", effort: "high" },
- { model: "claude-opus-5-5", effort: "medium" },
- { model: "claude-opus-5-5", effort: "xhigh" },
- { model: "claude-fable-5-1", effort: "max" },
-];
-
-const CODEX_CAPABILITY_LADDER: readonly CapabilityNotch[] = [
- { model: "gpt-6-luna", effort: "low" },
- { model: "gpt-6-sol", effort: "low" },
- { model: "gpt-6-sol", effort: "medium" },
- { model: "gpt-6-sol", effort: "high" },
- { model: "gpt-6-sol", effort: "xhigh" },
- { model: "gpt-6-astra", effort: "max" },
-];
+export type { CapabilityNotch };
export function getCapabilityLadder(
adapter: Adapter,
): readonly CapabilityNotch[] {
- return adapter === "codex"
- ? CODEX_CAPABILITY_LADDER
- : CLAUDE_CAPABILITY_LADDER;
+ return CAPABILITY_LADDER_BY_RUNTIME_ADAPTER[adapter];
}
const MODELS_WITH_1M_CONTEXT = new Set([
diff --git a/products/desktop/packages/ui/src/features/pi-sessions/PiSessionControls.tsx b/products/desktop/packages/ui/src/features/pi-sessions/PiSessionControls.tsx
index d619c0890642..bbf4db4253d4 100644
--- a/products/desktop/packages/ui/src/features/pi-sessions/PiSessionControls.tsx
+++ b/products/desktop/packages/ui/src/features/pi-sessions/PiSessionControls.tsx
@@ -63,13 +63,15 @@ function modelLabel(model?: PiModelOption): string {
return model?.name ?? model?.id ?? "Model";
}
+// Pi's thinking levels, not the catalog's reasoning efforts: Pi adds `off` and `minimal`
+// and has no `ultracode`, so this map cannot come from the catalog.
const thinkingLevelLabels: Record<PiThinkingLevel, string> = {
off: "Off",
minimal: "Minimal",
low: "Low",
medium: "Medium",
high: "High",
- xhigh: "Extra High",
+ xhigh: "Extra high",
max: "Max",
};
diff --git a/products/desktop/packages/ui/src/features/sessions/components/ReasoningLevelSelector.stories.tsx b/products/desktop/packages/ui/src/features/sessions/components/ReasoningLevelSelector.stories.tsx
index b3a3b4b9a57f..c0935190578b 100644
--- a/products/desktop/packages/ui/src/features/sessions/components/ReasoningLevelSelector.stories.tsx
+++ b/products/desktop/packages/ui/src/features/sessions/components/ReasoningLevelSelector.stories.tsx
@@ -86,7 +86,7 @@ function effortOption(currentValue: string): SessionConfigOption {
value: "high",
_meta: { "posthog.code/defaultOption": true },
},
- { name: "Extra High", value: "xhigh" },
+ { name: "Extra high", value: "xhigh" },
{ name: "Max", value: "max" },
],
} as unknown as SessionConfigOption;
diff --git a/products/desktop/packages/ui/src/features/sessions/sessionServiceHost.test.ts b/products/desktop/packages/ui/src/features/sessions/sessionServiceHost.test.ts
index bde2cbfa7c13..ea6767b09ae1 100644
--- a/products/desktop/packages/ui/src/features/sessions/sessionServiceHost.test.ts
+++ b/products/desktop/packages/ui/src/features/sessions/sessionServiceHost.test.ts
@@ -6548,7 +6548,7 @@ describe("SessionService", () => {
{ value: "low", name: "Low" },
{ value: "medium", name: "Medium" },
{ value: "high", name: "High" },
- { value: "xhigh", name: "Extra High" },
+ { value: "xhigh", name: "Extra high" },
],
},
]);
diff --git a/products/posthog_ai/frontend/components/composer/ComposerModelEffortPickers.test.tsx b/products/posthog_ai/frontend/components/composer/ComposerModelEffortPickers.test.tsx
index cc888103532b..2ed81d1b98e1 100644
--- a/products/posthog_ai/frontend/components/composer/ComposerModelEffortPickers.test.tsx
+++ b/products/posthog_ai/frontend/components/composer/ComposerModelEffortPickers.test.tsx
@@ -46,7 +46,7 @@ describe('ComposerModelEffortPickers', () => {
})
it.each([
- [undefined, 'gpt-5.6-sol'],
+ [undefined, 'gpt-6-sol'],
['gpt-5.6-luna', 'gpt-5.6-luna'],
])('waits for the default model %s before switching to Codex', async (defaultModel, expectedModel) => {
const onModelChange = jest.fn()
@@ -58,7 +58,7 @@ describe('ComposerModelEffortPickers', () => {
onEffortChange: jest.fn(),
models: [
...CATALOGUE,
- ...['gpt-5.6-luna', 'gpt-5.6-sol'].map((model) => ({
+ ...['gpt-5.6-luna', 'gpt-6-sol'].map((model) => ({
runtime_adapter: RuntimeAdapterEnumApi.Codex,
model,
display_name: model,
diff --git a/products/posthog_ai/frontend/utils/composerModels.test.ts b/products/posthog_ai/frontend/utils/composerModels.test.ts
index 42248af48192..850e1c741e64 100644
--- a/products/posthog_ai/frontend/utils/composerModels.test.ts
+++ b/products/posthog_ai/frontend/utils/composerModels.test.ts
@@ -6,9 +6,11 @@ import {
ReasoningEffortEnumApi,
RuntimeAdapterEnumApi,
} from 'products/tasks/frontend/generated/api.schemas'
+import { MODELS } from 'products/tasks/frontend/modelCatalog.generated'
import {
buildRunCreateRequest,
+ DEFAULT_COMPOSER_EFFORT,
getCapabilityLadder,
getDefaultModelForRuntimeAdapter,
getEffortsForModel,
@@ -37,25 +39,45 @@ describe('composerModels', () => {
]
it.each([
- [null, 'gpt-5.6-sol'],
+ [null, 'gpt-6-sol'],
['gpt-5.6-luna', 'gpt-5.6-luna'],
['openai/gpt-5.6-luna', 'gpt-5.6-luna'],
- ['claude-opus-4-8', 'gpt-5.6-sol'],
- ['retired-model', 'gpt-5.6-sol'],
+ ['claude-opus-4-8', 'gpt-6-sol'],
+ ['retired-model', 'gpt-6-sol'],
])('selects the Codex default with preference %s', (preference, expected) => {
const catalogue: ModelChoiceApi[] = [
...CATALOGUE,
{
runtime_adapter: 'codex',
- model: 'gpt-5.6-sol',
- display_name: 'GPT-5.6 Sol',
- supported_efforts: ['low', 'medium', 'high'],
+ model: 'gpt-6-sol',
+ display_name: 'GPT-6 Sol',
+ supported_efforts: ['low', 'medium', 'high', 'xhigh', 'max'],
},
]
expect(getDefaultModelForRuntimeAdapter(catalogue, RuntimeAdapterEnumApi.Codex, preference)).toBe(expected)
})
+ // The picker opens on the Faster/Smarter slider only while the current pair is a rung, so a default
+ // that sits off the ladder sends every fresh selection to Advanced instead.
+ it.each([RuntimeAdapterEnumApi.Claude, RuntimeAdapterEnumApi.Codex])(
+ 'defaults %s to a model the ladder runs at the default effort',
+ (adapter) => {
+ const catalogue: ModelChoiceApi[] = MODELS.map((model) => ({
+ runtime_adapter: model.runtimeAdapter as RuntimeAdapterEnumApi,
+ model: model.id,
+ display_name: model.label,
+ supported_efforts: [...model.reasoningEfforts] as ReasoningEffortEnumApi[],
+ }))
+ const model = getDefaultModelForRuntimeAdapter(catalogue, adapter, null)
+
+ expect(getCapabilityLadder(catalogue, adapter)).toContainEqual({
+ model,
+ effort: DEFAULT_COMPOSER_EFFORT,
+ })
+ }
+ )
+
it.each([
[CATALOGUE, RuntimeAdapterEnumApi.Codex, 'gpt-5.6-luna'],
[CATALOGUE, RuntimeAdapterEnumApi.Claude, 'claude-opus-4-8'],
@@ -155,9 +177,9 @@ describe('composerModels', () => {
expect((request as ClaudeTaskRunCreateSchemaApi).reasoning_effort).toBeUndefined()
})
- // Every rung the Faster/Smarter slider offers has to be sendable. The ladder is a hardcoded progression, so a
- // model the gateway has retired — or one that no longer takes the paired effort — must drop out of the stops
- // rather than become a notch whose run the backend rejects.
+ // Every rung the Faster/Smarter slider offers has to be sendable. The catalog is checked in, so a model the
+ // gateway has retired — or one that no longer takes the paired effort — must drop out of the stops rather
+ // than become a notch whose run the backend rejects.
it('keeps only the ladder rungs the catalogue still serves', () => {
const catalogue: ModelChoiceApi[] = [
{
@@ -168,8 +190,8 @@ describe('composerModels', () => {
},
{
runtime_adapter: 'claude',
- model: 'claude-opus-5',
- display_name: 'Claude Opus 5',
+ model: 'claude-opus-5-5',
+ display_name: 'Claude Opus 5.5',
supported_efforts: ['medium', 'high', 'xhigh'],
},
]
@@ -177,8 +199,8 @@ describe('composerModels', () => {
// Dropped: sonnet at `high` (unsupported effort) and fable entirely (absent from the catalogue).
expect(getCapabilityLadder(catalogue, RuntimeAdapterEnumApi.Claude)).toEqual([
{ model: 'claude-sonnet-5', effort: ReasoningEffortEnumApi.Medium },
- { model: 'claude-opus-5', effort: ReasoningEffortEnumApi.Medium },
- { model: 'claude-opus-5', effort: ReasoningEffortEnumApi.Xhigh },
+ { model: 'claude-opus-5-5', effort: ReasoningEffortEnumApi.Medium },
+ { model: 'claude-opus-5-5', effort: ReasoningEffortEnumApi.Xhigh },
])
expect(getCapabilityLadder(catalogue, RuntimeAdapterEnumApi.Codex)).toEqual([])
})
diff --git a/products/posthog_ai/frontend/utils/composerModels.ts b/products/posthog_ai/frontend/utils/composerModels.ts
index c71965fc7ffb..9a307b273255 100644
--- a/products/posthog_ai/frontend/utils/composerModels.ts
+++ b/products/posthog_ai/frontend/utils/composerModels.ts
@@ -10,8 +10,10 @@ import {
} from 'products/tasks/frontend/generated/api.schemas'
import { normalizeModelId } from 'products/tasks/frontend/modelCatalog'
import {
+ CAPABILITY_LADDER_BY_RUNTIME_ADAPTER,
DEFAULT_MODEL_BY_RUNTIME_ADAPTER,
MODELS,
+ REASONING_EFFORT_LABELS,
RUNTIME_OPTIONS,
} from 'products/tasks/frontend/modelCatalog.generated'
@@ -33,14 +35,7 @@ const FALLBACK_EFFORTS: ReasoningEffortEnumApi[] = [
export const DEFAULT_COMPOSER_MODEL = DEFAULT_MODEL_BY_RUNTIME_ADAPTER.claude
export const DEFAULT_COMPOSER_EFFORT: ReasoningEffortEnumApi = ReasoningEffortEnumApi.High
-const EFFORT_LABELS: Record<string, string> = {
- [ReasoningEffortEnumApi.Low]: 'Low',
- [ReasoningEffortEnumApi.Medium]: 'Medium',
- [ReasoningEffortEnumApi.High]: 'High',
- [ReasoningEffortEnumApi.Xhigh]: 'Extra high',
- [ReasoningEffortEnumApi.Max]: 'Max',
- [ReasoningEffortEnumApi.Ultracode]: 'Ultracode',
-}
+const EFFORT_LABELS: Record<string, string> = REASONING_EFFORT_LABELS
// The catalogue is keyed by bare catalog ids, so a provider-qualified id is folded onto the model it names before
// any lookup. A run stored as `anthropic/claude-opus-5` otherwise reads as an unknown model on this surface alone.
@@ -83,6 +78,14 @@ export function modelsForRuntimeAdapter(
return catalogue.filter((option) => option.runtime_adapter === runtimeAdapter)
}
+// 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 {
+ return CAPABILITY_LADDER_BY_RUNTIME_ADAPTER[runtimeAdapter].find(
+ (notch) => notch.effort === DEFAULT_COMPOSER_EFFORT
+ )?.model
+}
+
export function getDefaultModelForRuntimeAdapter(
catalogue: ModelChoiceApi[],
runtimeAdapter: RuntimeAdapterEnumApi,
@@ -90,11 +93,10 @@ export function getDefaultModelForRuntimeAdapter(
): string | null {
const models = modelsForRuntimeAdapter(catalogue, runtimeAdapter)
const preferredModel = configuredModel ? normalizeModelId(configuredModel) : null
+ const ladderModel = ladderDefaultModel(runtimeAdapter)
return (
models.find((option) => option.model === preferredModel)?.model ??
- (runtimeAdapter === RuntimeAdapterEnumApi.Codex
- ? models.find((option) => option.model === 'gpt-5.6-sol')?.model
- : null) ??
+ models.find((option) => option.model === ladderModel)?.model ??
models[0]?.model ??
null
)
@@ -106,26 +108,6 @@ export interface CapabilityNotch {
effort: ReasoningEffortEnumApi
}
-// The curated Faster → Smarter progression per harness, kept in step with the desktop app's ladder in
-// `products/desktop/packages/agent/src/adapters/reasoning-effort.ts` so both surfaces offer the same rungs.
-const CAPABILITY_LADDERS: Record<RuntimeAdapterEnumApi, CapabilityNotch[]> = {
- [RuntimeAdapterEnumApi.Claude]: [
- { model: 'claude-sonnet-5', effort: ReasoningEffortEnumApi.Medium },
- { model: 'claude-sonnet-5', effort: ReasoningEffortEnumApi.High },
- { model: 'claude-opus-5', effort: ReasoningEffortEnumApi.Medium },
- { model: 'claude-opus-5', effort: ReasoningEffortEnumApi.Xhigh },
- { model: 'claude-fable-5-1', effort: ReasoningEffortEnumApi.Max },
- ],
- [RuntimeAdapterEnumApi.Codex]: [
- { model: 'gpt-5.6-terra', effort: ReasoningEffortEnumApi.Low },
- { model: 'gpt-5.6-sol', effort: ReasoningEffortEnumApi.Low },
- { model: 'gpt-5.6-sol', effort: ReasoningEffortEnumApi.Medium },
- { model: 'gpt-5.6-sol', effort: ReasoningEffortEnumApi.High },
- { model: 'gpt-5.6-sol', effort: ReasoningEffortEnumApi.Xhigh },
- { model: 'gpt-6-astra', effort: ReasoningEffortEnumApi.Max },
- ],
-}
-
/**
* The ladder rungs the live catalogue actually serves. A notch naming a model the gateway no longer offers — or an
* effort that model no longer accepts — drops out rather than becoming a stop that fails on send. The picker falls
@@ -135,7 +117,7 @@ export function getCapabilityLadder(
catalogue: ModelChoiceApi[],
runtimeAdapter: RuntimeAdapterEnumApi
): CapabilityNotch[] {
- return (CAPABILITY_LADDERS[runtimeAdapter] ?? []).filter((notch) =>
+ return CAPABILITY_LADDER_BY_RUNTIME_ADAPTER[runtimeAdapter].filter((notch) =>
catalogue.some((option) => option.model === notch.model && option.supported_efforts.includes(notch.effort))
)
}
diff --git a/products/tasks/backend/logic/services/model_catalogue.py b/products/tasks/backend/logic/services/model_catalogue.py
index f14c068a9ed0..de07fabb684b 100644
--- a/products/tasks/backend/logic/services/model_catalogue.py
+++ b/products/tasks/backend/logic/services/model_catalogue.py
@@ -43,22 +43,14 @@ _CACHE_TTL_SECONDS = 30 * 60
_NEGATIVE_CACHE_TTL_SECONDS = 30
_FETCH_TIMEOUT_SECONDS = 3.0
-# Runtime + effort labels are UI strings with no run-config equivalent. A model's display
-# name is resolved by `display_name_for_model`, so a new model names itself and the catalog
-# overrides that only for the ids the derivation gets wrong.
+# A runtime's name is a UI string with no run-config equivalent, so it is written here. A
+# model's comes from `display_name_for_model`, and an effort's from the catalog.
RUNTIME_ADAPTER_DISPLAY_NAMES: dict[str, str] = {
"claude": "Claude (Anthropic)",
"codex": "Codex (OpenAI)",
}
-REASONING_EFFORT_DISPLAY_NAMES: dict[str, str] = {
- "low": "Low",
- "medium": "Medium",
- "high": "High",
- "xhigh": "Extra high",
- "max": "Max",
- "ultracode": "Ultracode",
-}
+REASONING_EFFORT_DISPLAY_NAMES: dict[str, str] = model_catalog.REASONING_EFFORT_LABELS
@dataclass(frozen=True)
diff --git a/products/tasks/backend/model_catalog.py b/products/tasks/backend/model_catalog.py
index c559bbdaff70..9c0e54388afa 100644
--- a/products/tasks/backend/model_catalog.py
+++ b/products/tasks/backend/model_catalog.py
@@ -50,6 +50,16 @@ ULTRACODE = "ultracode"
# this, so a new tier reaches both projections by being added here and nowhere else.
REASONING_EFFORTS: tuple[str, ...] = (LOW, MEDIUM, HIGH, XHIGH, MAX, ULTRACODE)
+# What a picker calls each tier. Sentence case, like every other label in the product.
+REASONING_EFFORT_LABELS: dict[str, str] = {
+ LOW: "Low",
+ MEDIUM: "Medium",
+ HIGH: "High",
+ XHIGH: "Extra high",
+ MAX: "Max",
+ ULTRACODE: "Ultracode",
+}
+
_STANDARD = (LOW, MEDIUM, HIGH)
_THROUGH_MAX = (*_STANDARD, XHIGH, MAX)
_EXTENDED = (*_THROUGH_MAX, ULTRACODE)
@@ -211,6 +221,39 @@ DEFAULT_MODEL_BY_RUNTIME_ADAPTER: dict[str, str] = {
}
+@dataclass(frozen=True)
+class CapabilityNotch:
+ """One stop on a picker's Faster → Smarter slider: a model and the depth it runs at.
+
+ The rungs are a curated ordering over two dimensions, chosen so each is worth its extra
+ cost over the one below, rather than anything derivable from the rest of the catalog.
+ """
+
+ model: str
+ effort: str
+
+
+# Cheapest first. A consumer filters these against what the gateway serves before rendering,
+# so a rung naming a retired model drops out instead of becoming a stop that fails on send.
+CAPABILITY_LADDER_BY_RUNTIME_ADAPTER: dict[str, tuple[CapabilityNotch, ...]] = {
+ CLAUDE: (
+ CapabilityNotch("claude-sonnet-5", MEDIUM),
+ CapabilityNotch("claude-sonnet-5", HIGH),
+ CapabilityNotch("claude-opus-5-5", MEDIUM),
+ CapabilityNotch("claude-opus-5-5", XHIGH),
+ CapabilityNotch("claude-fable-5-1", MAX),
+ ),
+ CODEX: (
+ CapabilityNotch("gpt-6-luna", LOW),
+ CapabilityNotch("gpt-6-sol", LOW),
+ CapabilityNotch("gpt-6-sol", MEDIUM),
+ CapabilityNotch("gpt-6-sol", HIGH),
+ CapabilityNotch("gpt-6-sol", XHIGH),
+ CapabilityNotch("gpt-6-astra", MAX),
+ ),
+}
+
+
RUNTIME_ADAPTERS: tuple[str, ...] = tuple(PROVIDER_BY_RUNTIME_ADAPTER)
RUNTIMES: tuple[str, ...] = tuple(dict.fromkeys(option.runtime for option in RUNTIME_OPTIONS))
@@ -413,6 +456,7 @@ def reasoning_efforts_for(runtime_adapter: str, model_id: str) -> tuple[str, ...
__all__ = [
"ANTHROPIC",
+ "CAPABILITY_LADDER_BY_RUNTIME_ADAPTER",
"CLAUDE",
"CODEX",
"COST_BASELINE_MODEL",
@@ -422,8 +466,10 @@ __all__ = [
"OPENAI",
"PROVIDER_BY_RUNTIME_ADAPTER",
"REASONING_EFFORTS",
+ "REASONING_EFFORT_LABELS",
"access_flag_for_model",
"RUNTIME_ADAPTERS",
+ "CapabilityNotch",
"CatalogModel",
"ModelCost",
"cost_for_model",
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 d8f26d411a3c..3d94291d9ba3 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
@@ -1,4 +1,54 @@
{
+ "capability_ladders": {
+ "claude": [
+ {
+ "effort": "medium",
+ "model": "claude-sonnet-5"
+ },
+ {
+ "effort": "high",
+ "model": "claude-sonnet-5"
+ },
+ {
+ "effort": "medium",
+ "model": "claude-opus-5-5"
+ },
+ {
+ "effort": "xhigh",
+ "model": "claude-opus-5-5"
+ },
+ {
+ "effort": "max",
+ "model": "claude-fable-5-1"
+ }
+ ],
+ "codex": [
+ {
+ "effort": "low",
+ "model": "gpt-6-luna"
+ },
+ {
+ "effort": "low",
+ "model": "gpt-6-sol"
+ },
+ {
+ "effort": "medium",
+ "model": "gpt-6-sol"
+ },
+ {
+ "effort": "high",
+ "model": "gpt-6-sol"
+ },
+ {
+ "effort": "xhigh",
+ "model": "gpt-6-sol"
+ },
+ {
+ "effort": "max",
+ "model": "gpt-6-astra"
+ }
+ ]
+ },
"model_families": [
{
"prefix": "gpt-6-astra",
@@ -55,6 +105,14 @@
"runtime_adapter": "codex"
}
],
+ "reasoning_effort_labels": {
+ "high": "High",
+ "low": "Low",
+ "max": "Max",
+ "medium": "Medium",
+ "ultracode": "Ultracode",
+ "xhigh": "Extra high"
+ },
"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 16d28f584998..860944b53fda 100644
--- a/products/tasks/backend/tests/test_model_catalog.py
+++ b/products/tasks/backend/tests/test_model_catalog.py
@@ -63,6 +63,11 @@ def _resolved_catalog() -> dict[str, Any]:
{"runtime_adapter": adapter, "prefix": prefix, "reasoning_efforts": list(efforts)}
for adapter, prefix, efforts in model_catalog.FAMILY_REASONING_EFFORTS
],
+ "reasoning_effort_labels": dict(model_catalog.REASONING_EFFORT_LABELS),
+ "capability_ladders": {
+ adapter: [{"model": notch.model, "effort": notch.effort} for notch in ladder]
+ for adapter, ladder in model_catalog.CAPABILITY_LADDER_BY_RUNTIME_ADAPTER.items()
+ },
}
@@ -105,6 +110,31 @@ def test_reasoning_effort_enum_covers_the_catalog() -> None:
assert set(model_catalog.REASONING_EFFORTS) <= {effort.value for effort in ReasoningEffort}
+def test_every_effort_has_a_label() -> None:
+ assert set(model_catalog.REASONING_EFFORT_LABELS) == set(model_catalog.REASONING_EFFORTS), (
+ "a depth with no label renders as its raw id in every picker"
+ )
+
+
+def test_every_ladder_rung_is_one_a_run_can_actually_use() -> None:
+ # A surface filters the ladder against what the gateway serves, which cannot hide a rung
+ # the catalog itself contradicts — that one reaches the picker and fails on send.
+ for adapter, ladder in model_catalog.CAPABILITY_LADDER_BY_RUNTIME_ADAPTER.items():
+ for notch in ladder:
+ assert notch.model in model_catalog.models_for_runtime_adapter(adapter), (
+ f"'{adapter}' ladder names '{notch.model}', which that adapter does not drive"
+ )
+ assert notch.effort in model_catalog.reasoning_efforts_for(adapter, notch.model), (
+ f"'{notch.model}' does not support '{notch.effort}', so that rung's run would be rejected"
+ )
+
+
+def test_every_runtime_adapter_has_a_capability_ladder() -> None:
+ assert set(model_catalog.CAPABILITY_LADDER_BY_RUNTIME_ADAPTER) == set(model_catalog.RUNTIME_ADAPTERS), (
+ "an adapter with no ladder leaves its picker without a Faster/Smarter slider"
+ )
+
+
def test_runtime_options_agree_with_the_task_runtime_column() -> None:
assert list(Task.Runtime.values) == list(model_catalog.RUNTIMES)
diff --git a/products/tasks/frontend/components/TaskModelPicker/CyclotronJobInputTaskModel.tsx b/products/tasks/frontend/components/TaskModelPicker/CyclotronJobInputTaskModel.tsx
index a9579aba02c9..ca8e13764a5d 100644
--- a/products/tasks/frontend/components/TaskModelPicker/CyclotronJobInputTaskModel.tsx
+++ b/products/tasks/frontend/components/TaskModelPicker/CyclotronJobInputTaskModel.tsx
@@ -3,12 +3,14 @@ import { LemonSelect } from '@posthog/lemon-ui'
import type { CustomInputRendererProps } from 'lib/components/CyclotronJob/customInputRenderers'
import { normalizeModelId } from 'products/tasks/frontend/modelCatalog'
-import { MODELS } from 'products/tasks/frontend/modelCatalog.generated'
+import { MODELS, REASONING_EFFORT_LABELS } from 'products/tasks/frontend/modelCatalog.generated'
type TaskModelValue = { model: string; reasoning_effort?: string }
const MODEL_OPTIONS = MODELS.map((model) => ({ value: model.id, label: model.label }))
const EFFORTS_BY_MODEL = new Map<string, readonly string[]>(MODELS.map((model) => [model.id, model.reasoningEfforts]))
+// Widened to take the plain strings a stored workflow config carries.
+const EFFORT_LABELS: Record<string, string> = REASONING_EFFORT_LABELS
export default function CyclotronJobInputTaskModel({ value, onChange }: CustomInputRendererProps): JSX.Element {
const selected: Partial<TaskModelValue> = value ?? {}
@@ -52,7 +54,7 @@ export default function CyclotronJobInputTaskModel({ value, onChange }: CustomIn
placeholder="Default effort"
allowClear
value={selected.reasoning_effort ?? null}
- options={efforts.map((effort) => ({ value: effort, label: effort }))}
+ options={efforts.map((effort) => ({ value: effort, label: EFFORT_LABELS[effort] ?? effort }))}
onChange={(effort) =>
onChange(effort ? { model: selectedModel, reasoning_effort: effort } : { model: selectedModel })
}
diff --git a/products/tasks/frontend/modelCatalog.generated.ts b/products/tasks/frontend/modelCatalog.generated.ts
index bff8064dc3da..cb4625689d76 100644
--- a/products/tasks/frontend/modelCatalog.generated.ts
+++ b/products/tasks/frontend/modelCatalog.generated.ts
@@ -43,6 +43,16 @@ export type ReasoningEffort = 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ult
export const REASONING_EFFORTS: readonly ReasoningEffort[] = ['low', 'medium', 'high', 'xhigh', 'max', 'ultracode']
+/** What a picker calls each depth. */
+export const REASONING_EFFORT_LABELS: Record<ReasoningEffort, string> = {
+ low: 'Low',
+ medium: 'Medium',
+ high: 'High',
+ xhigh: 'Extra high',
+ max: 'Max',
+ ultracode: 'Ultracode',
+}
+
/** A value for each runtime adapter. */
export type ByRuntimeAdapter<T> = Record<RuntimeAdapter, T>
@@ -370,6 +380,67 @@ export const DEFAULT_MODEL_BY_RUNTIME_ADAPTER: ByRuntimeAdapter<string> = {
codex: 'gpt-5',
}
+export interface CapabilityNotch {
+ model: string
+ effort: ReasoningEffort
+}
+
+type CapabilityLadders = ByRuntimeAdapter<readonly CapabilityNotch[]>
+
+/** The Faster → Smarter rungs each harness offers, cheapest first. Filter them
+ against what the gateway serves before rendering, so a rung naming a retired
+ model drops out instead of becoming a stop that fails on send. */
+export const CAPABILITY_LADDER_BY_RUNTIME_ADAPTER: CapabilityLadders = {
+ claude: [
+ {
+ model: 'claude-sonnet-5',
+ effort: 'medium',
+ },
+ {
+ model: 'claude-sonnet-5',
+ effort: 'high',
+ },
+ {
+ model: 'claude-opus-5-5',
+ effort: 'medium',
+ },
+ {
+ model: 'claude-opus-5-5',
+ effort: 'xhigh',
+ },
+ {
+ model: 'claude-fable-5-1',
+ effort: 'max',
+ },
+ ],
+ codex: [
+ {
+ model: 'gpt-6-luna',
+ effort: 'low',
+ },
+ {
+ model: 'gpt-6-sol',
+ effort: 'low',
+ },
+ {
+ model: 'gpt-6-sol',
+ effort: 'medium',
+ },
+ {
+ model: 'gpt-6-sol',
+ effort: 'high',
+ },
+ {
+ model: 'gpt-6-sol',
+ effort: 'xhigh',
+ },
+ {
+ model: 'gpt-6-astra',
+ effort: 'max',
+ },
+ ],
+}
+
export interface ModelFamily {
runtimeAdapter: RuntimeAdapter
prefix: string
diff --git a/products/tasks/scripts/build_model_catalog.py b/products/tasks/scripts/build_model_catalog.py
index 55044a9996e0..76213757fa4d 100755
--- a/products/tasks/scripts/build_model_catalog.py
+++ b/products/tasks/scripts/build_model_catalog.py
@@ -107,6 +107,8 @@ def render(catalog: dict[str, Any], style: Style) -> str:
families: tuple[tuple[str, str, tuple[str, ...]], ...] = catalog["FAMILY_REASONING_EFFORTS"]
models: tuple[Any, ...] = catalog["MODELS"]
efforts: tuple[str, ...] = catalog["REASONING_EFFORTS"]
+ effort_labels: dict[str, str] = catalog["REASONING_EFFORT_LABELS"]
+ ladders: dict[str, tuple[Any, ...]] = catalog["CAPABILITY_LADDER_BY_RUNTIME_ADAPTER"]
runtimes: tuple[str, ...] = catalog["RUNTIMES"]
runtime_options: tuple[Any, ...] = catalog["RUNTIME_OPTIONS"]
display_name = catalog["display_name_for_model"]
@@ -159,8 +161,25 @@ def render(catalog: dict[str, Any], style: Style) -> str:
]
)
+ def ladder_entries(adapter: str) -> str:
+ """One adapter's rungs, as an array of objects at depth 1."""
+ notches = "\n".join(
+ "\n".join(
+ [
+ f"{i}{i}{{",
+ f"{i}{i}{i}model: {style.s(notch.model)},",
+ f"{i}{i}{i}effort: {style.s(notch.effort)},",
+ f"{i}{i}}},",
+ ]
+ )
+ for notch in ladders[adapter]
+ )
+ return f"{i}{adapter}: [\n{notches}\n{i}],"
+
model_entries = "\n".join(model_entry(model) for model in models)
runtime_option_entries = "\n".join(runtime_option_entry(option) for option in runtime_options)
+ effort_label_entries = "\n".join(f"{i}{effort}: {style.s(effort_labels[effort])}," for effort in efforts)
+ ladder_adapter_entries = "\n".join(ladder_entries(adapter) for adapter in adapters)
provider_entries = "\n".join(f"{i}{adapter}: {style.s(providers[adapter])}," for adapter in adapters)
default_entries = "\n".join(f"{i}{adapter}: {style.s(defaults[adapter])}," for adapter in adapters)
fallback_entries = "\n".join(
@@ -202,6 +221,11 @@ export const RUNTIME_OPTIONS: readonly RuntimeOption[] = [
{style.array(efforts, prefix="export const REASONING_EFFORTS: readonly ReasoningEffort[] = ", suffix=semi, depth=0)}
+/** What a picker calls each depth. */
+export const REASONING_EFFORT_LABELS: Record<ReasoningEffort, string> = {{
+{effort_label_entries}
+}}{semi}
+
/** A value for each runtime adapter. */
export type ByRuntimeAdapter<T> = Record<RuntimeAdapter, T>{semi}
@@ -258,6 +282,20 @@ export const DEFAULT_MODEL_BY_RUNTIME_ADAPTER: ByRuntimeAdapter<string> = {{
{default_entries}
}}{semi}
+export interface CapabilityNotch {{
+{i}model: string{semi}
+{i}effort: ReasoningEffort{semi}
+}}
+
+type CapabilityLadders = ByRuntimeAdapter<readonly CapabilityNotch[]>{semi}
+
+/** The Faster → Smarter rungs each harness offers, cheapest first. Filter them
+ against what the gateway serves before rendering, so a rung naming a retired
+ model drops out instead of becoming a stop that fails on send. */
+export const CAPABILITY_LADDER_BY_RUNTIME_ADAPTER: CapabilityLadders = {{
+{ladder_adapter_entries}
+}}{semi}
+
export interface ModelFamily {{
{i}runtimeAdapter: RuntimeAdapter{semi}
{i}prefix: string{semi}