mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 18:50:33 +00:00
groq[minor]: remove default model (#30341)
The default model for `ChatGroq`, `"mixtral-8x7b-32768"`, is being retired on March 20, 2025. Here we remove the default, such that model names must be explicitly specified (being explicit is a good practice here, and avoids the need for breaking changes down the line). This change will be released in a minor version bump to 0.3. This follows https://github.com/langchain-ai/langchain/pull/30161 (released in version 0.2.5), where we began generating warnings to this effect. 
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
import json
|
||||
import os
|
||||
import warnings
|
||||
from typing import Any
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
@@ -280,23 +279,3 @@ def test_groq_serialization() -> None:
|
||||
|
||||
# Ensure a None was preserved
|
||||
assert llm.groq_api_base == llm2.groq_api_base
|
||||
|
||||
|
||||
def test_groq_warns_default_model() -> None:
|
||||
"""Test that a warning is raised if a default model is used."""
|
||||
|
||||
# Delete this test in 0.3 release, when the default model is removed.
|
||||
|
||||
# Test no warning if model is specified
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("error")
|
||||
ChatGroq(model="foo")
|
||||
|
||||
# Test warns if default model is used
|
||||
with pytest.warns(match="default model"):
|
||||
ChatGroq()
|
||||
|
||||
# Test only warns once
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("error")
|
||||
ChatGroq()
|
||||
|
||||
Reference in New Issue
Block a user