langchain-core 1.0.5__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. {langchain_core-1.0.5 → langchain_core-1.1.0}/.gitignore +3 -0
  2. {langchain_core-1.0.5 → langchain_core-1.1.0}/PKG-INFO +1 -1
  3. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/language_models/__init__.py +8 -0
  4. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/language_models/chat_models.py +16 -37
  5. langchain_core-1.1.0/langchain_core/language_models/model_profile.py +84 -0
  6. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/string.py +87 -10
  7. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/graph.py +3 -2
  8. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/graph_mermaid.py +5 -1
  9. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tools/base.py +27 -2
  10. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tools/structured.py +14 -0
  11. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/mustache.py +24 -9
  12. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/version.py +1 -1
  13. {langchain_core-1.0.5 → langchain_core-1.1.0}/pyproject.toml +1 -4
  14. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/language_models/chat_models/test_base.py +5 -12
  15. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/language_models/test_imports.py +2 -0
  16. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_chat.py +161 -0
  17. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_tools.py +97 -0
  18. {langchain_core-1.0.5 → langchain_core-1.1.0}/uv.lock +2 -46
  19. {langchain_core-1.0.5 → langchain_core-1.1.0}/Makefile +0 -0
  20. {langchain_core-1.0.5 → langchain_core-1.1.0}/README.md +0 -0
  21. {langchain_core-1.0.5 → langchain_core-1.1.0}/extended_testing_deps.txt +0 -0
  22. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/__init__.py +0 -0
  23. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/_api/__init__.py +0 -0
  24. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/_api/beta_decorator.py +0 -0
  25. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/_api/deprecation.py +0 -0
  26. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/_api/internal.py +0 -0
  27. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/_api/path.py +0 -0
  28. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/_import_utils.py +0 -0
  29. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/agents.py +0 -0
  30. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/caches.py +0 -0
  31. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/callbacks/__init__.py +0 -0
  32. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/callbacks/base.py +0 -0
  33. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/callbacks/file.py +0 -0
  34. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/callbacks/manager.py +0 -0
  35. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/callbacks/stdout.py +0 -0
  36. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/callbacks/streaming_stdout.py +0 -0
  37. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/callbacks/usage.py +0 -0
  38. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/chat_history.py +0 -0
  39. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/chat_loaders.py +0 -0
  40. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/chat_sessions.py +0 -0
  41. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/document_loaders/__init__.py +0 -0
  42. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/document_loaders/base.py +0 -0
  43. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/document_loaders/blob_loaders.py +0 -0
  44. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/document_loaders/langsmith.py +0 -0
  45. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/documents/__init__.py +0 -0
  46. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/documents/base.py +0 -0
  47. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/documents/compressor.py +0 -0
  48. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/documents/transformers.py +0 -0
  49. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/embeddings/__init__.py +0 -0
  50. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/embeddings/embeddings.py +0 -0
  51. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/embeddings/fake.py +0 -0
  52. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/env.py +0 -0
  53. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/example_selectors/__init__.py +0 -0
  54. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/example_selectors/base.py +0 -0
  55. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/example_selectors/length_based.py +0 -0
  56. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/example_selectors/semantic_similarity.py +0 -0
  57. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/exceptions.py +0 -0
  58. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/globals.py +0 -0
  59. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/indexing/__init__.py +0 -0
  60. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/indexing/api.py +0 -0
  61. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/indexing/base.py +0 -0
  62. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/indexing/in_memory.py +0 -0
  63. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/language_models/_utils.py +0 -0
  64. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/language_models/base.py +0 -0
  65. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/language_models/fake.py +0 -0
  66. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/language_models/fake_chat_models.py +0 -0
  67. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/language_models/llms.py +0 -0
  68. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/load/__init__.py +0 -0
  69. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/load/dump.py +0 -0
  70. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/load/load.py +0 -0
  71. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/load/mapping.py +0 -0
  72. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/load/serializable.py +0 -0
  73. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/__init__.py +0 -0
  74. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/ai.py +0 -0
  75. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/base.py +0 -0
  76. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/block_translators/__init__.py +0 -0
  77. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/block_translators/anthropic.py +0 -0
  78. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/block_translators/bedrock.py +0 -0
  79. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/block_translators/bedrock_converse.py +0 -0
  80. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/block_translators/google_genai.py +0 -0
  81. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/block_translators/google_vertexai.py +0 -0
  82. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/block_translators/groq.py +0 -0
  83. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/block_translators/langchain_v0.py +0 -0
  84. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/block_translators/openai.py +0 -0
  85. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/chat.py +0 -0
  86. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/content.py +0 -0
  87. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/function.py +0 -0
  88. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/human.py +0 -0
  89. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/modifier.py +0 -0
  90. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/system.py +0 -0
  91. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/tool.py +0 -0
  92. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/messages/utils.py +0 -0
  93. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/__init__.py +0 -0
  94. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/base.py +0 -0
  95. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/format_instructions.py +0 -0
  96. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/json.py +0 -0
  97. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/list.py +0 -0
  98. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/openai_functions.py +0 -0
  99. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/openai_tools.py +0 -0
  100. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/pydantic.py +0 -0
  101. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/string.py +0 -0
  102. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/transform.py +0 -0
  103. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/output_parsers/xml.py +0 -0
  104. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/outputs/__init__.py +0 -0
  105. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/outputs/chat_generation.py +0 -0
  106. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/outputs/chat_result.py +0 -0
  107. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/outputs/generation.py +0 -0
  108. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/outputs/llm_result.py +0 -0
  109. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/outputs/run_info.py +0 -0
  110. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompt_values.py +0 -0
  111. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/__init__.py +0 -0
  112. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/base.py +0 -0
  113. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/chat.py +0 -0
  114. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/dict.py +0 -0
  115. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/few_shot.py +0 -0
  116. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/few_shot_with_templates.py +0 -0
  117. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/image.py +0 -0
  118. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/loading.py +0 -0
  119. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/message.py +0 -0
  120. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/prompt.py +0 -0
  121. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/prompts/structured.py +0 -0
  122. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/py.typed +0 -0
  123. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/rate_limiters.py +0 -0
  124. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/retrievers.py +0 -0
  125. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/__init__.py +0 -0
  126. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/base.py +0 -0
  127. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/branch.py +0 -0
  128. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/config.py +0 -0
  129. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/configurable.py +0 -0
  130. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/fallbacks.py +0 -0
  131. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/graph_ascii.py +0 -0
  132. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/graph_png.py +0 -0
  133. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/history.py +0 -0
  134. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/passthrough.py +0 -0
  135. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/retry.py +0 -0
  136. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/router.py +0 -0
  137. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/schema.py +0 -0
  138. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/runnables/utils.py +0 -0
  139. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/stores.py +0 -0
  140. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/structured_query.py +0 -0
  141. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/sys_info.py +0 -0
  142. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tools/__init__.py +0 -0
  143. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tools/convert.py +0 -0
  144. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tools/render.py +0 -0
  145. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tools/retriever.py +0 -0
  146. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tools/simple.py +0 -0
  147. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/__init__.py +0 -0
  148. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/_streaming.py +0 -0
  149. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/base.py +0 -0
  150. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/context.py +0 -0
  151. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/core.py +0 -0
  152. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/evaluation.py +0 -0
  153. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/event_stream.py +0 -0
  154. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/langchain.py +0 -0
  155. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/log_stream.py +0 -0
  156. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/memory_stream.py +0 -0
  157. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/root_listeners.py +0 -0
  158. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/run_collector.py +0 -0
  159. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/schemas.py +0 -0
  160. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/tracers/stdout.py +0 -0
  161. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/__init__.py +0 -0
  162. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/_merge.py +0 -0
  163. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/aiter.py +0 -0
  164. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/env.py +0 -0
  165. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/formatting.py +0 -0
  166. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/function_calling.py +0 -0
  167. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/html.py +0 -0
  168. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/image.py +0 -0
  169. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/input.py +0 -0
  170. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/interactive_env.py +0 -0
  171. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/iter.py +0 -0
  172. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/json.py +0 -0
  173. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/json_schema.py +0 -0
  174. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/pydantic.py +0 -0
  175. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/strings.py +0 -0
  176. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/usage.py +0 -0
  177. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/utils/utils.py +0 -0
  178. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/vectorstores/__init__.py +0 -0
  179. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/vectorstores/base.py +0 -0
  180. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/vectorstores/in_memory.py +0 -0
  181. {langchain_core-1.0.5 → langchain_core-1.1.0}/langchain_core/vectorstores/utils.py +0 -0
  182. {langchain_core-1.0.5 → langchain_core-1.1.0}/scripts/check_imports.py +0 -0
  183. {langchain_core-1.0.5 → langchain_core-1.1.0}/scripts/lint_imports.sh +0 -0
  184. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/__init__.py +0 -0
  185. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/benchmarks/__init__.py +0 -0
  186. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/benchmarks/test_async_callbacks.py +0 -0
  187. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/benchmarks/test_imports.py +0 -0
  188. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/integration_tests/__init__.py +0 -0
  189. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/integration_tests/test_compile.py +0 -0
  190. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/__init__.py +0 -0
  191. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/_api/__init__.py +0 -0
  192. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/_api/test_beta_decorator.py +0 -0
  193. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/_api/test_deprecation.py +0 -0
  194. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/_api/test_imports.py +0 -0
  195. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/_api/test_path.py +0 -0
  196. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/caches/__init__.py +0 -0
  197. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/caches/test_in_memory_cache.py +0 -0
  198. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/callbacks/__init__.py +0 -0
  199. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/callbacks/test_async_callback_manager.py +0 -0
  200. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/callbacks/test_dispatch_custom_event.py +0 -0
  201. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/callbacks/test_imports.py +0 -0
  202. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/callbacks/test_sync_callback_manager.py +0 -0
  203. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/callbacks/test_usage_callback.py +0 -0
  204. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/chat_history/__init__.py +0 -0
  205. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/chat_history/test_chat_history.py +0 -0
  206. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/conftest.py +0 -0
  207. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/data/prompt_file.txt +0 -0
  208. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/data/prompts/prompt_extra_args.json +0 -0
  209. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/data/prompts/prompt_missing_args.json +0 -0
  210. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/data/prompts/simple_prompt.json +0 -0
  211. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/dependencies/__init__.py +0 -0
  212. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/dependencies/test_dependencies.py +0 -0
  213. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/document_loaders/__init__.py +0 -0
  214. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/document_loaders/test_base.py +0 -0
  215. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/document_loaders/test_langsmith.py +0 -0
  216. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/documents/__init__.py +0 -0
  217. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/documents/test_document.py +0 -0
  218. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/documents/test_imports.py +0 -0
  219. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/documents/test_str.py +0 -0
  220. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/embeddings/__init__.py +0 -0
  221. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/embeddings/test_deterministic_embedding.py +0 -0
  222. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/example_selectors/__init__.py +0 -0
  223. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/example_selectors/test_base.py +0 -0
  224. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/example_selectors/test_imports.py +0 -0
  225. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/example_selectors/test_length_based_example_selector.py +0 -0
  226. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/example_selectors/test_similarity.py +0 -0
  227. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/example-non-utf8.csv +0 -0
  228. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/example-non-utf8.txt +0 -0
  229. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/example-utf8.csv +0 -0
  230. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/example-utf8.txt +0 -0
  231. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/example_prompt.json +0 -0
  232. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/examples.json +0 -0
  233. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/examples.yaml +0 -0
  234. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/few_shot_prompt.json +0 -0
  235. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/few_shot_prompt.yaml +0 -0
  236. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/few_shot_prompt_example_prompt.json +0 -0
  237. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/few_shot_prompt_examples_in.json +0 -0
  238. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/few_shot_prompt_yaml_examples.yaml +0 -0
  239. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/jinja_injection_prompt.json +0 -0
  240. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/jinja_injection_prompt.yaml +0 -0
  241. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/prompt_with_output_parser.json +0 -0
  242. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/simple_prompt.json +0 -0
  243. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/simple_prompt.yaml +0 -0
  244. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/simple_prompt_with_template_file.json +0 -0
  245. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/examples/simple_template.txt +0 -0
  246. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/fake/__init__.py +0 -0
  247. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/fake/callbacks.py +0 -0
  248. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/fake/test_fake_chat_model.py +0 -0
  249. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/indexing/__init__.py +0 -0
  250. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/indexing/test_hashed_document.py +0 -0
  251. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/indexing/test_in_memory_indexer.py +0 -0
  252. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/indexing/test_in_memory_record_manager.py +0 -0
  253. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/indexing/test_indexing.py +0 -0
  254. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/indexing/test_public_api.py +0 -0
  255. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/language_models/__init__.py +0 -0
  256. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/language_models/chat_models/__init__.py +0 -0
  257. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/language_models/chat_models/test_benchmark.py +0 -0
  258. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/language_models/chat_models/test_cache.py +0 -0
  259. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/language_models/chat_models/test_rate_limiting.py +0 -0
  260. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/language_models/llms/__init__.py +0 -0
  261. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/language_models/llms/test_base.py +0 -0
  262. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/language_models/llms/test_cache.py +0 -0
  263. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/load/__init__.py +0 -0
  264. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/load/test_imports.py +0 -0
  265. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/load/test_serializable.py +0 -0
  266. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/__init__.py +0 -0
  267. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/block_translators/__init__.py +0 -0
  268. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/block_translators/test_anthropic.py +0 -0
  269. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/block_translators/test_bedrock.py +0 -0
  270. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/block_translators/test_bedrock_converse.py +0 -0
  271. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/block_translators/test_groq.py +0 -0
  272. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/block_translators/test_langchain_v0.py +0 -0
  273. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/block_translators/test_openai.py +0 -0
  274. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/block_translators/test_registration.py +0 -0
  275. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/test_ai.py +0 -0
  276. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/test_imports.py +0 -0
  277. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/messages/test_utils.py +0 -0
  278. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/output_parsers/__init__.py +0 -0
  279. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/output_parsers/test_base_parsers.py +0 -0
  280. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/output_parsers/test_imports.py +0 -0
  281. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/output_parsers/test_json.py +0 -0
  282. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/output_parsers/test_list_parser.py +0 -0
  283. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/output_parsers/test_openai_functions.py +0 -0
  284. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/output_parsers/test_openai_tools.py +0 -0
  285. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/output_parsers/test_pydantic_parser.py +0 -0
  286. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/output_parsers/test_xml_parser.py +0 -0
  287. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/outputs/__init__.py +0 -0
  288. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/outputs/test_chat_generation.py +0 -0
  289. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/outputs/test_imports.py +0 -0
  290. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompt_file.txt +0 -0
  291. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/__init__.py +0 -0
  292. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/__snapshots__/test_chat.ambr +0 -0
  293. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/__snapshots__/test_prompt.ambr +0 -0
  294. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/prompt_extra_args.json +0 -0
  295. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/prompt_missing_args.json +0 -0
  296. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/simple_prompt.json +0 -0
  297. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_dict.py +0 -0
  298. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_few_shot.py +0 -0
  299. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_few_shot_with_templates.py +0 -0
  300. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_image.py +0 -0
  301. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_imports.py +0 -0
  302. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_loading.py +0 -0
  303. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_prompt.py +0 -0
  304. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_string.py +0 -0
  305. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_structured.py +0 -0
  306. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/prompts/test_utils.py +0 -0
  307. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/pydantic_utils.py +0 -0
  308. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/rate_limiters/__init__.py +0 -0
  309. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/rate_limiters/test_in_memory_rate_limiter.py +0 -0
  310. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/__init__.py +0 -0
  311. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr +0 -0
  312. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/__snapshots__/test_graph.ambr +0 -0
  313. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr +0 -0
  314. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_concurrency.py +0 -0
  315. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_config.py +0 -0
  316. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_configurable.py +0 -0
  317. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_fallbacks.py +0 -0
  318. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_graph.py +0 -0
  319. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_history.py +0 -0
  320. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_imports.py +0 -0
  321. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_runnable.py +0 -0
  322. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_runnable_events_v1.py +0 -0
  323. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_runnable_events_v2.py +0 -0
  324. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_tracing_interops.py +0 -0
  325. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/runnables/test_utils.py +0 -0
  326. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/stores/__init__.py +0 -0
  327. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/stores/test_in_memory.py +0 -0
  328. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/stubs.py +0 -0
  329. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_globals.py +0 -0
  330. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_imports.py +0 -0
  331. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_messages.py +0 -0
  332. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_outputs.py +0 -0
  333. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_prompt_values.py +0 -0
  334. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_pydantic_imports.py +0 -0
  335. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_pydantic_serde.py +0 -0
  336. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_retrievers.py +0 -0
  337. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_setup.py +0 -0
  338. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/test_sys_info.py +0 -0
  339. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/tracers/__init__.py +0 -0
  340. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/tracers/test_async_base_tracer.py +0 -0
  341. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/tracers/test_base_tracer.py +0 -0
  342. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/tracers/test_imports.py +0 -0
  343. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/tracers/test_langchain.py +0 -0
  344. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/tracers/test_memory_stream.py +0 -0
  345. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/tracers/test_run_collector.py +0 -0
  346. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/tracers/test_schemas.py +0 -0
  347. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/__init__.py +0 -0
  348. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_aiter.py +0 -0
  349. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_env.py +0 -0
  350. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_function_calling.py +0 -0
  351. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_html.py +0 -0
  352. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_imports.py +0 -0
  353. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_iter.py +0 -0
  354. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_json_schema.py +0 -0
  355. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_pydantic.py +0 -0
  356. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_rm_titles.py +0 -0
  357. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_strings.py +0 -0
  358. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_usage.py +0 -0
  359. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/utils/test_utils.py +0 -0
  360. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/vectorstores/__init__.py +0 -0
  361. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/vectorstores/test_in_memory.py +0 -0
  362. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/vectorstores/test_utils.py +0 -0
  363. {langchain_core-1.0.5 → langchain_core-1.1.0}/tests/unit_tests/vectorstores/test_vectorstore.py +0 -0
@@ -163,3 +163,6 @@ node_modules
163
163
 
164
164
  prof
165
165
  virtualenv/
166
+ scratch/
167
+
168
+ .langgraph_api/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langchain-core
3
- Version: 1.0.5
3
+ Version: 1.1.0
4
4
  Summary: Building applications with LLMs through composability
5
5
  Project-URL: Homepage, https://docs.langchain.com/
6
6
  Project-URL: Documentation, https://reference.langchain.com/python/langchain_core/
@@ -53,6 +53,10 @@ if TYPE_CHECKING:
53
53
  ParrotFakeChatModel,
54
54
  )
55
55
  from langchain_core.language_models.llms import LLM, BaseLLM
56
+ from langchain_core.language_models.model_profile import (
57
+ ModelProfile,
58
+ ModelProfileRegistry,
59
+ )
56
60
 
57
61
  __all__ = (
58
62
  "LLM",
@@ -68,6 +72,8 @@ __all__ = (
68
72
  "LanguageModelInput",
69
73
  "LanguageModelLike",
70
74
  "LanguageModelOutput",
75
+ "ModelProfile",
76
+ "ModelProfileRegistry",
71
77
  "ParrotFakeChatModel",
72
78
  "SimpleChatModel",
73
79
  "get_tokenizer",
@@ -90,6 +96,8 @@ _dynamic_imports = {
90
96
  "GenericFakeChatModel": "fake_chat_models",
91
97
  "ParrotFakeChatModel": "fake_chat_models",
92
98
  "LLM": "llms",
99
+ "ModelProfile": "model_profile",
100
+ "ModelProfileRegistry": "model_profile",
93
101
  "BaseLLM": "llms",
94
102
  "is_openai_data_block": "_utils",
95
103
  }
@@ -15,7 +15,6 @@ from typing import TYPE_CHECKING, Any, Literal, cast
15
15
  from pydantic import BaseModel, ConfigDict, Field
16
16
  from typing_extensions import override
17
17
 
18
- from langchain_core._api.beta_decorator import beta
19
18
  from langchain_core.caches import BaseCache
20
19
  from langchain_core.callbacks import (
21
20
  AsyncCallbackManager,
@@ -34,6 +33,7 @@ from langchain_core.language_models.base import (
34
33
  LangSmithParams,
35
34
  LanguageModelInput,
36
35
  )
36
+ from langchain_core.language_models.model_profile import ModelProfile
37
37
  from langchain_core.load import dumpd, dumps
38
38
  from langchain_core.messages import (
39
39
  AIMessage,
@@ -76,8 +76,6 @@ from langchain_core.utils.utils import LC_ID_PREFIX, from_env
76
76
  if TYPE_CHECKING:
77
77
  import uuid
78
78
 
79
- from langchain_model_profiles import ModelProfile # type: ignore[import-untyped]
80
-
81
79
  from langchain_core.output_parsers.base import OutputParserLike
82
80
  from langchain_core.runnables import Runnable, RunnableConfig
83
81
  from langchain_core.tools import BaseTool
@@ -339,6 +337,21 @@ class BaseChatModel(BaseLanguageModel[AIMessage], ABC):
339
337
 
340
338
  """
341
339
 
340
+ profile: ModelProfile | None = Field(default=None, exclude=True)
341
+ """Profile detailing model capabilities.
342
+
343
+ !!! warning "Beta feature"
344
+ This is a beta feature. The format of model profiles is subject to change.
345
+
346
+ If not specified, automatically loaded from the provider package on initialization
347
+ if data is available.
348
+
349
+ Example profile data includes context window sizes, supported modalities, or support
350
+ for tool calling, structured output, and other features.
351
+
352
+ !!! version-added "Added in `langchain-core` 1.1"
353
+ """
354
+
342
355
  model_config = ConfigDict(
343
356
  arbitrary_types_allowed=True,
344
357
  )
@@ -1688,40 +1701,6 @@ class BaseChatModel(BaseLanguageModel[AIMessage], ABC):
1688
1701
  return RunnableMap(raw=llm) | parser_with_fallback
1689
1702
  return llm | output_parser
1690
1703
 
1691
- @property
1692
- @beta()
1693
- def profile(self) -> ModelProfile:
1694
- """Return profiling information for the model.
1695
-
1696
- This property relies on the `langchain-model-profiles` package to retrieve chat
1697
- model capabilities, such as context window sizes and supported features.
1698
-
1699
- Raises:
1700
- ImportError: If `langchain-model-profiles` is not installed.
1701
-
1702
- Returns:
1703
- A `ModelProfile` object containing profiling information for the model.
1704
- """
1705
- try:
1706
- from langchain_model_profiles import get_model_profile # noqa: PLC0415
1707
- except ImportError as err:
1708
- informative_error_message = (
1709
- "To access model profiling information, please install the "
1710
- "`langchain-model-profiles` package: "
1711
- "`pip install langchain-model-profiles`."
1712
- )
1713
- raise ImportError(informative_error_message) from err
1714
-
1715
- provider_id = self._llm_type
1716
- model_name = (
1717
- # Model name is not standardized across integrations. New integrations
1718
- # should prefer `model`.
1719
- getattr(self, "model", None)
1720
- or getattr(self, "model_name", None)
1721
- or getattr(self, "model_id", "")
1722
- )
1723
- return get_model_profile(provider_id, model_name) or {}
1724
-
1725
1704
 
1726
1705
  class SimpleChatModel(BaseChatModel):
1727
1706
  """Simplified implementation for a chat model to inherit from.
@@ -0,0 +1,84 @@
1
+ """Model profile types and utilities."""
2
+
3
+ from typing_extensions import TypedDict
4
+
5
+
6
+ class ModelProfile(TypedDict, total=False):
7
+ """Model profile.
8
+
9
+ !!! warning "Beta feature"
10
+ This is a beta feature. The format of model profiles is subject to change.
11
+
12
+ Provides information about chat model capabilities, such as context window sizes
13
+ and supported features.
14
+ """
15
+
16
+ # --- Input constraints ---
17
+
18
+ max_input_tokens: int
19
+ """Maximum context window (tokens)"""
20
+
21
+ image_inputs: bool
22
+ """Whether image inputs are supported."""
23
+ # TODO: add more detail about formats?
24
+
25
+ image_url_inputs: bool
26
+ """Whether [image URL inputs](https://docs.langchain.com/oss/python/langchain/models#multimodal)
27
+ are supported."""
28
+
29
+ pdf_inputs: bool
30
+ """Whether [PDF inputs](https://docs.langchain.com/oss/python/langchain/models#multimodal)
31
+ are supported."""
32
+ # TODO: add more detail about formats? e.g. bytes or base64
33
+
34
+ audio_inputs: bool
35
+ """Whether [audio inputs](https://docs.langchain.com/oss/python/langchain/models#multimodal)
36
+ are supported."""
37
+ # TODO: add more detail about formats? e.g. bytes or base64
38
+
39
+ video_inputs: bool
40
+ """Whether [video inputs](https://docs.langchain.com/oss/python/langchain/models#multimodal)
41
+ are supported."""
42
+ # TODO: add more detail about formats? e.g. bytes or base64
43
+
44
+ image_tool_message: bool
45
+ """Whether images can be included in tool messages."""
46
+
47
+ pdf_tool_message: bool
48
+ """Whether PDFs can be included in tool messages."""
49
+
50
+ # --- Output constraints ---
51
+
52
+ max_output_tokens: int
53
+ """Maximum output tokens"""
54
+
55
+ reasoning_output: bool
56
+ """Whether the model supports [reasoning / chain-of-thought](https://docs.langchain.com/oss/python/langchain/models#reasoning)"""
57
+
58
+ image_outputs: bool
59
+ """Whether [image outputs](https://docs.langchain.com/oss/python/langchain/models#multimodal)
60
+ are supported."""
61
+
62
+ audio_outputs: bool
63
+ """Whether [audio outputs](https://docs.langchain.com/oss/python/langchain/models#multimodal)
64
+ are supported."""
65
+
66
+ video_outputs: bool
67
+ """Whether [video outputs](https://docs.langchain.com/oss/python/langchain/models#multimodal)
68
+ are supported."""
69
+
70
+ # --- Tool calling ---
71
+ tool_calling: bool
72
+ """Whether the model supports [tool calling](https://docs.langchain.com/oss/python/langchain/models#tool-calling)"""
73
+
74
+ tool_choice: bool
75
+ """Whether the model supports [tool choice](https://docs.langchain.com/oss/python/langchain/models#forcing-tool-calls)"""
76
+
77
+ # --- Structured output ---
78
+ structured_output: bool
79
+ """Whether the model supports a native [structured output](https://docs.langchain.com/oss/python/langchain/models#structured-outputs)
80
+ feature"""
81
+
82
+
83
+ ModelProfileRegistry = dict[str, ModelProfile]
84
+ """Registry mapping model identifiers or names to their ModelProfile."""
@@ -19,9 +19,66 @@ if TYPE_CHECKING:
19
19
  from collections.abc import Callable, Sequence
20
20
 
21
21
  try:
22
- from jinja2 import Environment, meta
22
+ from jinja2 import meta
23
+ from jinja2.exceptions import SecurityError
23
24
  from jinja2.sandbox import SandboxedEnvironment
24
25
 
26
+ class _RestrictedSandboxedEnvironment(SandboxedEnvironment):
27
+ """A more restrictive Jinja2 sandbox that blocks all attribute/method access.
28
+
29
+ This sandbox only allows simple variable lookups, no attribute or method access.
30
+ This prevents template injection attacks via methods like parse_raw().
31
+ """
32
+
33
+ def is_safe_attribute(self, _obj: Any, _attr: str, _value: Any) -> bool:
34
+ """Block ALL attribute access for security.
35
+
36
+ Only allow accessing variables directly from the context dict,
37
+ no attribute access on those objects.
38
+
39
+ Args:
40
+ _obj: The object being accessed (unused, always blocked).
41
+ _attr: The attribute name (unused, always blocked).
42
+ _value: The attribute value (unused, always blocked).
43
+
44
+ Returns:
45
+ False - all attribute access is blocked.
46
+ """
47
+ # Block all attribute access
48
+ return False
49
+
50
+ def is_safe_callable(self, _obj: Any) -> bool:
51
+ """Block all method calls for security.
52
+
53
+ Args:
54
+ _obj: The object being checked (unused, always blocked).
55
+
56
+ Returns:
57
+ False - all callables are blocked.
58
+ """
59
+ return False
60
+
61
+ def getattr(self, obj: Any, attribute: str) -> Any:
62
+ """Override getattr to block all attribute access.
63
+
64
+ Args:
65
+ obj: The object.
66
+ attribute: The attribute name.
67
+
68
+ Returns:
69
+ Never returns.
70
+
71
+ Raises:
72
+ SecurityError: Always, to block attribute access.
73
+ """
74
+ msg = (
75
+ f"Access to attributes is not allowed in templates. "
76
+ f"Attempted to access '{attribute}' on {type(obj).__name__}. "
77
+ f"Use only simple variable names like {{{{variable}}}} "
78
+ f"without dots or methods."
79
+ )
80
+ raise SecurityError(msg)
81
+
25
82
  _HAS_JINJA2 = True
26
83
  except ImportError:
27
84
  _HAS_JINJA2 = False
@@ -61,14 +118,10 @@ def jinja2_formatter(template: str, /, **kwargs: Any) -> str:
61
118
  )
62
119
  raise ImportError(msg)
63
120
 
64
- # This uses a sandboxed environment to prevent arbitrary code execution.
65
- # Jinja2 uses an opt-out rather than opt-in approach for sand-boxing.
66
- # Please treat this sand-boxing as a best-effort approach rather than
67
- # a guarantee of security.
68
- # We recommend to never use jinja2 templates with untrusted inputs.
69
- # https://jinja.palletsprojects.com/en/3.1.x/sandbox/
70
- # approach not a guarantee of security.
71
- return SandboxedEnvironment().from_string(template).render(**kwargs)
121
+ # Use a restricted sandbox that blocks ALL attribute/method access
122
+ # Only simple variable lookups like {{variable}} are allowed
123
+ # Attribute access like {{variable.attr}} or {{variable.method()}} is blocked
124
+ return _RestrictedSandboxedEnvironment().from_string(template).render(**kwargs)
72
125
 
73
126
 
74
127
  def validate_jinja2(template: str, input_variables: list[str]) -> None:
@@ -103,7 +156,7 @@ def _get_jinja2_variables_from_template(template: str) -> set[str]:
103
156
  "Please install it with `pip install jinja2`."
104
157
  )
105
158
  raise ImportError(msg)
106
- env = Environment() # noqa: S701
159
+ env = _RestrictedSandboxedEnvironment()
107
160
  ast = env.parse(template)
108
161
  return meta.find_undeclared_variables(ast)
109
162
 
@@ -273,6 +326,30 @@ def get_template_variables(template: str, template_format: str) -> list[str]:
273
326
  msg = f"Unsupported template format: {template_format}"
274
327
  raise ValueError(msg)
275
328
 
329
+ # For f-strings, block attribute access and indexing syntax
330
+ # This prevents template injection attacks via accessing dangerous attributes
331
+ if template_format == "f-string":
332
+ for var in input_variables:
333
+ # Formatter().parse() returns field names with dots/brackets if present
334
+ # e.g., "obj.attr" or "obj[0]" - we need to block these
335
+ if "." in var or "[" in var or "]" in var:
336
+ msg = (
337
+ f"Invalid variable name {var!r} in f-string template. "
338
+ f"Variable names cannot contain attribute "
339
+ f"access (.) or indexing ([])."
340
+ )
341
+ raise ValueError(msg)
342
+
343
+ # Block variable names that are all digits (e.g., "0", "100")
344
+ # These are interpreted as positional arguments, not keyword arguments
345
+ if var.isdigit():
346
+ msg = (
347
+ f"Invalid variable name {var!r} in f-string template. "
348
+ f"Variable names cannot be all digits as they are interpreted "
349
+ f"as positional arguments."
350
+ )
351
+ raise ValueError(msg)
352
+
276
353
  return sorted(input_variables)
277
354
 
278
355
 
@@ -641,6 +641,7 @@ class Graph:
641
641
  retry_delay: float = 1.0,
642
642
  frontmatter_config: dict[str, Any] | None = None,
643
643
  base_url: str | None = None,
644
+ proxies: dict[str, str] | None = None,
644
645
  ) -> bytes:
645
646
  """Draw the graph as a PNG image using Mermaid.
646
647
 
@@ -673,11 +674,10 @@ class Graph:
673
674
  }
674
675
  ```
675
676
  base_url: The base URL of the Mermaid server for rendering via API.
676
-
677
+ proxies: HTTP/HTTPS proxies for requests (e.g. `{"http": "http://127.0.0.1:7890"}`).
677
678
 
678
679
  Returns:
679
680
  The PNG image as bytes.
680
-
681
681
  """
682
682
  # Import locally to prevent circular import
683
683
  from langchain_core.runnables.graph_mermaid import ( # noqa: PLC0415
@@ -698,6 +698,7 @@ class Graph:
698
698
  padding=padding,
699
699
  max_retries=max_retries,
700
700
  retry_delay=retry_delay,
701
+ proxies=proxies,
701
702
  base_url=base_url,
702
703
  )
703
704
 
@@ -281,6 +281,7 @@ def draw_mermaid_png(
281
281
  max_retries: int = 1,
282
282
  retry_delay: float = 1.0,
283
283
  base_url: str | None = None,
284
+ proxies: dict[str, str] | None = None,
284
285
  ) -> bytes:
285
286
  """Draws a Mermaid graph as PNG using provided syntax.
286
287
 
@@ -293,6 +294,7 @@ def draw_mermaid_png(
293
294
  max_retries: Maximum number of retries (MermaidDrawMethod.API).
294
295
  retry_delay: Delay between retries (MermaidDrawMethod.API).
295
296
  base_url: Base URL for the Mermaid.ink API.
297
+ proxies: HTTP/HTTPS proxies for requests (e.g. `{"http": "http://127.0.0.1:7890"}`).
296
298
 
297
299
  Returns:
298
300
  PNG image bytes.
@@ -314,6 +316,7 @@ def draw_mermaid_png(
314
316
  max_retries=max_retries,
315
317
  retry_delay=retry_delay,
316
318
  base_url=base_url,
319
+ proxies=proxies,
317
320
  )
318
321
  else:
319
322
  supported_methods = ", ".join([m.value for m in MermaidDrawMethod])
@@ -405,6 +408,7 @@ def _render_mermaid_using_api(
405
408
  file_type: Literal["jpeg", "png", "webp"] | None = "png",
406
409
  max_retries: int = 1,
407
410
  retry_delay: float = 1.0,
411
+ proxies: dict[str, str] | None = None,
408
412
  base_url: str | None = None,
409
413
  ) -> bytes:
410
414
  """Renders Mermaid graph using the Mermaid.INK API."""
@@ -445,7 +449,7 @@ def _render_mermaid_using_api(
445
449
 
446
450
  for attempt in range(max_retries + 1):
447
451
  try:
448
- response = requests.get(image_url, timeout=10)
452
+ response = requests.get(image_url, timeout=10, proxies=proxies)
449
453
  if response.status_code == requests.codes.ok:
450
454
  img_bytes = response.content
451
455
  if output_file_path is not None:
@@ -386,6 +386,8 @@ class ToolException(Exception): # noqa: N818
386
386
 
387
387
  ArgsSchema = TypeBaseModel | dict[str, Any]
388
388
 
389
+ _EMPTY_SET: frozenset[str] = frozenset()
390
+
389
391
 
390
392
  class BaseTool(RunnableSerializable[str | dict | ToolCall, Any]):
391
393
  """Base class for all LangChain tools.
@@ -569,6 +571,11 @@ class ChildTool(BaseTool):
569
571
  self.name, full_schema, fields, fn_description=self.description
570
572
  )
571
573
 
574
+ @functools.cached_property
575
+ def _injected_args_keys(self) -> frozenset[str]:
576
+ # base implementation doesn't manage injected args
577
+ return _EMPTY_SET
578
+
572
579
  # --- Runnable ---
573
580
 
574
581
  @override
@@ -649,6 +656,7 @@ class ChildTool(BaseTool):
649
656
  if isinstance(input_args, dict):
650
657
  return tool_input
651
658
  if issubclass(input_args, BaseModel):
659
+ # Check args_schema for InjectedToolCallId
652
660
  for k, v in get_all_basemodel_annotations(input_args).items():
653
661
  if _is_injected_arg_type(v, injected_type=InjectedToolCallId):
654
662
  if tool_call_id is None:
@@ -664,6 +672,7 @@ class ChildTool(BaseTool):
664
672
  result = input_args.model_validate(tool_input)
665
673
  result_dict = result.model_dump()
666
674
  elif issubclass(input_args, BaseModelV1):
675
+ # Check args_schema for InjectedToolCallId
667
676
  for k, v in get_all_basemodel_annotations(input_args).items():
668
677
  if _is_injected_arg_type(v, injected_type=InjectedToolCallId):
669
678
  if tool_call_id is None:
@@ -683,9 +692,25 @@ class ChildTool(BaseTool):
683
692
  f"args_schema must be a Pydantic BaseModel, got {self.args_schema}"
684
693
  )
685
694
  raise NotImplementedError(msg)
686
- return {
687
- k: getattr(result, k) for k, v in result_dict.items() if k in tool_input
695
+ validated_input = {
696
+ k: getattr(result, k) for k in result_dict if k in tool_input
688
697
  }
698
+ for k in self._injected_args_keys:
699
+ if k == "tool_call_id":
700
+ if tool_call_id is None:
701
+ msg = (
702
+ "When tool includes an InjectedToolCallId "
703
+ "argument, tool must always be invoked with a full "
704
+ "model ToolCall of the form: {'args': {...}, "
705
+ "'name': '...', 'type': 'tool_call', "
706
+ "'tool_call_id': '...'}"
707
+ )
708
+ raise ValueError(msg)
709
+ validated_input[k] = tool_call_id
710
+ if k in tool_input:
711
+ injected_val = tool_input[k]
712
+ validated_input[k] = injected_val
713
+ return validated_input
689
714
  return tool_input
690
715
 
691
716
  @abstractmethod
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ import functools
5
6
  import textwrap
6
7
  from collections.abc import Awaitable, Callable
7
8
  from inspect import signature
@@ -21,10 +22,12 @@ from langchain_core.callbacks import (
21
22
  )
22
23
  from langchain_core.runnables import RunnableConfig, run_in_executor
23
24
  from langchain_core.tools.base import (
25
+ _EMPTY_SET,
24
26
  FILTERED_ARGS,
25
27
  ArgsSchema,
26
28
  BaseTool,
27
29
  _get_runnable_config_param,
30
+ _is_injected_arg_type,
28
31
  create_schema_from_function,
29
32
  )
30
33
  from langchain_core.utils.pydantic import is_basemodel_subclass
@@ -241,6 +244,17 @@ class StructuredTool(BaseTool):
241
244
  **kwargs,
242
245
  )
243
246
 
247
+ @functools.cached_property
248
+ def _injected_args_keys(self) -> frozenset[str]:
249
+ fn = self.func or self.coroutine
250
+ if fn is None:
251
+ return _EMPTY_SET
252
+ return frozenset(
253
+ k
254
+ for k, v in signature(fn).parameters.items()
255
+ if _is_injected_arg_type(v.annotation)
256
+ )
257
+
244
258
 
245
259
  def _filter_schema_args(func: Callable) -> list[str]:
246
260
  filter_args = list(FILTERED_ARGS)
@@ -374,15 +374,29 @@ def _get_key(
374
374
  if resolved_scope in (0, False):
375
375
  return resolved_scope
376
376
  # Move into the scope
377
- try:
378
- # Try subscripting (Normal dictionaries)
379
- resolved_scope = cast("dict[str, Any]", resolved_scope)[child]
380
- except (TypeError, AttributeError):
377
+ if isinstance(resolved_scope, dict):
381
378
  try:
382
- resolved_scope = getattr(resolved_scope, child)
383
- except (TypeError, AttributeError):
384
- # Try as a list
385
- resolved_scope = resolved_scope[int(child)] # type: ignore[index]
379
+ resolved_scope = resolved_scope[child]
380
+ except (KeyError, TypeError):
381
+ # Key not found - will be caught by outer try-except
382
+ msg = f"Key {child!r} not found in dict"
383
+ raise KeyError(msg) from None
384
+ elif isinstance(resolved_scope, (list, tuple)):
385
+ try:
386
+ resolved_scope = resolved_scope[int(child)]
387
+ except (ValueError, IndexError, TypeError):
388
+ # Invalid index - will be caught by outer try-except
389
+ msg = f"Invalid index {child!r} for list/tuple"
390
+ raise IndexError(msg) from None
391
+ else:
392
+ # Reject everything else for security
393
+ # This prevents traversing into arbitrary Python objects
394
+ msg = (
395
+ f"Cannot traverse into {type(resolved_scope).__name__}. "
396
+ "Mustache templates only support dict, list, and tuple. "
397
+ f"Got: {type(resolved_scope)}"
398
+ )
399
+ raise TypeError(msg) # noqa: TRY301
386
400
 
387
401
  try:
388
402
  # This allows for custom falsy data types
@@ -393,8 +407,9 @@ def _get_key(
393
407
  if resolved_scope in (0, False):
394
408
  return resolved_scope
395
409
  return resolved_scope or ""
396
- except (AttributeError, KeyError, IndexError, ValueError):
410
+ except (AttributeError, KeyError, IndexError, ValueError, TypeError):
397
411
  # We couldn't find the key in the current scope
412
+ # TypeError: Attempted to traverse into non-dict/list type
398
413
  # We'll try again on the next pass
399
414
  pass
400
415
 
@@ -1,3 +1,3 @@
1
1
  """langchain-core version information and utilities."""
2
2
 
3
- VERSION = "1.0.5"
3
+ VERSION = "1.1.0"
@@ -9,7 +9,7 @@ license = {text = "MIT"}
9
9
  readme = "README.md"
10
10
  authors = []
11
11
 
12
- version = "1.0.5"
12
+ version = "1.1.0"
13
13
  requires-python = ">=3.10.0,<4.0.0"
14
14
  dependencies = [
15
15
  "langsmith>=0.3.45,<1.0.0",
@@ -36,7 +36,6 @@ typing = [
36
36
  "mypy>=1.18.1,<1.19.0",
37
37
  "types-pyyaml>=6.0.12.2,<7.0.0.0",
38
38
  "types-requests>=2.28.11.5,<3.0.0.0",
39
- "langchain-model-profiles",
40
39
  "langchain-text-splitters",
41
40
  ]
42
41
  dev = [
@@ -58,7 +57,6 @@ test = [
58
57
  "blockbuster>=1.5.18,<1.6.0",
59
58
  "numpy>=1.26.4; python_version<'3.13'",
60
59
  "numpy>=2.1.0; python_version>='3.13'",
61
- "langchain-model-profiles",
62
60
  "langchain-tests",
63
61
  "pytest-benchmark",
64
62
  "pytest-codspeed",
@@ -66,7 +64,6 @@ test = [
66
64
  test_integration = []
67
65
 
68
66
  [tool.uv.sources]
69
- langchain-model-profiles = { path = "../model-profiles" }
70
67
  langchain-tests = { path = "../standard-tests" }
71
68
  langchain-text-splitters = { path = "../text-splitters" }
72
69
 
@@ -1222,19 +1222,12 @@ def test_get_ls_params() -> None:
1222
1222
 
1223
1223
  def test_model_profiles() -> None:
1224
1224
  model = GenericFakeChatModel(messages=iter([]))
1225
- profile = model.profile
1226
- assert profile == {}
1225
+ assert model.profile is None
1227
1226
 
1228
- class MyModel(GenericFakeChatModel):
1229
- model: str = "gpt-5"
1230
-
1231
- @property
1232
- def _llm_type(self) -> str:
1233
- return "openai-chat"
1234
-
1235
- model = MyModel(messages=iter([]))
1236
- profile = model.profile
1237
- assert profile
1227
+ model_with_profile = GenericFakeChatModel(
1228
+ messages=iter([]), profile={"max_input_tokens": 100}
1229
+ )
1230
+ assert model_with_profile.profile == {"max_input_tokens": 100}
1238
1231
 
1239
1232
 
1240
1233
  class MockResponse:
@@ -18,6 +18,8 @@ EXPECTED_ALL = [
18
18
  "FakeStreamingListLLM",
19
19
  "FakeListLLM",
20
20
  "ParrotFakeChatModel",
21
+ "ModelProfile",
22
+ "ModelProfileRegistry",
21
23
  "is_openai_data_block",
22
24
  ]
23
25