: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(ai): add gpt-6-astra across products (#95738)
Peter Kirkham6da1cca4a7c3
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.tsindex 3df008e07bc9..45d59a2148e7 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@@ -26,6 +26,7 @@ describe("getReasoningEffortOptions", () => {);it.each([+ "gpt-6-astra","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna",@@ -51,7 +52,8 @@ describe("getReasoningEffortOptions", () => {});describe("supportsXhighEffort", () => {- it("is true for the gpt-5.5 family and false for other models", () => {+ it("is true for current GPT families and false for other models", () => {+ expect(supportsXhighEffort("gpt-6-astra")).toBe(true);expect(supportsXhighEffort("gpt-5.5-codex")).toBe(true);expect(supportsXhighEffort("GPT-5.5")).toBe(true);expect(supportsXhighEffort("gpt-5.3-codex")).toBe(false);@@ -59,7 +61,8 @@ describe("supportsXhighEffort", () => {});describe("supportsMaxEffort", () => {- it("is true only for the gpt-5.6 family", () => {+ it("is true for current GPT families with Max support", () => {+ expect(supportsMaxEffort("gpt-6-astra")).toBe(true);expect(supportsMaxEffort("gpt-5.6-sol")).toBe(true);expect(supportsMaxEffort("GPT-5.6-LUNA")).toBe(true);expect(supportsMaxEffort("gpt-5.5")).toBe(false);diff --git a/products/desktop/packages/agent/src/adapters/codex-app-server/models.ts b/products/desktop/packages/agent/src/adapters/codex-app-server/models.tsindex 0ba97d9f70a6..8026ba5804ff 100644--- a/products/desktop/packages/agent/src/adapters/codex-app-server/models.ts+++ b/products/desktop/packages/agent/src/adapters/codex-app-server/models.ts@@ -24,16 +24,21 @@ const CODEX_REASONING_EFFORT_OPTIONS: ReasoningEffortOption[] = [},];-// OpenAI's `reasoning_effort` exposes an "extra high" tier on the gpt-5.5 and-// gpt-5.6 families. GPT-5.6 also supports the "max" tier. Older models top out-// at "high".+// OpenAI's `reasoning_effort` exposes an "extra high" tier on the gpt-5.5,+// gpt-5.6, and gpt-6-astra families. GPT-5.6 and GPT-6 Astra also support the+// "max" tier. Older models top out at "high".export function supportsXhighEffort(modelId: string): boolean {const id = modelId.toLowerCase();- return id.includes("gpt-5.5") || id.includes("gpt-5.6");+ return (+ id.includes("gpt-5.5") ||+ id.includes("gpt-5.6") ||+ id.includes("gpt-6-astra")+ );}export function supportsMaxEffort(modelId: string): boolean {- return modelId.toLowerCase().includes("gpt-5.6");+ const id = modelId.toLowerCase();+ return id.includes("gpt-5.6") || id.includes("gpt-6-astra");}export function getReasoningEffortOptions(diff --git a/products/desktop/packages/agent/src/adapters/reasoning-effort.test.ts b/products/desktop/packages/agent/src/adapters/reasoning-effort.test.tsindex e9a85c98291d..eeae8739d8bf 100644--- a/products/desktop/packages/agent/src/adapters/reasoning-effort.test.ts+++ b/products/desktop/packages/agent/src/adapters/reasoning-effort.test.ts@@ -81,13 +81,23 @@ const ladderCases = (["claude", "codex"] as const).flatMap((adapter) =>);describe("getCapabilityLadder", () => {- it.each([["claude"], ["codex"]] as const)(- "returns five notches for %s",- (adapter) => {- expect(getCapabilityLadder(adapter)).toHaveLength(5);+ it.each([+ ["claude", 5],+ ["codex", 6],+ ] as const)(+ "returns the expected notches for %s",+ (adapter, expectedLength) => {+ expect(getCapabilityLadder(adapter)).toHaveLength(expectedLength);},);+ it("uses GPT-6 Astra at Max as the smartest Codex notch", () => {+ expect(getCapabilityLadder("codex").at(-1)).toEqual({+ model: "gpt-6-astra",+ effort: "max",+ });+ });+it.each(ladderCases)("pairs a supported effort at every notch (%s %s %s)",(adapter, model, effort) => {diff --git a/products/desktop/packages/agent/src/adapters/reasoning-effort.ts b/products/desktop/packages/agent/src/adapters/reasoning-effort.tsindex a2c0c836d38e..c7fedfb03966 100644--- a/products/desktop/packages/agent/src/adapters/reasoning-effort.ts+++ b/products/desktop/packages/agent/src/adapters/reasoning-effort.ts@@ -79,6 +79,7 @@ const CODEX_CAPABILITY_LADDER: CapabilityNotch[] = [{ model: "gpt-5.6-sol", effort: "medium" },{ model: "gpt-5.6-sol", effort: "high" },{ model: "gpt-5.6-sol", effort: "xhigh" },+ { model: "gpt-6-astra", effort: "max" },];export function getCapabilityLadder(adapter: Adapter): CapabilityNotch[] {diff --git a/products/desktop/packages/core/src/billing/modelPricing.test.ts b/products/desktop/packages/core/src/billing/modelPricing.test.tsindex b76f1fb4bdd1..0e85f8b9c1f3 100644--- a/products/desktop/packages/core/src/billing/modelPricing.test.ts+++ b/products/desktop/packages/core/src/billing/modelPricing.test.ts@@ -13,6 +13,7 @@ describe("modelPricing", () => {["claude-sonnet-5", "1×"],["claude-opus-5", "2.5×"],["gpt-5.5", "≈2.8×"],+ ["gpt-6-astra", "5×"],["deepseek-v4", "≈0.05×"],["zai-org/glm-5.3-flash", "≈0.06×"],] as const)("%s -> %s", (modelId, expected) => {@@ -25,6 +26,10 @@ describe("modelPricing", () => {});it("matches specific families before the broader ones they contain", () => {+ expect(modelListPrice("gpt-6-astra")).toEqual({+ inputPerMtok: 10,+ outputPerMtok: 50,+ });expect(modelListPrice("gpt-5.6-luna")?.inputPerMtok).toBe(1);expect(modelListPrice("gpt-5.5")?.inputPerMtok).toBe(5);expect(modelListPrice("zai-org/glm-5.3-flash")?.inputPerMtok).toBe(0.15);@@ -94,6 +99,7 @@ describe("contract rates match the gateway's pinned table", () => {["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"],] as const)("%s", async (family, block) => {// A dynamic import keeps the pure-layer lint honest: only this test// touches the filesystem, and only to read the gateway's table.diff --git a/products/desktop/packages/core/src/billing/modelPricing.ts b/products/desktop/packages/core/src/billing/modelPricing.tsindex 10b3c55dacf1..3a81d905afe8 100644--- a/products/desktop/packages/core/src/billing/modelPricing.ts+++ b/products/desktop/packages/core/src/billing/modelPricing.ts@@ -4,10 +4,10 @@* sync with the gateway's billing source* (services/llm-gateway/src/llm_gateway/rate_limiting/model_cost_overrides.py).*- * Sources, checked 2026-08-22:+ * Sources, checked 2026-09-07:* - Anthropic (Opus, Sonnet, Haiku): platform.claude.com/docs/en/about-claude/pricing* - GPT-5.5: developers.openai.com/api/docs/pricing- * - Fable, GPT-5.6, Kimi K3, GLM, DeepSeek: the gateway's billing rates, what+ * - Fable, GPT-5.6, GPT-6 Astra, Kimi K3, GLM, DeepSeek: the gateway's billing rates, what* the user is actually charged (pinned in the file above). The drift test* binds these rows to it.*/@@ -38,6 +38,7 @@ const LIST_PRICES: [family: string, price: ModelListPrice][] = [["sonnet-4", { inputPerMtok: 3, outputPerMtok: 15 }],["sonnet", { inputPerMtok: 2, outputPerMtok: 10 }],["haiku", { inputPerMtok: 1, outputPerMtok: 5 }],+ ["gpt-6-astra", { inputPerMtok: 10, outputPerMtok: 50 }],["gpt-5.6-sol", { inputPerMtok: 5, outputPerMtok: 30 }],["gpt-5.6-terra", { inputPerMtok: 2.5, outputPerMtok: 15 }],["gpt-5.6-luna", { inputPerMtok: 1, outputPerMtok: 6 }],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.tsindex 1f0c4c982377..ecc60aad14e3 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@@ -115,6 +115,7 @@ describe("resolvePosthogPiModelCatalog", () => {["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"],["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/model-catalog.ts b/products/desktop/packages/harness/src/extensions/posthog-provider/model-catalog.tsindex 752790f7993d..b95ef907d8b5 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@@ -21,6 +21,7 @@ const PI_MODEL_LABELS: Record<string, string> = {"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","@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",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.tsindex f36de4204065..92f8c86f98c7 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,6 +233,17 @@ describe("resolveModelConfigs", () => {});describe("fallbackModelConfigs", () => {+ it("includes GPT-6 Astra with its gateway capabilities", () => {+ expect(fallbackModelConfigs("us")).toContainEqual(+ expect.objectContaining({+ id: "gpt-6-astra",+ api: "openai-responses",+ contextWindow: 922000,+ maxTokens: 128000,+ }),+ );+ });+it("produces a non-empty, region-scoped model list", () => {const configs = fallbackModelConfigs("us");expect(configs.length).toBeGreaterThan(0);diff --git a/products/desktop/packages/harness/src/extensions/posthog-provider/models.ts b/products/desktop/packages/harness/src/extensions/posthog-provider/models.tsindex fdc1afd9c1aa..bc2b3bc8c9ae 100644--- a/products/desktop/packages/harness/src/extensions/posthog-provider/models.ts+++ b/products/desktop/packages/harness/src/extensions/posthog-provider/models.ts@@ -175,6 +175,12 @@ const FALLBACK_GATEWAY_MODELS: GatewayModel[] = [context_window: 200000,supports_vision: true,},+ {+ id: "gpt-6-astra",+ owned_by: "openai",+ context_window: 922000,+ supports_vision: true,+ },{id: "gpt-5.6-sol",owned_by: "openai",diff --git a/products/desktop/packages/shared/src/reasoning-effort.test.ts b/products/desktop/packages/shared/src/reasoning-effort.test.tsindex 66ae8aa04587..d3b92adc5393 100644--- a/products/desktop/packages/shared/src/reasoning-effort.test.ts+++ b/products/desktop/packages/shared/src/reasoning-effort.test.ts@@ -1,10 +1,14 @@import { describe, expect, it } from "vitest";-import { isSupportedReasoningEffort } from "./reasoning-effort";+import {+ getCapabilityLadder,+ isSupportedReasoningEffort,+} from "./reasoning-effort";describe("isSupportedReasoningEffort", () => {it.each([["codex", "gpt-5.5", "xhigh", true],["codex", "gpt-5.6-sol", "max", true],+ ["codex", "gpt-6-astra", "max", true],["codex", "gpt-5.4", "max", false],["claude", "claude-opus-4-8", "xhigh", true],["claude", "claude-sonnet-4-6", "xhigh", false],@@ -31,3 +35,12 @@ describe("isSupportedReasoningEffort", () => {},);});++describe("getCapabilityLadder", () => {+ it("uses GPT-6 Astra at Max as the smartest Codex notch", () => {+ expect(getCapabilityLadder("codex").at(-1)).toEqual({+ model: "gpt-6-astra",+ effort: "max",+ });+ });+});diff --git a/products/desktop/packages/shared/src/reasoning-effort.ts b/products/desktop/packages/shared/src/reasoning-effort.tsindex dce531703fc7..2f42f7cb0d90 100644--- a/products/desktop/packages/shared/src/reasoning-effort.ts+++ b/products/desktop/packages/shared/src/reasoning-effort.ts@@ -59,12 +59,17 @@ export function getReasoningEffortOptions(const normalizedModelId = modelId.toLowerCase();const supportsXhigh =normalizedModelId.includes("gpt-5.5") ||- normalizedModelId.includes("gpt-5.6");+ normalizedModelId.includes("gpt-5.6") ||+ normalizedModelId.includes("gpt-6-astra");if (supportsXhigh) {options.push({ value: "xhigh", name: "Extra High" });}- if (adapter === "codex" && normalizedModelId.includes("gpt-5.6")) {+ if (+ adapter === "codex" &&+ (normalizedModelId.includes("gpt-5.6") ||+ normalizedModelId.includes("gpt-6-astra"))+ ) {options.push({ value: "max", name: "Max" });}@@ -105,6 +110,7 @@ const CODEX_CAPABILITY_LADDER: readonly CapabilityNotch[] = [{ model: "gpt-5.6-sol", effort: "medium" },{ model: "gpt-5.6-sol", effort: "high" },{ model: "gpt-5.6-sol", effort: "xhigh" },+ { model: "gpt-6-astra", effort: "max" },];export function getCapabilityLadder(diff --git a/products/desktop/packages/ui/src/features/loops/loopModels.test.ts b/products/desktop/packages/ui/src/features/loops/loopModels.test.tsindex 4931ec488ab7..d06bf46a488f 100644--- a/products/desktop/packages/ui/src/features/loops/loopModels.test.ts+++ b/products/desktop/packages/ui/src/features/loops/loopModels.test.ts@@ -33,6 +33,15 @@ const claudeOptions = modelConfigOption([]);describe("loopModelOptions", () => {+ it("includes GPT-6 Astra in the offline Codex fallback", () => {+ expect(+ loopModelOptions("codex", [], {+ glmEnabled: false,+ pinnedModel: "",+ }),+ ).toContainEqual({ value: "gpt-6-astra", label: "GPT-6 Astra" });+ });+it("maps served model options to value/label pairs", () => {expect(loopModelOptions("claude", claudeOptions, {@@ -201,6 +210,7 @@ describe("loopModelOptions", () => {"gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna",+ "gpt-6-astra",],},{diff --git a/products/desktop/packages/ui/src/features/loops/loopModels.ts b/products/desktop/packages/ui/src/features/loops/loopModels.tsindex 4f9866b11a77..401efcf792ef 100644--- a/products/desktop/packages/ui/src/features/loops/loopModels.ts+++ b/products/desktop/packages/ui/src/features/loops/loopModels.ts@@ -57,6 +57,7 @@ const FALLBACK_MODEL_OPTIONS: Record<{ value: "gpt-5.6-sol", label: "GPT-5.6 Sol" },{ value: "gpt-5.6-terra", label: "GPT-5.6 Terra" },{ value: "gpt-5.6-luna", label: "GPT-5.6 Luna" },+ { value: "gpt-6-astra", label: "GPT-6 Astra" },],};diff --git a/products/posthog_ai/frontend/utils/composerModels.test.ts b/products/posthog_ai/frontend/utils/composerModels.test.tsindex 77baa2f922e3..5ca1a9b66664 100644--- a/products/posthog_ai/frontend/utils/composerModels.test.ts+++ b/products/posthog_ai/frontend/utils/composerModels.test.ts@@ -118,6 +118,28 @@ describe('composerModels', () => {expect(getCapabilityLadder(catalogue, RuntimeAdapterEnumApi.Codex)).toEqual([])})+ it('uses GPT-6 Astra at Max as the smartest Codex rung', () => {+ const catalogue: ModelChoiceApi[] = [+ {+ runtime_adapter: 'codex',+ model: 'gpt-5.6-sol',+ display_name: 'GPT-5.6 Sol',+ supported_efforts: ['low', 'medium', 'high', 'xhigh', 'max'],+ },+ {+ runtime_adapter: 'codex',+ model: 'gpt-6-astra',+ display_name: 'GPT-6 Astra',+ supported_efforts: ['low', 'medium', 'high', 'xhigh', 'max'],+ },+ ]++ expect(getCapabilityLadder(catalogue, RuntimeAdapterEnumApi.Codex).at(-1)).toEqual({+ model: 'gpt-6-astra',+ effort: ReasoningEffortEnumApi.Max,+ })+ })+// The picker groups by harness and offers one row per runtime, so both have to come off the catalogue rather// than a hardcoded list — a runtime the gateway stops serving must stop being offered.it("derives the harness list and each harness's models from the catalogue", () => {diff --git a/products/posthog_ai/frontend/utils/composerModels.ts b/products/posthog_ai/frontend/utils/composerModels.tsindex d94c34e14ca7..0e34eb958db6 100644--- a/products/posthog_ai/frontend/utils/composerModels.ts+++ b/products/posthog_ai/frontend/utils/composerModels.ts@@ -107,6 +107,7 @@ const CAPABILITY_LADDERS: Record<RuntimeAdapterEnumApi, CapabilityNotch[]> = {{ 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 },],}diff --git a/products/tasks/backend/temporal/process_task/ai_gateway_token.py b/products/tasks/backend/temporal/process_task/ai_gateway_token.pyindex cc0991b88ebf..490de069d21a 100644--- a/products/tasks/backend/temporal/process_task/ai_gateway_token.py+++ b/products/tasks/backend/temporal/process_task/ai_gateway_token.py@@ -106,6 +106,7 @@ _PRODUCT_ALLOWED_MODELS: dict[str, list[str]] = {"gpt-5.6-sol","gpt-5.6-luna","gpt-5.6-terra",+ "gpt-6-astra",],}diff --git a/products/tasks/backend/temporal/process_task/tests/test_ai_gateway_token.py b/products/tasks/backend/temporal/process_task/tests/test_ai_gateway_token.pyindex 4b13a5525cbe..6f725de91882 100644--- a/products/tasks/backend/temporal/process_task/tests/test_ai_gateway_token.py+++ b/products/tasks/backend/temporal/process_task/tests/test_ai_gateway_token.py@@ -165,6 +165,7 @@ class TestMintScopedToken:"gpt-5.6-sol","gpt-5.6-luna","gpt-5.6-terra",+ "gpt-6-astra",]def test_review_hog_pin_covers_every_registry_arm_model(self):diff --git a/products/tasks/backend/temporal/process_task/utils.py b/products/tasks/backend/temporal/process_task/utils.pyindex f49d0634c240..2b1db62b1e2b 100644--- a/products/tasks/backend/temporal/process_task/utils.py+++ b/products/tasks/backend/temporal/process_task/utils.py@@ -218,13 +218,20 @@ CODEX_MAX_REASONING_EFFORTS: tuple[ReasoningEffort, ...] = (ReasoningEffort.MAX,)CODEX_XHIGH_REASONING_MODELS: frozenset[str] = frozenset({"gpt-5.5"})-CODEX_MAX_REASONING_MODELS: frozenset[str] = frozenset({"gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"})+CODEX_MAX_REASONING_MODELS: frozenset[str] = frozenset({"gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra"})# Canonical list of Codex models. The runtime technically accepts any# `gpt-*` identifier passed through, but only models on this list are# considered tested and surfaced in pickers. Extend when a new Codex model# ships.-CODEX_MODELS: tuple[str, ...] = ("gpt-5", "gpt-5.5", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna")+CODEX_MODELS: tuple[str, ...] = (+ "gpt-5",+ "gpt-5.5",+ "gpt-5.6-sol",+ "gpt-5.6-terra",+ "gpt-5.6-luna",+ "gpt-6-astra",+)def get_models_for_runtime_adapter(runtime_adapter: RuntimeAdapter | str | None) -> tuple[str, ...]:diff --git a/products/tasks/backend/tests/test_model_selection.py b/products/tasks/backend/tests/test_model_selection.pyindex abb806a4e038..2e1211e16838 100644--- a/products/tasks/backend/tests/test_model_selection.py+++ b/products/tasks/backend/tests/test_model_selection.py@@ -15,6 +15,7 @@ from products.tasks.backend.temporal.process_task.utils import (("claude-sonnet-5", RuntimeAdapter.CLAUDE),("CLAUDE-SONNET-5", RuntimeAdapter.CLAUDE),("gpt-5.6-sol", RuntimeAdapter.CODEX),+ ("gpt-6-astra", RuntimeAdapter.CODEX),("some-model-nobody-serves", None),(None, None),],@@ -28,6 +29,7 @@ def test_get_runtime_adapter_for_model(model: str | None, expected: RuntimeAdapt[pytest.param("claude", "claude-sonnet-5", "high", id="pair-with-supported-effort"),pytest.param("codex", "gpt-5.6-sol", "max", id="codex-max-effort-model"),+ pytest.param("codex", "gpt-6-astra", "max", id="gpt-6-max-effort-model"),pytest.param("claude", "claude-sonnet-5", None, id="pair-without-effort"),pytest.param(None, None, None, id="nothing-selected"),pytest.param("claude", "a-model-no-adapter-claims", None, id="model-outside-the-catalogue"),diff --git a/services/llm-gateway/PARITY.md b/services/llm-gateway/PARITY.mdindex a38ff011a535..30e7451848a6 100644--- a/services/llm-gateway/PARITY.md+++ b/services/llm-gateway/PARITY.md@@ -52,6 +52,7 @@ Flag-gated open-weight models added to the Python gateway under the freeze stay`zai-org/glm-5.3-flash` is Baseten-exclusive, gated by the `posthog-code-glm-53-flash-model` flag, and reachable only by the `posthog_code` and `review_hog` products.Its callers are PostHog Desktop and PostHog Code, so the model depends on the OAuth application allowlists, the request-selected project validated against OAuth scope and live organization membership, the billing policy, and the per-model access flags named in the first row above.The Go catalog serves GLM 5.2 only, and Baseten on Go still depends on the provider deployment check below.+`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.### 🔎 Verify before switching@@ -97,10 +98,10 @@ Run `/migrating-llm-gateway-callers` to inventory and convert a caller.Run `/auditing-llm-gateway-parity` after either gateway changes auth, attribution, billing, endpoints, providers, models, routing, or event metadata. The skill audits implementation sources in both repositories and updates this file without migrating callers.-Last verified on 2026-09-03 against:+Last verified on 2026-09-07 against:-- `PostHog/posthog` working tree compared with master at `17484bc3a0b01d930fbcf512ca9f1f2489d7aa84`-- `PostHog/ai-gateway` main at `fb1afc8bebb40ffb43dbd42f2b5a9531cf8f2cb8`+- `PostHog/posthog` working tree compared with master at `cab2e7ddca85e189cab9deb374cb1e82e55bd16d`+- `PostHog/ai-gateway` main at `13a9277ab0e0079e9581c0e780b2b83aa72ff3db`## Referencesdiff --git a/services/llm-gateway/src/llm_gateway/products/config.py b/services/llm-gateway/src/llm_gateway/products/config.pyindex 8c482e46a863..a977c04de9e5 100644--- a/services/llm-gateway/src/llm_gateway/products/config.py+++ b/services/llm-gateway/src/llm_gateway/products/config.py@@ -96,6 +96,7 @@ _POSTHOG_CODE_AGENT_MODELS: Final[frozenset[str]] = frozenset("gpt-5.3-codex","gpt-5.2","gpt-5-mini",+ "gpt-6-astra","@cf/zai-org/glm-5.2","zai-org/glm-5.3","zai-org/glm-5.3-flash",@@ -164,6 +165,7 @@ PRODUCTS: Final[dict[str, ProductConfig]] = {# review_hog to this slug (LEGACY_PRODUCT_OVERRIDES in the desktop# agent's gateway.ts), so its reviewer-experiment arms must be allowed."gpt-5.6-sol",+ "gpt-6-astra",}| BEDROCK_MODELS),@@ -267,7 +269,8 @@ PRODUCTS: Final[dict[str, ProductConfig]] = {"review_hog": ProductConfig(allowed_application_ids=None,# The models the review pipeline pins: sonnet-5 (perspectives + one-shots), opus-4-8- # (validation), opus-5 (outcome judge), gpt-5.5 / gpt-5.6 sol+luna+terra (Codex reviewers),+ # (validation), opus-5 (outcome judge), gpt-5.5 / gpt-5.6 sol+luna+terra / gpt-6-astra+ # (Codex reviewers),# GLM 5.2/5.3 and DeepSeek V4 Flash (evaluated as reviewers).allowed_models=frozenset({@@ -282,6 +285,7 @@ PRODUCTS: Final[dict[str, ProductConfig]] = {"gpt-5.6-sol","gpt-5.6-luna","gpt-5.6-terra",+ "gpt-6-astra",}),allow_api_keys=True,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.pyindex 9d3d27942283..b91ea723729c 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@@ -133,17 +133,37 @@ MODEL_COST_OVERRIDES: Final[dict[str, ModelCost]] = {"supports_vision": True,"supports_prompt_caching": True,},+ "gpt-6-astra": {+ "litellm_provider": "openai",+ "mode": "chat",+ "max_input_tokens": 922_000,+ "max_output_tokens": 128_000,+ "input_cost_per_token": 1e-05,+ "output_cost_per_token": 5e-05,+ "cache_read_input_token_cost": 1e-06,+ "cache_creation_input_token_cost": 1.25e-05,+ "supports_vision": True,+ "supports_prompt_caching": True,+ },}-# Provider-specific contract prices must not be replaced by a same-named LiteLLM entry.+# Contract prices must not be replaced by a same-named LiteLLM entry.PINNED_MODEL_COST_OVERRIDES: Final[frozenset[str]] = frozenset(- {BASETEN_METRIC_MODEL, BASETEN_DEEPSEEK_METRIC_MODEL, BASETEN_GLM53_METRIC_MODEL, BASETEN_GLM53_FLASH_METRIC_MODEL}+ {+ BASETEN_METRIC_MODEL,+ BASETEN_DEEPSEEK_METRIC_MODEL,+ BASETEN_GLM53_METRIC_MODEL,+ BASETEN_GLM53_FLASH_METRIC_MODEL,+ "gpt-6-astra",+ })def apply_model_cost_overrides(model_cost: dict[str, ModelCost]) -> dict[str, ModelCost]:"""Apply missing bridge entries and contract-pinned provider prices in place."""for model_id, cost in MODEL_COST_OVERRIDES.items():- if model_id in PINNED_MODEL_COST_OVERRIDES or model_id not in model_cost:+ if model_id in PINNED_MODEL_COST_OVERRIDES:+ model_cost[model_id] = cast("ModelCost", {**model_cost.get(model_id, {}), **cost})+ elif model_id not in model_cost:model_cost[model_id] = cast("ModelCost", dict(cost))return model_costdiff --git a/services/llm-gateway/tests/test_model_cost_overrides.py b/services/llm-gateway/tests/test_model_cost_overrides.pyindex d9b886e23f7f..e41e5fa5b1a8 100644--- a/services/llm-gateway/tests/test_model_cost_overrides.py+++ b/services/llm-gateway/tests/test_model_cost_overrides.py@@ -46,15 +46,19 @@ class TestApplyModelCostOverrides:"litellm_provider": "openai","input_cost_per_token": -1.0,"output_cost_per_token": -1.0,+ "max_tokens": 777,}cost_map: dict[str, ModelCost] = {model_id: upstream}apply_model_cost_overrides(cost_map)- assert cost_map[model_id] == MODEL_COST_OVERRIDES[model_id]+ actual = dict(cost_map[model_id])+ for key, value in dict(MODEL_COST_OVERRIDES[model_id]).items():+ assert actual[key] == value+ assert cost_map[model_id]["max_tokens"] == 777assert cost_map[model_id] is not MODEL_COST_OVERRIDES[model_id]- def test_pinned_membership_is_exactly_the_baseten_contract_prices(self) -> None:+ def test_pinned_membership_is_exactly_the_contract_prices(self) -> None:# Literals on purpose: the parametrized tests above derive their groups from the# sets under test, so removing a member there only reshuffles which semantics get# asserted. Un-pinning a contract price must fail here.@@ -63,6 +67,7 @@ class TestApplyModelCostOverrides:"baseten/deepseek-ai/deepseek-v4-flash-0731","baseten/zai-org/glm-5.3","baseten/zai-org/glm-5.3-flash",+ "gpt-6-astra",}def test_returns_same_object_in_place(self) -> None:diff --git a/services/llm-gateway/tests/test_model_registry.py b/services/llm-gateway/tests/test_model_registry.pyindex cf352eb2927a..7770ad8f5280 100644--- a/services/llm-gateway/tests/test_model_registry.py+++ b/services/llm-gateway/tests/test_model_registry.py@@ -22,6 +22,12 @@ PROVIDER_ENV_VARS = []MOCK_COST_DATA: dict[str, ModelCost] = {+ "gpt-6-astra": {+ "litellm_provider": "openai",+ "max_input_tokens": 922000,+ "supports_vision": True,+ "mode": "chat",+ },"gpt-4o": {"litellm_provider": "openai","max_input_tokens": 128000,@@ -426,6 +432,22 @@ class TestModelMatchesAllowlist:class TestIsModelAvailable:+ @pytest.mark.parametrize(+ "product,expected",+ [+ ("posthog_code", True),+ ("background_agents", True),+ ("slack_app", True),+ ("posthog_ai", True),+ ("onboarding", False),+ ("product_analytics", False),+ ("review_hog", True),+ ("stamphog", False),+ ],+ )+ def test_gpt_6_astra_respects_product_allowlists(self, product: str, expected: bool) -> None:+ assert is_model_available("gpt-6-astra", product) is expected+@pytest.mark.parametrize("model_id,product,expected",[diff --git a/services/llm-gateway/tests/test_product_config.py b/services/llm-gateway/tests/test_product_config.pyindex 5f9ed29dcfdc..ea1b960e722a 100644--- a/services/llm-gateway/tests/test_product_config.py+++ b/services/llm-gateway/tests/test_product_config.py@@ -229,6 +229,7 @@ class TestCheckProductAccess:"gpt-5.3-codex","gpt-5.2","gpt-5-mini",+ "gpt-6-astra","deepseek-ai/deepseek-v4-flash-0731",],)@@ -386,6 +387,7 @@ class TestCheckProductAccess:"gpt-5-mini","gpt-5.6-luna","gpt-5.6-sol",+ "gpt-6-astra",],)def test_background_agents_allows_configured_models(self, model: str):@@ -393,6 +395,23 @@ class TestCheckProductAccess:assert allowed is Trueassert error is None+ @pytest.mark.parametrize(+ "product",+ [+ "llma_labeling",+ "product_analytics",+ "stamphog",+ "subscriptions",+ "warehouse_custom_source_builder",+ "warehouse_semantic_enrichment",+ ],+ )+ def test_gpt_6_astra_does_not_bypass_pinned_product_models(self, product: str) -> None:+ allowed, error = check_product_access(product, "personal_api_key", None, "gpt-6-astra")+ assert allowed is False+ assert error is not None+ assert "not allowed" in error+def test_background_agents_rejects_api_keys(self):allowed, error = check_product_access("background_agents", "personal_api_key", None, None)assert allowed is False