Skip to content

Commit 716584a

Browse files
authored
Merge branch 'main' into github_repo_forker_tool_integration
2 parents f8d7e2d + 630e524 commit 716584a

52 files changed

Lines changed: 499 additions & 311 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/labeler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ integration:weaviate:
174174
- any-glob-to-any-file: "integrations/weaviate/**/*"
175175
- any-glob-to-any-file: ".github/workflows/weaviate.yml"
176176

177-
integration:weight_bias:
177+
integration:weights_and_biases_weave:
178178
- changed-files:
179-
- any-glob-to-any-file: "integrations/weight_bias/**/*"
180-
- any-glob-to-any-file: ".github/workflows/weight_bias.yml"
179+
- any-glob-to-any-file: "integrations/weights_and_biases_weave/**/*"
180+
- any-glob-to-any-file: ".github/workflows/weights_and_biases_weave.yml"
181181

182182
# Topics
183183
topic:CI:

.github/workflows/github.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,9 @@ jobs:
4848

4949
- name: Install Hatch
5050
run: pip install --upgrade hatch
51-
52-
# TODO: Once this integration is properly typed, use hatch run test:types
53-
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
5451
- name: Lint
5552
if: matrix.python-version == '3.9' && runner.os == 'Linux'
56-
run: hatch run fmt-check && hatch run lint:typing
53+
run: hatch run fmt-check && hatch run test:types
5754

5855
- name: Generate docs
5956
if: matrix.python-version == '3.9' && runner.os == 'Linux'

.github/workflows/meta_llama.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,9 @@ jobs:
4949

5050
- name: Install Hatch
5151
run: pip install --upgrade hatch
52-
53-
# TODO: Once this integration is properly typed, use hatch run test:types
54-
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
5552
- name: Lint
5653
if: matrix.python-version == '3.9' && runner.os == 'Linux'
57-
run: hatch run fmt-check && hatch run lint:typing
54+
run: hatch run fmt-check && hatch run test:types
5855

5956
- name: Generate docs
6057
if: matrix.python-version == '3.9' && runner.os == 'Linux'

.github/workflows/openrouter.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,9 @@ jobs:
4949

5050
- name: Install Hatch
5151
run: pip install --upgrade hatch
52-
53-
# TODO: Once this integration is properly typed, use hatch run test:types
54-
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
5552
- name: Lint
5653
if: matrix.python-version == '3.9' && runner.os == 'Linux'
57-
run: hatch run fmt-check && hatch run lint:typing
54+
run: hatch run fmt-check && hatch run test:types
5855

5956
- name: Generate docs
6057
if: matrix.python-version == '3.9' && runner.os == 'Linux'

.github/workflows/weights_and_biases_weave.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,9 @@ jobs:
4646
- name: Install Hatch
4747
run: pip install --upgrade hatch
4848

49-
# TODO: Once this integration is properly typed, use hatch run test:types
50-
# https://github.com/deepset-ai/haystack-core-integrations/issues/1771
5149
- name: Lint
5250
if: matrix.python-version == '3.9' && runner.os == 'Linux'
53-
run: hatch run fmt-check && hatch run lint:typing
51+
run: hatch run fmt-check && hatch run test:types
5452

5553
- name: Generate docs
5654
if: matrix.python-version == '3.9' && runner.os == 'Linux'

integrations/anthropic/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## [integrations/anthropic-v3.0.0] - 2025-06-30
4+
5+
### 🚀 Features
6+
7+
- [**breaking**] Anthopic model update to `claude-sonnet-4-20250514` (#2022)
8+
9+
### 🐛 Bug Fixes
10+
11+
- Anthropic reports input tokens in first message delta (#2001)
12+
13+
### 🧹 Chores
14+
15+
- Improve typing for select_streaming_callback (#2008)
16+
17+
318
## [integrations/anthropic-v2.7.0] - 2025-06-25
419

520
### 🚀 Features

integrations/anthropic/src/haystack_integrations/components/generators/anthropic/chat/chat_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class AnthropicChatGenerator:
161161
from haystack_integrations.components.generators.anthropic import AnthropicChatGenerator
162162
from haystack.dataclasses import ChatMessage
163163
164-
generator = AnthropicChatGenerator(model="claude-3-5-sonnet-20240620",
164+
generator = AnthropicChatGenerator(model="claude-sonnet-4-20250514",
165165
generation_kwargs={
166166
"max_tokens": 1000,
167167
"temperature": 0.7,
@@ -190,7 +190,7 @@ class AnthropicChatGenerator:
190190
def __init__(
191191
self,
192192
api_key: Secret = Secret.from_env_var("ANTHROPIC_API_KEY"), # noqa: B008
193-
model: str = "claude-3-5-sonnet-20240620",
193+
model: str = "claude-sonnet-4-20250514",
194194
streaming_callback: Optional[StreamingCallbackT] = None,
195195
generation_kwargs: Optional[Dict[str, Any]] = None,
196196
ignore_tools_thinking_messages: bool = True,

integrations/anthropic/src/haystack_integrations/components/generators/anthropic/chat/vertex_chat_generator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class AnthropicVertexChatGenerator(AnthropicChatGenerator):
3939
4040
messages = [ChatMessage.from_user("What's Natural Language Processing?")]
4141
client = AnthropicVertexChatGenerator(
42-
model="claude-3-sonnet@20240229",
42+
model="claude-sonnet-4@20250514",
4343
project_id="your-project-id", region="your-region"
4444
)
4545
response = client.run(messages)
@@ -50,7 +50,7 @@ class AnthropicVertexChatGenerator(AnthropicChatGenerator):
5050
>> focuses on enabling computers to understand, interpret, and generate human language. It involves developing
5151
>> techniques and algorithms to analyze and process text or speech data, allowing machines to comprehend and
5252
>> communicate in natural languages like English, Spanish, or Chinese.")],
53-
>> _name=None, _meta={'model': 'claude-3-sonnet@20240229', 'index': 0, 'finish_reason': 'end_turn',
53+
>> _name=None, _meta={'model': 'claude-sonnet-4@20250514', 'index': 0, 'finish_reason': 'end_turn',
5454
>> 'usage': {'input_tokens': 15, 'output_tokens': 64}})]}
5555
```
5656
@@ -63,7 +63,7 @@ def __init__(
6363
self,
6464
region: str,
6565
project_id: str,
66-
model: str = "claude-3-5-sonnet@20240620",
66+
model: str = "claude-sonnet-4@20250514",
6767
streaming_callback: Optional[Callable[[StreamingChunk], None]] = None,
6868
generation_kwargs: Optional[Dict[str, Any]] = None,
6969
ignore_tools_thinking_messages: bool = True,

integrations/anthropic/src/haystack_integrations/components/generators/anthropic/generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class AnthropicGenerator:
3535
```python
3636
from haystack_integrations.components.generators.anthropic import AnthropicGenerator
3737
38-
client = AnthropicGenerator(model="claude-3-sonnet-20240229")
38+
client = AnthropicGenerator(model="claude-sonnet-4-20250514")
3939
response = client.run("What's Natural Language Processing? Be brief.")
4040
print(response)
4141
>>{'replies': ['Natural language processing (NLP) is a branch of artificial intelligence focused on enabling
@@ -60,7 +60,7 @@ class AnthropicGenerator:
6060
def __init__(
6161
self,
6262
api_key: Secret = Secret.from_env_var("ANTHROPIC_API_KEY"), # noqa: B008
63-
model: str = "claude-3-sonnet-20240229",
63+
model: str = "claude-sonnet-4-20250514",
6464
streaming_callback: Optional[Callable[[StreamingChunk], None]] = None,
6565
system_prompt: Optional[str] = None,
6666
generation_kwargs: Optional[Dict[str, Any]] = None,

integrations/anthropic/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def mock_chat_completion():
1313
completion = Message(
1414
id="foo",
1515
content=[{"type": "text", "text": "Hello, world!"}],
16-
model="claude-3-sonnet-20240229",
16+
model="claude-sonnet-4-20250514",
1717
role="assistant",
1818
type="message",
1919
usage={"input_tokens": 57, "output_tokens": 40},
@@ -35,7 +35,7 @@ def mock_chat_completion_extended_thinking():
3535
{"type": "thinking", "thinking": "This is a thinking part!", "signature": ""},
3636
{"type": "text", "text": "Hello, world!"},
3737
],
38-
model="claude-3-sonnet-20240229",
38+
model="claude-sonnet-4-20250514",
3939
role="assistant",
4040
type="message",
4141
usage={"input_tokens": 57, "output_tokens": 40},

0 commit comments

Comments
 (0)