Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Commit efa1c14

Browse files
authored
Merge pull request #69 from Not-Diamond/t7-update-pplx
deprecate old sonar, update to new
2 parents 880d187 + 937f2f3 commit efa1c14

7 files changed

Lines changed: 12 additions & 12 deletions

File tree

notdiamond/llms/providers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class NDLLMProviders(Enum):
7676
REPLICATE_META_LLAMA_3_1_405B_INSTRUCT (NDLLMProvider): refers to "meta-llama-3.1-405b-instruct"
7777
model served via Replicate
7878
79-
LLAMA_3_1_SONAR_LARGE_128K_ONLINE (NDLLMProvider): refers to "llama-3.1-sonar-large-128k-online" model by Perplexity
79+
SONAR (NDLLMProvider): refers to "sonar" model by Perplexity
8080
"""
8181

8282
GPT_3_5_TURBO = ("openai", "gpt-3.5-turbo")
@@ -157,9 +157,9 @@ class NDLLMProviders(Enum):
157157
)
158158
TOGETHER_DEEPSEEK_R1 = ("togetherai", "DeepSeek-R1")
159159

160-
LLAMA_3_1_SONAR_LARGE_128K_ONLINE = (
160+
SONAR = (
161161
"perplexity",
162-
"llama-3.1-sonar-large-128k-online",
162+
"sonar",
163163
)
164164

165165
REPLICATE_MISTRAL_7B_INSTRUCT_V0_2 = (

notdiamond/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,14 @@
341341
},
342342
"perplexity": {
343343
"models": [
344-
"llama-3.1-sonar-large-128k-online",
344+
"sonar",
345345
],
346346
"api_key": PPLX_API_KEY,
347347
"openrouter_identifier": {
348-
"llama-3.1-sonar-large-128k-online": "perplexity/llama-3.1-sonar-large-128k-online",
348+
"sonar": "perplexity/sonar",
349349
},
350350
"price": {
351-
"llama-3.1-sonar-large-128k-online": {"input": 1.0, "output": 1.0},
351+
"sonar": {"input": 1.0, "output": 1.0},
352352
},
353353
},
354354
"replicate": {

notdiamond/toolkit/litellm/litellm_notdiamond.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"mistral/mistral-large-2407": "mistral/mistral-large-2407",
7777
"mistral/mistral-large-2402": "mistral/mistral-large-2402",
7878
# perplexity
79-
"perplexity/llama-3.1-sonar-large-128k-online": "perplexity/llama-3.1-sonar-large-128k-online",
79+
"perplexity/sonar": "perplexity/sonar",
8080
# cohere
8181
"cohere/command-r": "cohere_chat/command-r",
8282
"cohere/command-r-plus": "cohere_chat/command-r-plus",

tests/test_llm_calls/test_perplexity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
@pytest.mark.vcr
99
@pytest.mark.longrun
1010
class Test_Perplexity_LLMs:
11-
def test_llama_3_1_sonar_large_128k_online(self):
12-
provider = NDLLMProviders.LLAMA_3_1_SONAR_LARGE_128K_ONLINE
11+
def test_sonar(self):
12+
provider = NDLLMProviders.SONAR
1313
provider.kwargs = {"max_tokens": 10}
1414
nd_llm = NotDiamond(
1515
llm_configs=[provider],

tests/test_toolkit/langchain/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def test_invokable(target_model: str, patch_class: str) -> None:
165165

166166

167167
def test_init_perplexity() -> None:
168-
target_model = "perplexity/llama-3.1-sonar-large-128k-online"
168+
target_model = "perplexity/sonar"
169169
nd_client = MagicMock(
170170
spec=NotDiamond,
171171
llm_configs=[target_model],

tests/test_toolkit/langchain/test_unit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def test_invokable_mock(self) -> None:
276276
), f"{mock_client}"
277277

278278
def test_init_perplexity(self) -> None:
279-
target_model = "perplexity/llama-3.1-sonar-large-128k-online"
279+
target_model = "perplexity/sonar"
280280
nd_client = MagicMock(
281281
spec=NotDiamond,
282282
llm_configs=[target_model],

tests/test_toolkit/test_litellm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# {"provider": "mistral", "model": "open-mixtral-8x22b"},
4141
# {"provider": "mistral", "model": "mistral-large-2407"},
4242
# {"provider": "mistral", "model": "mistral-large-2402"},
43-
{"provider": "perplexity", "model": "llama-3.1-sonar-large-128k-online"},
43+
{"provider": "perplexity", "model": "sonar"},
4444
# {"provider": "cohere", "model": "command-r"},
4545
{"provider": "cohere", "model": "command-r-plus"},
4646
# {"provider": "google", "model": "gemini-pro"},

0 commit comments

Comments
 (0)