File tree Expand file tree Collapse file tree 7 files changed +72
-5
lines changed
tests/unit_tests/language_models/chat_models Expand file tree Collapse file tree 7 files changed +72
-5
lines changed Original file line number Diff line number Diff line change @@ -377,6 +377,7 @@ jobs:
377377 XAI_API_KEY : ${{ secrets.XAI_API_KEY }}
378378 DEEPSEEK_API_KEY : ${{ secrets.DEEPSEEK_API_KEY }}
379379 PPLX_API_KEY : ${{ secrets.PPLX_API_KEY }}
380+ LANGCHAIN_TESTS_USER_AGENT : ${{ secrets.LANGCHAIN_TESTS_USER_AGENT }}
380381 run : make integration_tests
381382 working-directory : ${{ inputs.working-directory }}
382383
@@ -395,7 +396,7 @@ jobs:
395396 contents : read
396397 strategy :
397398 matrix :
398- partner : [anthropic ]
399+ partner : [openai ]
399400 fail-fast : false # Continue testing other partners if one fails
400401 env :
401402 ANTHROPIC_API_KEY : ${{ secrets.ANTHROPIC_API_KEY }}
@@ -409,6 +410,7 @@ jobs:
409410 AZURE_OPENAI_LEGACY_CHAT_DEPLOYMENT_NAME : ${{ secrets.AZURE_OPENAI_LEGACY_CHAT_DEPLOYMENT_NAME }}
410411 AZURE_OPENAI_LLM_DEPLOYMENT_NAME : ${{ secrets.AZURE_OPENAI_LLM_DEPLOYMENT_NAME }}
411412 AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME : ${{ secrets.AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME }}
413+ LANGCHAIN_TESTS_USER_AGENT : ${{ secrets.LANGCHAIN_TESTS_USER_AGENT }}
412414 steps :
413415 - uses : actions/checkout@v5
414416
Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ jobs:
155155 WATSONX_APIKEY : ${{ secrets.WATSONX_APIKEY }}
156156 WATSONX_PROJECT_ID : ${{ secrets.WATSONX_PROJECT_ID }}
157157 XAI_API_KEY : ${{ secrets.XAI_API_KEY }}
158+ LANGCHAIN_TESTS_USER_AGENT : ${{ secrets.LANGCHAIN_TESTS_USER_AGENT }}
158159 run : |
159160 cd langchain/${{ matrix.working-directory }}
160161 make integration_tests
Original file line number Diff line number Diff line change 7676if TYPE_CHECKING :
7777 import uuid
7878
79- from langchain_model_profiles import ModelProfile # type: ignore[import-not-found ]
79+ from langchain_model_profiles import ModelProfile # type: ignore[import-untyped ]
8080
8181 from langchain_core .output_parsers .base import OutputParserLike
8282 from langchain_core .runnables import Runnable , RunnableConfig
Original file line number Diff line number Diff line change 11"""langchain-core version information and utilities."""
22
3- VERSION = "1.0.2 "
3+ VERSION = "1.0.3 "
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ dependencies = [
1616 " pydantic>=2.7.4,<3.0.0" ,
1717]
1818name = " langchain-core"
19- version = " 1.0.2 "
19+ version = " 1.0.3 "
2020description = " Building applications with LLMs through composability"
2121readme = " README.md"
2222
@@ -35,6 +35,7 @@ typing = [
3535 " mypy>=1.18.1,<1.19.0" ,
3636 " types-pyyaml>=6.0.12.2,<7.0.0.0" ,
3737 " types-requests>=2.28.11.5,<3.0.0.0" ,
38+ " langchain-model-profiles" ,
3839 " langchain-text-splitters" ,
3940]
4041dev = [
@@ -56,13 +57,15 @@ test = [
5657 " blockbuster>=1.5.18,<1.6.0" ,
5758 " numpy>=1.26.4; python_version<'3.13'" ,
5859 " numpy>=2.1.0; python_version>='3.13'" ,
60+ " langchain-model-profiles" ,
5961 " langchain-tests" ,
6062 " pytest-benchmark" ,
6163 " pytest-codspeed" ,
6264]
6365test_integration = []
6466
6567[tool .uv .sources ]
68+ langchain-model-profiles = { path = " ../model-profiles" }
6669langchain-tests = { path = " ../standard-tests" }
6770langchain-text-splitters = { path = " ../text-splitters" }
6871
Original file line number Diff line number Diff line change @@ -1217,3 +1217,20 @@ def _llm_type(self) -> str:
12171217
12181218 ls_params = llm ._get_ls_params (stop = ["stop" ])
12191219 assert ls_params ["ls_stop" ] == ["stop" ]
1220+
1221+
1222+ def test_model_profiles () -> None :
1223+ model = GenericFakeChatModel (messages = iter ([]))
1224+ profile = model .profile
1225+ assert profile == {}
1226+
1227+ class MyModel (GenericFakeChatModel ):
1228+ model : str = "gpt-5"
1229+
1230+ @property
1231+ def _llm_type (self ) -> str :
1232+ return "openai-chat"
1233+
1234+ model = MyModel (messages = iter ([]))
1235+ profile = model .profile
1236+ assert profile
You can’t perform that action at this time.
0 commit comments