-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
bugRelated to a bug, vulnerability, unexpected error with an existing featureRelated to a bug, vulnerability, unexpected error with an existing feature
Description
Checked other resources
- This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/).
- I added a clear and descriptive title that summarizes this issue.
- I used the GitHub search to find a similar question and didn't find it.
- I am sure that this is a bug in LangChain rather than my code.
- The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
- I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
- I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.
Example Code
def _get_ls_params(
self, stop: Optional[list[str]] = None, **kwargs: Any
) -> LangSmithParams:
"""Get standard params for tracing."""
params = self._get_invocation_params(stop=stop, **kwargs)
ls_params = LangSmithParams(
ls_provider="openai",
ls_model_name=self.model_name,
ls_model_type="chat",
ls_temperature=params.get("temperature", self.temperature),
)
if ls_max_tokens := params.get("max_tokens", self.max_tokens) or params.get(
"max_completion_tokens", self.max_tokens
):
ls_params["ls_max_tokens"] = ls_max_tokens
if ls_stop := stop or params.get("stop", None):
ls_params["ls_stop"] = ls_stop
return ls_params
Error Message and Stack Trace (if applicable)

Description
I'm using the from langchain_deepseek.chat_models import ChatDeepSeek
as chat model, but LangSmith tracking the ls_provider as "openai", it should be "deepseek".

may be overwrite the method in class ChatDeepSeek?
def _get_ls_params(self, stop: Optional[list[str]] = None, **kwargs: Any) -> LangSmithParams:
ls_params = super()._get_ls_params(stop=stop, **kwargs)
ls_params.ls_provider = "deepseek"
return ls_params
System Info
Python Version: 3.11.0 (v3.11.0:deaf509e8f, Oct 24 2022, 14:43:23) [Clang 13.0.0 (clang-1300.0.29.30)]
Package Information
langchain_core: 0.3.74
langchain: 0.3.27
langsmith: 0.4.13
langchain_deepseek: 0.1.4
langchain_openai: 0.3.29
langchain_text_splitters: 0.3.9
Metadata
Metadata
Assignees
Labels
bugRelated to a bug, vulnerability, unexpected error with an existing featureRelated to a bug, vulnerability, unexpected error with an existing feature