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.

feat(tasks): add gpt-6.1-sol to agent model choices (#109057)

Georgiy Tarasovcafb52c378f5
diff --git a/docs/internal/task-run-api.md b/docs/internal/task-run-api.md
index 4a48821d8771..e0fe6a202797 100644
--- a/docs/internal/task-run-api.md
+++ b/docs/internal/task-run-api.md
@@ -45,6 +45,13 @@ The `state` field must be a JSON object.
Run responses omit internal cost accounting, including gateway request IDs.
+## Model selection
+
+Task runs accept `gpt-6.1-sol` with the `codex` runtime adapter and `low`, `medium`, `high`, `xhigh`, or `max` reasoning effort.
+The task model catalog supplies the web and Desktop pickers with the model name, reasoning levels, and public price comparison.
+The gateway must list the model for the task's product before the picker offers it.
+Adding the model does not change the default model or the capability slider.
+
## Event delivery
Cloud runs send live events through event ingest. Clients can replay only events mirrored into the backend stream.
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 f51a6e163655..2302ee5ad961 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
@@ -76,6 +76,28 @@ describe("resolvePosthogPiModelCatalog", () => {
expect(fable51.thinkingLevels).not.toContain("off");
});
+ it("uses the GPT-6.1 Sol thinking levels before Pi adds the model", () => {
+ const [model] = resolvePosthogPiModelCatalog(
+ [
+ {
+ id: "gpt-6.1-sol",
+ context_window: 1_050_000,
+ supports_vision: true,
+ allowed: true,
+ },
+ ],
+ "us",
+ );
+
+ expect(model.thinkingLevels).toEqual([
+ "low",
+ "medium",
+ "high",
+ "xhigh",
+ "max",
+ ]);
+ });
+
it("marks the default model without changing catalog order", () => {
const models = resolvePosthogPiModelCatalog(
[
@@ -112,6 +134,7 @@ describe("resolvePosthogPiModelCatalog", () => {
["gpt-5.6-terra", "GPT-5.6 Terra"],
["gpt-5.6-luna", "GPT-5.6 Luna"],
["gpt-6-astra", "GPT-6 Astra"],
+ ["gpt-6.1-sol", "GPT-6.1 Sol"],
["zai-org/glm-5.3", "GLM-5.3"],
["moonshotai/kimi-k3", "Kimi K3"],
["deepseek-ai/deepseek-v4-flash-0731", "DeepSeek V4 Flash"],
diff --git a/products/desktop/packages/harness/src/extensions/posthog-provider/models.test.ts b/products/desktop/packages/harness/src/extensions/posthog-provider/models.test.ts
index 92f8c86f98c7..f95b14436330 100644
--- a/products/desktop/packages/harness/src/extensions/posthog-provider/models.test.ts
+++ b/products/desktop/packages/harness/src/extensions/posthog-provider/models.test.ts
@@ -233,12 +233,15 @@ describe("resolveModelConfigs", () => {
});
describe("fallbackModelConfigs", () => {
- it("includes GPT-6 Astra with its gateway capabilities", () => {
+ it.each([
+ ["gpt-6-astra", 922000],
+ ["gpt-6.1-sol", 1050000],
+ ])("includes %s with its gateway capabilities", (id, contextWindow) => {
expect(fallbackModelConfigs("us")).toContainEqual(
expect.objectContaining({
- id: "gpt-6-astra",
+ id,
api: "openai-responses",
- contextWindow: 922000,
+ contextWindow,
maxTokens: 128000,
}),
);
diff --git a/products/desktop/packages/harness/src/extensions/posthog-provider/models.ts b/products/desktop/packages/harness/src/extensions/posthog-provider/models.ts
index bb60e1fb2f8d..9e0799972202 100644
--- a/products/desktop/packages/harness/src/extensions/posthog-provider/models.ts
+++ b/products/desktop/packages/harness/src/extensions/posthog-provider/models.ts
@@ -31,6 +31,12 @@ const ZERO_COST = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
const THINKING_LEVEL_MAP_OVERRIDES: Record<string, ThinkingLevelMap> = {
"claude-fable-5-1": { off: null, xhigh: "xhigh", max: "max" },
"claude-opus-5-5": { off: null, xhigh: "xhigh", max: "max" },
+ "gpt-6.1-sol": {
+ off: null,
+ minimal: null,
+ xhigh: "xhigh",
+ max: "max",
+ },
};
function findBuiltinModel(family: ModelFamily, id: string) {
@@ -188,6 +194,12 @@ const FALLBACK_GATEWAY_MODELS: GatewayModel[] = [
context_window: 922000,
supports_vision: true,
},
+ {
+ id: "gpt-6.1-sol",
+ owned_by: "openai",
+ context_window: 1050000,
+ supports_vision: true,
+ },
{
id: "gpt-6-sol",
owned_by: "openai",
diff --git a/products/desktop/packages/shared/src/model-catalog.generated.ts b/products/desktop/packages/shared/src/model-catalog.generated.ts
index a2fea8251938..13f03bc8ffc8 100644
--- a/products/desktop/packages/shared/src/model-catalog.generated.ts
+++ b/products/desktop/packages/shared/src/model-catalog.generated.ts
@@ -72,9 +72,16 @@ export type ByRuntimeAdapter<T> = Record<RuntimeAdapter, T>;
/** Efforts per adapter, absent where the adapter has no fallback. */
type FallbackEfforts = Partial<ByRuntimeAdapter<readonly ReasoningEffort[]>>;
+export interface LongContextCost {
+ aboveInputTokens: number;
+ inputPerMtok: number;
+ outputPerMtok: number;
+}
+
export interface ModelCost {
inputPerMtok: number;
outputPerMtok: number;
+ longContext?: LongContextCost;
}
export interface CatalogModel {
@@ -89,12 +96,12 @@ export interface CatalogModel {
means generally available. Governs display only — the server decides
whether a run may use it. */
accessFlag?: string;
- /** List price in US dollars per million tokens. Absent for a model no
+ /** Base list price in US dollars per million tokens. Absent for a model no
public price list covers, which a picker shows with no cost at all. */
cost?: ModelCost;
/** Per-token cost against Claude Sonnet 5, ready to render: `2.5×`,
- `≈0.55×`. Prefixed when input and output rates diverge enough that one
- number flatters either. Absent whenever `cost` is. */
+ `≈0.55×`, or `1× base`. Prefixed when input and output rates diverge
+ enough that one number flatters either. Absent whenever `cost` is. */
costMultiplier?: string;
/** The rates behind the multiplier, ready to render. Absent whenever
`cost` is. */
@@ -399,6 +406,24 @@ export const MODELS: readonly CatalogModel[] = [
costMultiplier: "1×",
costSummary: "Input $2 · Output $10 per 1M tokens",
},
+ {
+ id: "gpt-6.1-sol",
+ runtimeAdapter: "codex",
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
+ label: "GPT-6.1 Sol",
+ cost: {
+ inputPerMtok: 2,
+ outputPerMtok: 10,
+ longContext: {
+ aboveInputTokens: 272000,
+ inputPerMtok: 4,
+ outputPerMtok: 15,
+ },
+ },
+ costMultiplier: "1× base",
+ costSummary:
+ "Per 1M tokens: $2 input/$10 output to 272K; $4 input/$15 output above",
+ },
{
id: "gpt-6-luna",
runtimeAdapter: "codex",
@@ -501,6 +526,11 @@ export const FAMILY_REASONING_EFFORTS: readonly ModelFamily[] = [
prefix: "gpt-6-sol",
reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
},
+ {
+ runtimeAdapter: "codex",
+ prefix: "gpt-6.1-sol",
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
+ },
{
runtimeAdapter: "codex",
prefix: "gpt-6-luna",
diff --git a/products/posthog_ai/frontend/logics/modelCatalogueLogic.test.ts b/products/posthog_ai/frontend/logics/modelCatalogueLogic.test.ts
index 46d74118e743..e248c0dc5824 100644
--- a/products/posthog_ai/frontend/logics/modelCatalogueLogic.test.ts
+++ b/products/posthog_ai/frontend/logics/modelCatalogueLogic.test.ts
@@ -88,6 +88,7 @@ describe('modelCatalogueLogic', () => {
// access flag fails closed, so a flag left on the catalog row after its rollout finished
// took them off the composer for anyone the flag service could not answer for.
it.each([
+ 'gpt-6.1-sol',
'deepseek-ai/deepseek-v4-flash-0731',
'@cf/zai-org/glm-5.2',
'zai-org/glm-5.3',
diff --git a/products/slack_app/backend/tests/services/test_run_preferences.py b/products/slack_app/backend/tests/services/test_run_preferences.py
index 7d70de43ef36..b60620b77925 100644
--- a/products/slack_app/backend/tests/services/test_run_preferences.py
+++ b/products/slack_app/backend/tests/services/test_run_preferences.py
@@ -217,7 +217,7 @@ class TestAvailableModelChoices:
choices = available_model_choices()
models = {c.model for c in choices}
- assert {"claude-sonnet-5", "gpt-5.6-sol", "zai-org/glm-5.3"} <= models
+ assert {"claude-sonnet-5", "gpt-5.6-sol", "gpt-6.1-sol", "zai-org/glm-5.3"} <= models
assert all(c.label and c.runtime_adapter for c in choices)
diff --git a/products/slack_app/evals/eval_model_classifier.py b/products/slack_app/evals/eval_model_classifier.py
index bf36b026e506..9bdbdd9bfde2 100644
--- a/products/slack_app/evals/eval_model_classifier.py
+++ b/products/slack_app/evals/eval_model_classifier.py
@@ -64,6 +64,7 @@ CHOICES: tuple[ModelChoice, ...] = (
ModelChoice("codex", "gpt-5.6-sol", "GPT-5.6 Sol", _MAX),
ModelChoice("codex", "gpt-5.6-terra", "GPT-5.6 Terra", _MAX),
ModelChoice("codex", "gpt-5.6-luna", "GPT-5.6 Luna", _MAX),
+ ModelChoice("codex", "gpt-6.1-sol", "GPT-6.1 Sol", _MAX),
ModelChoice("codex", "gpt-5.5", "GPT-5.5", _XHIGH),
ModelChoice("codex", "gpt-5.4", "GPT-5.4", _STANDARD),
ModelChoice("codex", "gpt-5.3-codex", "GPT-5.3 Codex", _STANDARD),
@@ -125,6 +126,11 @@ INSTRUCTION_CASES = [
prompt="@PostHog use openai luna and work out why the nightly export job stalls at 90%",
expected=_asks(model="gpt-5.6-luna"),
),
+ BaseEvalCase(
+ name="decimal_model_version",
+ prompt="@PostHog use GPT-6.1 Sol at max effort to fix the retry loop in the export worker",
+ expected=_asks(model="gpt-6.1-sol", reasoning_effort="max"),
+ ),
# Two Opus versions are listed and the author named neither; the newest is what they
# mean by "opus".
BaseEvalCase(
diff --git a/products/tasks/backend/model_catalog.py b/products/tasks/backend/model_catalog.py
index c6e756d2e7a1..13040f9e1368 100644
--- a/products/tasks/backend/model_catalog.py
+++ b/products/tasks/backend/model_catalog.py
@@ -68,9 +68,16 @@ _GLM = (HIGH, MAX)
_NO_EFFORT: tuple[str, ...] = ()
+@dataclass(frozen=True, kw_only=True)
+class LongContextCost:
+ above_input_tokens: int
+ input_per_mtok: float
+ output_per_mtok: float
+
+
@dataclass(frozen=True)
class ModelCost:
- """List price in US dollars per million tokens, not the negotiated rate PostHog pays.
+ """Base list price in US dollars per million tokens, not PostHog's negotiated rate.
A picker states a comparison between models, and a negotiated rate would make it one
nobody outside PostHog could check.
@@ -78,6 +85,7 @@ class ModelCost:
input_per_mtok: float
output_per_mtok: float
+ long_context: LongContextCost | None = None
@dataclass(frozen=True)
@@ -166,6 +174,11 @@ _GPT_MID_COST = ModelCost(2.5, 15)
_GPT_LIGHT_COST = ModelCost(1, 6)
_GPT_FRONTIER_COST = ModelCost(10, 50)
_GPT_6_SOL_COST = ModelCost(2, 10)
+_GPT_6_1_SOL_COST = ModelCost(
+ 2,
+ 10,
+ long_context=LongContextCost(above_input_tokens=272_000, input_per_mtok=4, output_per_mtok=15),
+)
_GPT_6_LUNA_COST = ModelCost(0.1, 0.5)
MODELS: tuple[CatalogModel, ...] = (
@@ -238,6 +251,7 @@ MODELS: tuple[CatalogModel, ...] = (
CatalogModel("gpt-5.6-luna", CODEX, _THROUGH_MAX, cost=_GPT_LIGHT_COST),
CatalogModel("gpt-6-astra", CODEX, _THROUGH_MAX, cost=_GPT_FRONTIER_COST),
CatalogModel("gpt-6-sol", CODEX, _THROUGH_MAX, cost=_GPT_6_SOL_COST),
+ CatalogModel("gpt-6.1-sol", CODEX, _THROUGH_MAX, cost=_GPT_6_1_SOL_COST),
CatalogModel("gpt-6-luna", CODEX, _THROUGH_MAX, cost=_GPT_6_LUNA_COST),
)
@@ -248,6 +262,7 @@ MODELS: tuple[CatalogModel, ...] = (
FAMILY_REASONING_EFFORTS: tuple[tuple[str, str, tuple[str, ...]], ...] = (
(CODEX, "gpt-6-astra", _THROUGH_MAX),
(CODEX, "gpt-6-sol", _THROUGH_MAX),
+ (CODEX, "gpt-6.1-sol", _THROUGH_MAX),
(CODEX, "gpt-6-luna", _THROUGH_MAX),
(CODEX, "gpt-5.6", _THROUGH_MAX),
(CODEX, "gpt-5.5", (*_STANDARD, XHIGH)),
@@ -482,7 +497,7 @@ def _format_multiplier(multiplier: float) -> str:
def cost_multiplier_label(model_id: str) -> str | None:
- """The multiplier a picker shows beside a model, `2.5×` or `≈0.55×`, or ``None``.
+ """The multiplier a picker shows, such as `2.5×`, `≈0.55×`, or `1× base`.
Resolved here so the web composer, the Slack picker and the desktop app cannot quote one
model differently.
@@ -491,16 +506,26 @@ def cost_multiplier_label(model_id: str) -> str | None:
if resolved is None:
return None
multiplier, approximate = resolved
- return f"{'≈' if approximate else ''}{_format_multiplier(multiplier)}×"
+ base_label = f"{'≈' if approximate else ''}{_format_multiplier(multiplier)}×"
+ cost = cost_for_model(model_id)
+ return f"{base_label} base" if cost and cost.long_context else base_label
def format_cost_rates(cost: ModelCost) -> str:
- """The rates behind a multiplier, for a tooltip: `Input $2 · Output $10 per 1M tokens`."""
+ """The rates behind a multiplier, including a long-context tier when one exists."""
def money(amount: float) -> str:
return f"${amount:.0f}" if float(amount).is_integer() else f"${amount:.2f}"
- return f"Input {money(cost.input_per_mtok)} · Output {money(cost.output_per_mtok)} per 1M tokens"
+ base_rates = f"Input {money(cost.input_per_mtok)} · Output {money(cost.output_per_mtok)} per 1M tokens"
+ if cost.long_context is None:
+ return base_rates
+
+ tier = cost.long_context
+ threshold = f"{tier.above_input_tokens // 1_000}K"
+ base_context_rates = f"{money(cost.input_per_mtok)} input/{money(cost.output_per_mtok)} output"
+ long_context_rates = f"{money(tier.input_per_mtok)} input/{money(tier.output_per_mtok)} output"
+ return f"Per 1M tokens: {base_context_rates} to {threshold}; {long_context_rates} above"
def reasoning_efforts_for(runtime_adapter: str, model_id: str) -> tuple[str, ...]:
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 d14c4f6115fc..162173472c66 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
@@ -72,6 +72,17 @@
],
"runtime_adapter": "codex"
},
+ {
+ "prefix": "gpt-6.1-sol",
+ "reasoning_efforts": [
+ "low",
+ "medium",
+ "high",
+ "xhigh",
+ "max"
+ ],
+ "runtime_adapter": "codex"
+ },
{
"prefix": "gpt-6-luna",
"reasoning_efforts": [
@@ -414,6 +425,19 @@
],
"supports_1m_context": false,
"supports_fast_mode": false
+ },
+ "gpt-6.1-sol": {
+ "cost_multiplier": "1× base",
+ "offered": true,
+ "reasoning_efforts": [
+ "low",
+ "medium",
+ "high",
+ "xhigh",
+ "max"
+ ],
+ "supports_1m_context": false,
+ "supports_fast_mode": false
}
},
"provider": "openai"
diff --git a/products/tasks/backend/tests/test_model_catalog.py b/products/tasks/backend/tests/test_model_catalog.py
index 195bb840e7f9..520e3f4c11a0 100644
--- a/products/tasks/backend/tests/test_model_catalog.py
+++ b/products/tasks/backend/tests/test_model_catalog.py
@@ -165,6 +165,7 @@ def test_cost_baseline_is_a_model_the_catalog_prices() -> None:
("claude-opus-5", "2.5×"),
("anthropic/claude-opus-5", "2.5×"),
("gpt-5.6-sol", "≈2.8×"),
+ ("gpt-6.1-sol", "1× base"),
("zai-org/glm-5.3-flash", "≈0.06×"),
("gpt-5", None),
("claude-imaginary-9", None),
@@ -174,6 +175,7 @@ def test_cost_baseline_is_a_model_the_catalog_prices() -> None:
"input_and_output_agree",
"provider_qualified_id",
"diverging_rates_are_approximate",
+ "tiered_model_marks_base_rate",
"cheap_model_keeps_two_decimals",
"unpriced_model",
"unknown_model",
@@ -183,6 +185,14 @@ def test_cost_multiplier_reads_against_the_baseline(model: str, expected: str |
assert model_catalog.cost_multiplier_label(model) == expected
+def test_tiered_cost_summary_describes_both_rates() -> None:
+ cost = model_catalog.cost_for_model("gpt-6.1-sol")
+ assert cost is not None
+ assert model_catalog.format_cost_rates(cost) == (
+ "Per 1M tokens: $2 input/$10 output to 272K; $4 input/$15 output above"
+ )
+
+
def test_labels_are_set_only_where_the_derived_name_is_wrong() -> None:
# A pin that the formatter would produce anyway is dead weight that outlives the
# formatter improving, so assert the property rather than restating the six strings.
diff --git a/products/tasks/frontend/modelCatalog.generated.ts b/products/tasks/frontend/modelCatalog.generated.ts
index c6277afb3a48..f74d36483613 100644
--- a/products/tasks/frontend/modelCatalog.generated.ts
+++ b/products/tasks/frontend/modelCatalog.generated.ts
@@ -59,9 +59,16 @@ export type ByRuntimeAdapter<T> = Record<RuntimeAdapter, T>
/** Efforts per adapter, absent where the adapter has no fallback. */
type FallbackEfforts = Partial<ByRuntimeAdapter<readonly ReasoningEffort[]>>
+export interface LongContextCost {
+ aboveInputTokens: number
+ inputPerMtok: number
+ outputPerMtok: number
+}
+
export interface ModelCost {
inputPerMtok: number
outputPerMtok: number
+ longContext?: LongContextCost
}
export interface CatalogModel {
@@ -76,12 +83,12 @@ export interface CatalogModel {
means generally available. Governs display only — the server decides
whether a run may use it. */
accessFlag?: string
- /** List price in US dollars per million tokens. Absent for a model no
+ /** Base list price in US dollars per million tokens. Absent for a model no
public price list covers, which a picker shows with no cost at all. */
cost?: ModelCost
/** Per-token cost against Claude Sonnet 5, ready to render: `2.5×`,
- `≈0.55×`. Prefixed when input and output rates diverge enough that one
- number flatters either. Absent whenever `cost` is. */
+ `≈0.55×`, or `1× base`. Prefixed when input and output rates diverge
+ enough that one number flatters either. Absent whenever `cost` is. */
costMultiplier?: string
/** The rates behind the multiplier, ready to render. Absent whenever
`cost` is. */
@@ -386,6 +393,23 @@ export const MODELS: readonly CatalogModel[] = [
costMultiplier: '1×',
costSummary: 'Input $2 · Output $10 per 1M tokens',
},
+ {
+ id: 'gpt-6.1-sol',
+ runtimeAdapter: 'codex',
+ reasoningEfforts: ['low', 'medium', 'high', 'xhigh', 'max'],
+ label: 'GPT-6.1 Sol',
+ cost: {
+ inputPerMtok: 2,
+ outputPerMtok: 10,
+ longContext: {
+ aboveInputTokens: 272000,
+ inputPerMtok: 4,
+ outputPerMtok: 15,
+ },
+ },
+ costMultiplier: '1× base',
+ costSummary: 'Per 1M tokens: $2 input/$10 output to 272K; $4 input/$15 output above',
+ },
{
id: 'gpt-6-luna',
runtimeAdapter: 'codex',
@@ -488,6 +512,11 @@ export const FAMILY_REASONING_EFFORTS: readonly ModelFamily[] = [
prefix: 'gpt-6-sol',
reasoningEfforts: ['low', 'medium', 'high', 'xhigh', 'max'],
},
+ {
+ runtimeAdapter: 'codex',
+ prefix: 'gpt-6.1-sol',
+ reasoningEfforts: ['low', 'medium', 'high', 'xhigh', 'max'],
+ },
{
runtimeAdapter: 'codex',
prefix: 'gpt-6-luna',
diff --git a/products/tasks/scripts/model_catalog_projection.py b/products/tasks/scripts/model_catalog_projection.py
index df7cd42ead2a..098252bafeea 100755
--- a/products/tasks/scripts/model_catalog_projection.py
+++ b/products/tasks/scripts/model_catalog_projection.py
@@ -122,14 +122,35 @@ def render_catalog(catalog: dict[str, Any], style: Style) -> str:
"""
if model.cost is None:
return []
- return [
+ lines = [
f"{i}{i}cost: {{",
f"{i}{i}{i}inputPerMtok: {style.n(model.cost.input_per_mtok)},",
f"{i}{i}{i}outputPerMtok: {style.n(model.cost.output_per_mtok)},",
- f"{i}{i}}},",
- f"{i}{i}costMultiplier: {style.s(multiplier_label(model.id))},",
- f"{i}{i}costSummary: {style.s(cost_rates(model.cost))},",
]
+ if model.cost.long_context:
+ tier = model.cost.long_context
+ lines.extend(
+ [
+ f"{i}{i}{i}longContext: {{",
+ f"{i}{i}{i}{i}aboveInputTokens: {tier.above_input_tokens},",
+ f"{i}{i}{i}{i}inputPerMtok: {style.n(tier.input_per_mtok)},",
+ f"{i}{i}{i}{i}outputPerMtok: {style.n(tier.output_per_mtok)},",
+ f"{i}{i}{i}}},",
+ ]
+ )
+ lines.extend(
+ [
+ f"{i}{i}}},",
+ f"{i}{i}costMultiplier: {style.s(multiplier_label(model.id))},",
+ ]
+ )
+ summary = style.s(cost_rates(model.cost))
+ summary_line = f"{i}{i}costSummary: {summary},"
+ if len(summary_line) <= style.width:
+ lines.append(summary_line)
+ else:
+ lines.extend([f"{i}{i}costSummary:", f"{i}{i}{i}{summary},"])
+ return lines
def model_entry(model: Any) -> str:
return "\n".join(
@@ -230,9 +251,16 @@ export type ByRuntimeAdapter<T> = Record<RuntimeAdapter, T>{semi}
/** Efforts per adapter, absent where the adapter has no fallback. */
type FallbackEfforts = Partial<ByRuntimeAdapter<readonly ReasoningEffort[]>>{semi}
+export interface LongContextCost {{
+{i}aboveInputTokens: number{semi}
+{i}inputPerMtok: number{semi}
+{i}outputPerMtok: number{semi}
+}}
+
export interface ModelCost {{
{i}inputPerMtok: number{semi}
{i}outputPerMtok: number{semi}
+{i}longContext?: LongContextCost{semi}
}}
export interface CatalogModel {{
@@ -247,12 +275,12 @@ export interface CatalogModel {{
{i} means generally available. Governs display only — the server decides
{i} whether a run may use it. */
{i}accessFlag?: string{semi}
-{i}/** List price in US dollars per million tokens. Absent for a model no
+{i}/** Base list price in US dollars per million tokens. Absent for a model no
{i} public price list covers, which a picker shows with no cost at all. */
{i}cost?: ModelCost{semi}
{i}/** Per-token cost against {baseline_label}, ready to render: `2.5×`,
-{i} `≈0.55×`. Prefixed when input and output rates diverge enough that one
-{i} number flatters either. Absent whenever `cost` is. */
+{i} `≈0.55×`, or `1× base`. Prefixed when input and output rates diverge
+{i} enough that one number flatters either. Absent whenever `cost` is. */
{i}costMultiplier?: string{semi}
{i}/** The rates behind the multiplier, ready to render. Absent whenever
{i} `cost` is. */
diff --git a/services/llm-gateway/PARITY.md b/services/llm-gateway/PARITY.md
index 1b379b434977..738e5999e7ed 100644
--- a/services/llm-gateway/PARITY.md
+++ b/services/llm-gateway/PARITY.md
@@ -62,6 +62,9 @@ The Go catalog serves GLM 5.2 only, and Baseten on Go still depends on the provi
`gpt-6-astra` is also Python-only because the Go catalog does not serve it, while Desktop, Code, and cloud agents require the Python product policy above.
`claude-opus-5-5`, `gpt-6-sol` and `gpt-6-luna` stay Python-only for the same reason: the Go catalog does not serve them.
+`gpt-6.1-sol` uses the Python product policies for Desktop, Code, Slack tasks, and background agents.
+These callers still require the OAuth application restrictions and product billing policies above, even when the Go catalog discovers the model.
+
### 🔎 Verify before switching
These are compatibility checks, not automatic blockers:
diff --git a/services/llm-gateway/src/llm_gateway/products/config.py b/services/llm-gateway/src/llm_gateway/products/config.py
index 7cafacc885a9..1ad1eae74ed0 100644
--- a/services/llm-gateway/src/llm_gateway/products/config.py
+++ b/services/llm-gateway/src/llm_gateway/products/config.py
@@ -104,6 +104,7 @@ _POSTHOG_CODE_AGENT_MODELS: Final[frozenset[str]] = frozenset(
"gpt-5-mini",
"gpt-6-astra",
"gpt-6-sol",
+ "gpt-6.1-sol",
"gpt-6-luna",
"@cf/zai-org/glm-5.2",
"zai-org/glm-5.3",
@@ -176,6 +177,7 @@ PRODUCTS: Final[dict[str, ProductConfig]] = {
"gpt-5.6-sol",
"gpt-6-astra",
"gpt-6-sol",
+ "gpt-6.1-sol",
"gpt-6-luna",
}
| BEDROCK_MODELS
diff --git a/services/llm-gateway/src/llm_gateway/rate_limiting/model_cost_overrides.py b/services/llm-gateway/src/llm_gateway/rate_limiting/model_cost_overrides.py
index f1f3ebcd516f..8004e1db9b5c 100644
--- a/services/llm-gateway/src/llm_gateway/rate_limiting/model_cost_overrides.py
+++ b/services/llm-gateway/src/llm_gateway/rate_limiting/model_cost_overrides.py
@@ -158,6 +158,41 @@ MODEL_COST_OVERRIDES: Final[dict[str, ModelCost]] = {
"supports_vision": True,
"supports_prompt_caching": True,
},
+ "gpt-6.1-sol": cast(
+ "ModelCost",
+ {
+ "litellm_provider": "openai",
+ "mode": "responses",
+ "max_input_tokens": 1_050_000,
+ "max_output_tokens": 128_000,
+ "input_cost_per_token": 2e-06,
+ "output_cost_per_token": 1e-05,
+ "cache_read_input_token_cost": 1e-07,
+ "cache_creation_input_token_cost": 2.5e-06,
+ "input_cost_per_token_above_272k_tokens": 4e-06,
+ "output_cost_per_token_above_272k_tokens": 1.5e-05,
+ "cache_read_input_token_cost_above_272k_tokens": 2e-07,
+ "cache_creation_input_token_cost_above_272k_tokens": 5e-06,
+ "input_cost_per_token_flex": 1e-06,
+ "output_cost_per_token_flex": 5e-06,
+ "cache_read_input_token_cost_flex": 5e-08,
+ "cache_creation_input_token_cost_flex": 1.25e-06,
+ "input_cost_per_token_above_272k_tokens_flex": 2e-06,
+ "output_cost_per_token_above_272k_tokens_flex": 7.5e-06,
+ "cache_read_input_token_cost_above_272k_tokens_flex": 1e-07,
+ "cache_creation_input_token_cost_above_272k_tokens_flex": 2.5e-06,
+ "input_cost_per_token_priority": 4e-06,
+ "output_cost_per_token_priority": 2e-05,
+ "cache_read_input_token_cost_priority": 2e-07,
+ "cache_creation_input_token_cost_priority": 5e-06,
+ "input_cost_per_token_above_272k_tokens_priority": 8e-06,
+ "output_cost_per_token_above_272k_tokens_priority": 3e-05,
+ "cache_read_input_token_cost_above_272k_tokens_priority": 4e-07,
+ "cache_creation_input_token_cost_above_272k_tokens_priority": 1e-05,
+ "supports_vision": True,
+ "supports_prompt_caching": True,
+ },
+ ),
"gpt-6-luna": {
"litellm_provider": "openai",
"mode": "responses",
diff --git a/services/llm-gateway/tests/test_model_cost_overrides.py b/services/llm-gateway/tests/test_model_cost_overrides.py
index e41e5fa5b1a8..0ccd34f542b8 100644
--- a/services/llm-gateway/tests/test_model_cost_overrides.py
+++ b/services/llm-gateway/tests/test_model_cost_overrides.py
@@ -107,9 +107,18 @@ class TestOverrideSurfacesThroughRefresh:
ModelCostService.reset_instance()
ModelRegistryService.reset_instance()
- @pytest.mark.parametrize("model", ["claude-fable-5", "claude-fable-5-1"])
+ @pytest.mark.parametrize(
+ "model,provider,context_window",
+ [
+ ("claude-fable-5", "anthropic", 200_000),
+ ("claude-fable-5-1", "anthropic", 200_000),
+ ("gpt-6.1-sol", "openai", 1_050_000),
+ ],
+ )
@patch("llm_gateway.rate_limiting.model_cost_service.get_model_cost_map")
- def test_refresh_injects_fable_when_upstream_missing(self, mock_get_cost_map: MagicMock, model: str) -> None:
+ def test_refresh_injects_model_when_upstream_missing(
+ self, mock_get_cost_map: MagicMock, model: str, provider: str, context_window: int
+ ) -> None:
mock_get_cost_map.return_value = {
"claude-opus-4-8": {
"litellm_provider": "anthropic",
@@ -123,11 +132,12 @@ class TestOverrideSurfacesThroughRefresh:
costs = service.get_costs(model)
assert costs is not None
- assert costs["litellm_provider"] == "anthropic"
+ assert costs["litellm_provider"] == provider
+ assert costs["max_input_tokens"] == context_window
assert model in service.get_all_models()
@patch("llm_gateway.rate_limiting.model_cost_service.get_model_cost_map")
- def test_fable_5_listed_for_posthog_code(self, mock_get_cost_map: MagicMock) -> None:
+ def test_bridge_models_listed_for_posthog_code(self, mock_get_cost_map: MagicMock) -> None:
mock_get_cost_map.return_value = {
"claude-opus-4-8": {
"litellm_provider": "anthropic",
@@ -138,7 +148,7 @@ class TestOverrideSurfacesThroughRefresh:
ModelCostService.get_instance()._refresh_cache()
settings = MagicMock()
- settings.openai_api_key = None
+ settings.openai_api_key = "sk-test"
settings.anthropic_api_key = "sk-ant-test"
settings.openrouter_api_key = None
settings.fireworks_api_key = None
@@ -155,3 +165,4 @@ class TestOverrideSurfacesThroughRefresh:
assert "claude-opus-4-8" in model_ids
assert "claude-fable-5" in model_ids
assert "claude-fable-5-1" in model_ids
+ assert "gpt-6.1-sol" in model_ids
diff --git a/services/llm-gateway/tests/test_product_config.py b/services/llm-gateway/tests/test_product_config.py
index ec7945fa8b21..3aa943f50300 100644
--- a/services/llm-gateway/tests/test_product_config.py
+++ b/services/llm-gateway/tests/test_product_config.py
@@ -230,6 +230,7 @@ class TestCheckProductAccess:
"gpt-5.2",
"gpt-5-mini",
"gpt-6-astra",
+ "gpt-6.1-sol",
"deepseek-ai/deepseek-v4-flash-0731",
],
)
@@ -388,6 +389,7 @@ class TestCheckProductAccess:
"gpt-5.6-luna",
"gpt-5.6-sol",
"gpt-6-astra",
+ "gpt-6.1-sol",
],
)
def test_background_agents_allows_configured_models(self, model: str):