Skip to content

The agent engineering platform.

fix(fireworks): models used in tests & naming schema (#34125)

Mason Daugherty8d93720c707c
diff --git a/libs/partners/fireworks/langchain_fireworks/chat_models.py b/libs/partners/fireworks/langchain_fireworks/chat_models.py
index ef818c0c41..ec8d65f081 100644
--- a/libs/partners/fireworks/langchain_fireworks/chat_models.py
+++ b/libs/partners/fireworks/langchain_fireworks/chat_models.py
@@ -287,9 +287,7 @@ class ChatFireworks(BaseChatModel):
```python
from langchain_fireworks.chat_models import ChatFireworks
- fireworks = ChatFireworks(
- model_name="accounts/fireworks/models/llama-v3p1-8b-instruct"
- )
+ fireworks = ChatFireworks(model_name="accounts/fireworks/models/gpt-oss-120b")
```
"""
@@ -798,7 +796,7 @@ class ChatFireworks(BaseChatModel):
model = ChatFireworks(
- model="accounts/fireworks/models/firefunction-v1",
+ model="accounts/fireworks/models/gpt-oss-120b",
temperature=0,
)
structured_model = model.with_structured_output(AnswerWithJustification)
@@ -828,7 +826,7 @@ class ChatFireworks(BaseChatModel):
model = ChatFireworks(
- model="accounts/fireworks/models/firefunction-v1",
+ model="accounts/fireworks/models/gpt-oss-120b",
temperature=0,
)
structured_model = model.with_structured_output(
@@ -863,7 +861,7 @@ class ChatFireworks(BaseChatModel):
model = ChatFireworks(
- model="accounts/fireworks/models/firefunction-v1",
+ model="accounts/fireworks/models/gpt-oss-120b",
temperature=0,
)
structured_model = model.with_structured_output(AnswerWithJustification)
@@ -899,7 +897,7 @@ class ChatFireworks(BaseChatModel):
}
model = ChatFireworks(
- model="accounts/fireworks/models/firefunction-v1",
+ model="accounts/fireworks/models/gpt-oss-120b",
temperature=0,
)
structured_model = model.with_structured_output(oai_schema)
@@ -926,7 +924,7 @@ class ChatFireworks(BaseChatModel):
model = ChatFireworks(
- model="accounts/fireworks/models/firefunction-v1", temperature=0
+ model="accounts/fireworks/models/gpt-oss-120b", temperature=0
)
structured_model = model.with_structured_output(
AnswerWithJustification, method="json_mode", include_raw=True
diff --git a/libs/partners/fireworks/tests/integration_tests/test_chat_models.py b/libs/partners/fireworks/tests/integration_tests/test_chat_models.py
index 77825dc866..2cd6539388 100644
--- a/libs/partners/fireworks/tests/integration_tests/test_chat_models.py
+++ b/libs/partners/fireworks/tests/integration_tests/test_chat_models.py
@@ -15,7 +15,7 @@ from typing_extensions import TypedDict
from langchain_fireworks import ChatFireworks
-_MODEL = "accounts/fireworks/models/llama-v3p1-8b-instruct"
+_MODEL = "accounts/fireworks/models/gpt-oss-120b"
def test_tool_choice_bool() -> None:
@@ -44,7 +44,7 @@ def test_tool_choice_bool() -> None:
async def test_astream() -> None:
"""Test streaming tokens from ChatFireworks."""
- llm = ChatFireworks(model=_MODEL)
+ llm = ChatFireworks(model="fireworks/kimi-k2-instruct-0905")
full: BaseMessageChunk | None = None
chunks_with_token_counts = 0
@@ -142,7 +142,7 @@ def _get_joke_class(
@pytest.mark.parametrize("schema_type", ["pydantic", "typeddict", "json_schema"])
def test_structured_output_json_schema(schema_type: str) -> None:
- llm = ChatFireworks(model="accounts/fireworks/models/llama-v3p1-70b-instruct")
+ llm = ChatFireworks(model="fireworks/kimi-k2-instruct-0905")
schema, validation_function = _get_joke_class(schema_type) # type: ignore[arg-type]
chat = llm.with_structured_output(schema, method="json_schema")
diff --git a/libs/partners/fireworks/tests/integration_tests/test_llms.py b/libs/partners/fireworks/tests/integration_tests/test_llms.py
index 553666f656..c0a61fd49f 100644
--- a/libs/partners/fireworks/tests/integration_tests/test_llms.py
+++ b/libs/partners/fireworks/tests/integration_tests/test_llms.py
@@ -1,17 +1,19 @@
"""Test Fireworks API wrapper.
In order to run this test, you need to have an Fireworks api key.
+
You can get it by registering for free at https://api.fireworks.ai/.
+
A test key can be found at https://api.fireworks.ai/settings/api-keys
-You'll then need to set FIREWORKS_API_KEY environment variable to your api key.
+You'll then need to set `FIREWORKS_API_KEY` environment variable to your api key.
"""
import pytest as pytest
from langchain_fireworks import Fireworks
-_MODEL = "accounts/fireworks/models/llama-v3p1-8b-instruct"
+_MODEL = "accounts/fireworks/models/deepseek-v3p1"
def test_fireworks_call() -> None: