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): allow reasoning effort for claude-fable-5 runs (#62949)

Alessandro Pogliaghi5a88ba43c04c
diff --git a/products/tasks/backend/temporal/process_task/utils.py b/products/tasks/backend/temporal/process_task/utils.py
index 115824e628eb..6136d00e73e9 100644
--- a/products/tasks/backend/temporal/process_task/utils.py
+++ b/products/tasks/backend/temporal/process_task/utils.py
@@ -103,6 +103,13 @@ CLAUDE_REASONING_EFFORTS_BY_MODEL: dict[str, tuple[ReasoningEffort, ...]] = {
ReasoningEffort.XHIGH,
ReasoningEffort.MAX,
),
+ "claude-fable-5": (
+ ReasoningEffort.LOW,
+ ReasoningEffort.MEDIUM,
+ ReasoningEffort.HIGH,
+ ReasoningEffort.XHIGH,
+ ReasoningEffort.MAX,
+ ),
"claude-sonnet-4-6": (
ReasoningEffort.LOW,
ReasoningEffort.MEDIUM,
diff --git a/products/tasks/backend/tests/test_api.py b/products/tasks/backend/tests/test_api.py
index f87bf43b7f3c..46128649b029 100644
--- a/products/tasks/backend/tests/test_api.py
+++ b/products/tasks/backend/tests/test_api.py
@@ -2041,6 +2041,36 @@ class TestTaskAPI(BaseTaskAPITest):
}
mock_workflow.assert_not_called()
+ @parameterized.expand(
+ [
+ ("low",),
+ ("medium",),
+ ("high",),
+ ("xhigh",),
+ ("max",),
+ ]
+ )
+ @patch("products.tasks.backend.api.execute_task_processing_workflow")
+ def test_run_endpoint_accepts_fable_reasoning_effort(self, reasoning_effort, mock_workflow):
+ task = self.create_task()
+
+ response = self.client.post(
+ f"/api/projects/@current/tasks/{task.id}/run/",
+ {
+ "runtime_adapter": "claude",
+ "model": "claude-fable-5",
+ "reasoning_effort": reasoning_effort,
+ },
+ format="json",
+ )
+
+ assert response.status_code == status.HTTP_200_OK
+ latest_run = response.json()["latest_run"]
+ task_run = TaskRun.objects.get(id=latest_run["id"])
+ assert task_run.state["model"] == "claude-fable-5"
+ assert task_run.state["reasoning_effort"] == reasoning_effort
+ mock_workflow.assert_called_once()
+
@patch("products.tasks.backend.api.execute_task_processing_workflow")
def test_run_endpoint_derives_provider_from_runtime_adapter(self, mock_workflow):
task = self.create_task()