Skip to content

Commit df2c96a

Browse files
authored
Merge branch 'main' into codex/update-_to_chat_prompt-to-accept-tools-parameter
2 parents 31569d2 + be41dac commit df2c96a

File tree

20 files changed

+512
-49
lines changed

20 files changed

+512
-49
lines changed

.github/pr-file-labeler.yml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Label PRs (config)
2+
# Automatically applies labels based on changed files and branch patterns
3+
4+
adapters:
5+
- changed-files:
6+
- any-glob-to-any-file:
7+
- "libs/community/adapters/**/*"
8+
9+
agent_toolkits:
10+
- changed-files:
11+
- any-glob-to-any-file:
12+
- "libs/community/agent_toolkits/**/*"
13+
14+
agents:
15+
- changed-files:
16+
- any-glob-to-any-file:
17+
- "libs/community/agents/**/*"
18+
19+
callbacks:
20+
- changed-files:
21+
- any-glob-to-any-file:
22+
- "libs/community/callbacks/**/*"
23+
24+
chains:
25+
- changed-files:
26+
- any-glob-to-any-file:
27+
- "libs/community/chains/**/*"
28+
29+
chat_loaders:
30+
- changed-files:
31+
- any-glob-to-any-file:
32+
- "libs/community/chat_loaders/**/*"
33+
34+
chat_message_histories:
35+
- changed-files:
36+
- any-glob-to-any-file:
37+
- "libs/community/chat_message_histories/**/*"
38+
39+
chat_models:
40+
- changed-files:
41+
- any-glob-to-any-file:
42+
- "libs/community/chat_models/**/*"
43+
44+
cross_encoders:
45+
- changed-files:
46+
- any-glob-to-any-file:
47+
- "libs/community/cross_encoders/**/*"
48+
49+
docstore:
50+
- changed-files:
51+
- any-glob-to-any-file:
52+
- "libs/community/docstore/**/*"
53+
54+
document_compressors:
55+
- changed-files:
56+
- any-glob-to-any-file:
57+
- "libs/community/document_compressors/**/*"
58+
59+
document_loaders:
60+
- changed-files:
61+
- any-glob-to-any-file:
62+
- "libs/community/document_loaders/**/*"
63+
64+
document_transformers:
65+
- changed-files:
66+
- any-glob-to-any-file:
67+
- "libs/community/document_transformers/**/*"
68+
69+
embeddings:
70+
- changed-files:
71+
- any-glob-to-any-file:
72+
- "libs/community/embeddings/**/*"
73+
74+
example_selectors:
75+
- changed-files:
76+
- any-glob-to-any-file:
77+
- "libs/community/example_selectors/**/*"
78+
79+
graph_vectorstores:
80+
- changed-files:
81+
- any-glob-to-any-file:
82+
- "libs/community/graph_vectorstores/**/*"
83+
84+
graphs:
85+
- changed-files:
86+
- any-glob-to-any-file:
87+
- "libs/community/graphs/**/*"
88+
89+
indexes:
90+
- changed-files:
91+
- any-glob-to-any-file:
92+
- "libs/community/indexes/**/*"
93+
94+
llms:
95+
- changed-files:
96+
- any-glob-to-any-file:
97+
- "libs/community/llms/**/*"
98+
99+
memory:
100+
- changed-files:
101+
- any-glob-to-any-file:
102+
- "libs/community/memory/**/*"
103+
104+
output_parsers:
105+
- changed-files:
106+
- any-glob-to-any-file:
107+
- "libs/community/output_parsers/**/*"
108+
109+
query_constructors:
110+
- changed-files:
111+
- any-glob-to-any-file:
112+
- "libs/community/query_constructors/**/*"
113+
114+
retrievers:
115+
- changed-files:
116+
- any-glob-to-any-file:
117+
- "libs/community/retrievers/**/*"
118+
119+
storage:
120+
- changed-files:
121+
- any-glob-to-any-file:
122+
- "libs/community/storage/**/*"
123+
124+
tools:
125+
- changed-files:
126+
- any-glob-to-any-file:
127+
- "libs/community/tools/**/*"
128+
129+
utilities:
130+
- changed-files:
131+
- any-glob-to-any-file:
132+
- "libs/community/utilities/**/*"
133+
134+
utils:
135+
- changed-files:
136+
- any-glob-to-any-file:
137+
- "libs/community/utils/**/*"
138+
139+
vectorstores:
140+
- changed-files:
141+
- any-glob-to-any-file:
142+
- "libs/community/vectorstores/**/*"
143+
144+
cache:
145+
- changed-files:
146+
- any-glob-to-any-file:
147+
- "libs/community/cache/**/*"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Label PRs based on changed files.
2+
#
3+
# See `.github/pr-file-labeler.yml` to see rules for each label/directory.
4+
5+
name: "🏷️ Pull Request Labeler"
6+
7+
on:
8+
# Safe since we're not checking out or running the PR's code
9+
# Never check out the PR's head in a pull_request_target job
10+
pull_request_target:
11+
types: [opened, synchronize, reopened, edited]
12+
13+
jobs:
14+
labeler:
15+
name: "label"
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
issues: write
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Label Pull Request
24+
uses: actions/labeler@v6
25+
with:
26+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
27+
configuration-path: .github/pr-file-labeler.yml
28+
sync-labels: false
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Label PRs based on their titles.
2+
#
3+
# Uses conventional commit types from PR titles to apply labels.
4+
# Note: Scope-based labeling (e.g., integration labels) is handled by pr_labeler_file.yml
5+
6+
name: "🏷️ PR Title Labeler"
7+
8+
on:
9+
# Safe since we're not checking out or running the PR's code
10+
# Never check out the PR's head in a pull_request_target job
11+
pull_request_target:
12+
types: [opened, edited]
13+
14+
jobs:
15+
pr-title-labeler:
16+
name: "label"
17+
permissions:
18+
contents: read
19+
pull-requests: write
20+
issues: write
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Label PR based on title
25+
uses: bcoe/conventional-release-labels@v1
26+
with:
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
type_labels: >-
29+
{
30+
"feat": "feature",
31+
"fix": "fix",
32+
"docs": "documentation",
33+
"style": "linting",
34+
"refactor": "refactor",
35+
"perf": "performance",
36+
"test": "tests",
37+
"build": "infra",
38+
"ci": "infra",
39+
"chore": "infra",
40+
"revert": "revert",
41+
"release": "release",
42+
"breaking": "breaking"
43+
}
44+
ignored_types: "[]"

.github/workflows/pr_lint.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# PR title linting.
2+
#
3+
# FORMAT (Conventional Commits 1.0.0):
4+
#
5+
# <type>[optional scope]: <description>
6+
# [optional body]
7+
# [optional footer(s)]
8+
#
9+
# Examples:
10+
# feat(core): add multi‐tenant support
11+
# fix(cli): resolve flag parsing error
12+
# docs: update API usage examples
13+
# docs(openai): update API usage examples
14+
#
15+
# Allowed Types:
16+
# * feat — a new feature (MINOR)
17+
# * fix — a bug fix (PATCH)
18+
# * docs — documentation only changes
19+
# * style — formatting, linting, etc.; no code change or typing refactors
20+
# * refactor — code change that neither fixes a bug nor adds a feature
21+
# * perf — code change that improves performance
22+
# * test — adding tests or correcting existing
23+
# * build — changes that affect the build system/external dependencies
24+
# * ci — continuous integration/configuration changes
25+
# * chore — other changes that don't modify source or test files
26+
# * revert — reverts a previous commit
27+
# * release — prepare a new release
28+
#
29+
# Allowed Scopes (optional):
30+
# adapters, agent_toolkits, agents, callbacks, chains, chat_loaders,
31+
# chat_message_histories, chat_models, cross_encoders, docstore, document_compressors,
32+
# document_loaders, document_transformers, embeddings, example_selectors,
33+
# graph_vectorstores, graphs, indexes, llms, memory, output_parsers,
34+
# query_constructors, retrievers, storage, tools, utilities, utils, vectorstores,
35+
# cache, infra
36+
#
37+
# Rules:
38+
# 1. The 'Type' must start with a lowercase letter.
39+
# 2. Breaking changes: append "!" after type/scope (e.g., feat!: drop x support)
40+
# 3. When releasing (updating the pyproject.toml and uv.lock), the commit message
41+
# should be: `release(scope): x.y.z` (e.g., `release(core): 1.2.0` with no
42+
# body, footer, or preceeding/proceeding text).
43+
#
44+
# Enforces Conventional Commits format for pull request titles to maintain a clear and
45+
# machine-readable change history.
46+
47+
name: "🏷️ PR Title Lint"
48+
49+
permissions:
50+
pull-requests: read
51+
52+
on:
53+
pull_request:
54+
types: [opened, edited, synchronize]
55+
56+
jobs:
57+
# Validates that PR title follows Conventional Commits 1.0.0 specification
58+
lint-pr-title:
59+
name: "validate format"
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: "✅ Validate Conventional Commits Format"
63+
uses: amannn/action-semantic-pull-request@v6
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
with:
67+
types: |
68+
feat
69+
fix
70+
docs
71+
style
72+
refactor
73+
perf
74+
test
75+
build
76+
ci
77+
chore
78+
revert
79+
release
80+
scopes: |
81+
adapters
82+
agent_toolkits
83+
agents
84+
callbacks
85+
chains
86+
chat_loaders
87+
chat_message_histories
88+
chat_models
89+
cross_encoders
90+
docstore
91+
document_compressors
92+
document_loaders
93+
document_transformers
94+
embeddings
95+
example_selectors
96+
graph_vectorstores
97+
graphs
98+
indexes
99+
llms
100+
memory
101+
output_parsers
102+
query_constructors
103+
retrievers
104+
storage
105+
tools
106+
utilities
107+
utils
108+
vectorstores
109+
cache
110+
infra
111+
requireScope: false
112+
disallowScopes: |
113+
release
114+
[A-Z]+
115+
ignoreLabels: |
116+
ignore-lint-pr-title

libs/community/langchain_community/adapters/openai.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def create(
239239
stream: bool = False,
240240
**kwargs: Any,
241241
) -> Union[dict, Iterable]:
242-
models = importlib.import_module("langchain.chat_models")
242+
models = importlib.import_module("langchain_community.chat_models")
243243
model_cls = getattr(models, provider)
244244
model_config = model_cls(**kwargs)
245245
converted_messages = convert_openai_messages(messages)
@@ -280,7 +280,7 @@ async def acreate(
280280
stream: bool = False,
281281
**kwargs: Any,
282282
) -> Union[dict, AsyncIterator]:
283-
models = importlib.import_module("langchain.chat_models")
283+
models = importlib.import_module("langchain_community.chat_models")
284284
model_cls = getattr(models, provider)
285285
model_config = model_cls(**kwargs)
286286
converted_messages = convert_openai_messages(messages)
@@ -348,7 +348,7 @@ def create(
348348
stream: bool = False,
349349
**kwargs: Any,
350350
) -> Union[ChatCompletions, Iterable]:
351-
models = importlib.import_module("langchain.chat_models")
351+
models = importlib.import_module("langchain_community.chat_models")
352352
model_cls = getattr(models, provider)
353353
model_config = model_cls(**kwargs)
354354
converted_messages = convert_openai_messages(messages)
@@ -393,7 +393,7 @@ async def acreate(
393393
stream: bool = False,
394394
**kwargs: Any,
395395
) -> Union[ChatCompletions, AsyncIterator]:
396-
models = importlib.import_module("langchain.chat_models")
396+
models = importlib.import_module("langchain_community.chat_models")
397397
model_cls = getattr(models, provider)
398398
model_config = model_cls(**kwargs)
399399
converted_messages = convert_openai_messages(messages)

libs/community/langchain_community/callbacks/bedrock_anthropic_callback.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"anthropic.claude-3-5-sonnet-20241022-v2:0": 0.003,
1414
"anthropic.claude-3-7-sonnet-20250219-v1:0": 0.003,
1515
"anthropic.claude-sonnet-4-20250514-v1:0": 0.003,
16+
"anthropic.claude-sonnet-4-5-20250929-v1:0": 0.003,
1617
"anthropic.claude-3-haiku-20240307-v1:0": 0.00025,
1718
"anthropic.claude-3-opus-20240229-v1:0": 0.015,
1819
"anthropic.claude-opus-4-20250514-v1:0": 0.015,
@@ -28,6 +29,7 @@
2829
"anthropic.claude-3-5-sonnet-20241022-v2:0": 0.015,
2930
"anthropic.claude-3-7-sonnet-20250219-v1:0": 0.015,
3031
"anthropic.claude-sonnet-4-20250514-v1:0": 0.015,
32+
"anthropic.claude-sonnet-4-5-20250929-v1:0": 0.015,
3133
"anthropic.claude-3-haiku-20240307-v1:0": 0.00125,
3234
"anthropic.claude-3-opus-20240229-v1:0": 0.075,
3335
"anthropic.claude-opus-4-20250514-v1:0": 0.075,

0 commit comments

Comments
 (0)