From 0f2d3583acb13020645cad6517460e4bdd26fcb6 Mon Sep 17 00:00:00 2001 From: KoalaTrapLord <265133236+KoalaTrapLord@users.noreply.github.com> Date: Thu, 19 Mar 2026 08:14:44 -0400 Subject: [PATCH] Remove unsupported response_format from Perplexity API call --- coach/clients/perplexity_client.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/coach/clients/perplexity_client.py b/coach/clients/perplexity_client.py index 3164616..ceb5c27 100644 --- a/coach/clients/perplexity_client.py +++ b/coach/clients/perplexity_client.py @@ -81,8 +81,7 @@ class PerplexityClient: """ Send a chat request with JSON output. - Uses response_format={"type": "json_object"} because Perplexity's - Sonar models do not support the json_schema response_format. + Uses Sonar models do not support the json_schema response_format. Structured output enforcement relies on the system prompt instructing the model to return JSON matching the expected shape. @@ -111,8 +110,7 @@ class PerplexityClient: messages=messages, temperature=temperature, max_tokens=max_tokens, - response_format={"type": "json_object"}, - ) + ) choice = response.choices[0] content = choice.message.content or ""