Describe the Bug
We’re making API calls to the Sonar Deep Research model, but the responses we receive come from Sonar Reasoning Pro. Additionally, the dashboard shows usage of Reasoning Pro and we’re being billed accordingly. This suggests that model requests are being misrouted, impacting both expected behavior and billing. We urgently need this to work correctly, as it’s a critical component of our SaaS in production.
Expected Behavior
We expect that when making an API call to the Sonar Deep Research model, the response should come from that same model. Additionally, the usage shown in the dashboard and the billing should accurately reflect the requested model.
Actual Behavior
When making API calls to the Sonar Deep Research model, the response we receive actually comes from the Sonar Reasoning Pro model. The dashboard also logs the usage under Reasoning Pro and we’re being billed for it, even though that’s not the model we requested.
Steps to Reproduce
- Call the API with the following request:
headers = {
‘Authorization’: f’Bearer {settings.API_KEY}',
‘Content-Type’: ‘application/json’,
‘Accept’: ‘application/json’,
}
payload = {
‘model’: ‘sonar-deep-research’,
‘messages’: [
{‘role’: ‘user’, ‘content’: prompt},
],
‘max_tokens’: max_tokens,
}
response = requests.post(settings.API_URL, headers=headers, json=payload) - Observe the unexpected behavior.
API Request & Response (if applicable)
Environment
We do not use any SDK, we directly POST to this URL https://api.perplexity.ai/chat/completions. Thus, the version is not defined by us, but we may use the one that you have currently available in such endpoint. The POST has:
JSON data:
,
{
‘model’: ‘sonar-deep-research’,
‘messages’: [
{‘role’: ‘user’, ‘content’: },
],
‘max_tokens’: <MAX_TOKENS>,
}
Headers:
,
{
‘Authorization’: f’Bearer <JWT_ID_TOKEN>',
‘Content-Type’: ‘application/json’,
‘Accept’: ‘application/json’,
}
The POST request is made throw Python’s requests library (version 2.32.3), executed inside a virtual machine that runs in Linux.
Logs or Screenshots
Additional Context
This behavior is directly impacting a key functionality of our SaaS, which is currently in production. We’re integrating Sonar Deep Research as an essential part of the service we provide to our users, and this model confusion compromises both product quality and billing accuracy.