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(phai): move title generator and query planner off retiring models (#114159)

posthog[bot]7648abfcfe53
diff --git a/ee/hogai/chat_agent/query_planner/nodes.py b/ee/hogai/chat_agent/query_planner/nodes.py
index 4f6e014be08c..b5bc6bcad7a5 100644
--- a/ee/hogai/chat_agent/query_planner/nodes.py
+++ b/ee/hogai/chat_agent/query_planner/nodes.py
@@ -143,7 +143,7 @@ class QueryPlannerNode(TaxonomyUpdateDispatcherNodeMixin, AssistantNode):
dynamic_retrieve_entity_properties, dynamic_retrieve_entity_property_values = self._get_dynamic_entity_tools()
return MaxChatOpenAI(
- model="o4-mini",
+ model="gpt-5.6-terra",
use_responses_api=True,
streaming=False,
reasoning={
diff --git a/ee/hogai/core/title_generator/nodes.py b/ee/hogai/core/title_generator/nodes.py
index 95501bfdc393..70d006c50974 100644
--- a/ee/hogai/core/title_generator/nodes.py
+++ b/ee/hogai/core/title_generator/nodes.py
@@ -82,8 +82,9 @@ class TitleGeneratorNode(AssistantNode):
def _build_model(self, *, max_completion_tokens: int, topic_classification: bool) -> MaxChatOpenAI:
return MaxChatOpenAI(
- model="gpt-4.1-nano",
- temperature=0.7,
+ model="gpt-5.6-luna",
+ reasoning_effort="low",
+ # Reasoning tokens count against this cap, so it must leave room above the short title.
max_completion_tokens=max_completion_tokens,
user=self._user,
team=self._team,
@@ -96,10 +97,10 @@ class TitleGeneratorNode(AssistantNode):
@property
def _model(self):
- return self._build_model(max_completion_tokens=100, topic_classification=False)
+ return self._build_model(max_completion_tokens=1024, topic_classification=False)
@property
def _topic_model(self):
- return self._build_model(max_completion_tokens=200, topic_classification=True).with_structured_output(
+ return self._build_model(max_completion_tokens=2048, topic_classification=True).with_structured_output(
TitleAndTopic, method="json_schema", include_raw=False
)
diff --git a/ee/hogai/llm.py b/ee/hogai/llm.py
index 0b4710547b6a..17e3328f90f9 100644
--- a/ee/hogai/llm.py
+++ b/ee/hogai/llm.py
@@ -73,7 +73,7 @@ Person properties are query-time in this project. `person.properties.*` on the e
""".strip()
# https://platform.openai.com/docs/guides/flex-processing
-OPENAI_FLEX_MODELS = ["o3", "o4-mini", "gpt5", "gpt5-mini", "gpt5-nano"]
+OPENAI_FLEX_MODELS = ["o3", "gpt-5.6-terra", "gpt5", "gpt5-mini", "gpt5-nano"]
# Map "http://", "https://", and "all://" to None in Client's mounts to bypass proxies for MaxChatAnthropic.
_BYPASS_PROXY_MOUNTS: dict[str, None] = {"http://": None, "https://": None, "all://": None}