openrouter-haystack 1.3.0__tar.gz → 2.0.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 (17) hide show
  1. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/CHANGELOG.md +27 -0
  2. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/PKG-INFO +3 -3
  3. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/examples/openrouter_with_tools_example.py +6 -12
  4. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/pyproject.toml +2 -2
  5. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/.gitignore +0 -0
  6. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/LICENSE.txt +0 -0
  7. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/README.md +0 -0
  8. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/examples/openrouter_with_structured_outputs.py +0 -0
  9. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/pydoc/config_docusaurus.yml +0 -0
  10. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/src/haystack_integrations/components/generators/openrouter/__init__.py +0 -0
  11. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/src/haystack_integrations/components/generators/openrouter/chat/__init__.py +0 -0
  12. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/src/haystack_integrations/components/generators/openrouter/chat/chat_generator.py +0 -0
  13. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/src/haystack_integrations/components/generators/py.typed +0 -0
  14. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/tests/__init__.py +0 -0
  15. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/tests/conftest.py +0 -0
  16. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/tests/test_openrouter_chat_generator.py +0 -0
  17. {openrouter_haystack-1.3.0 → openrouter_haystack-2.0.0}/tests/test_openrouter_chat_generator_async.py +0 -0
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## [integrations/openrouter-v1.3.0] - 2026-10-07
4
+
5
+ ### 🚀 Features
6
+
7
+ - *(openrouter)* Add reasoning support for streaming responses (#4063)
8
+
9
+ ### 🐛 Bug Fixes
10
+
11
+ - Fix new issues raised by ruff 0.16.0 (#3670)
12
+ - Standardize license files (#3771)
13
+
14
+ ### 🧪 Testing
15
+
16
+ - Fix tests for integrations that inherit from the OpenAIChatGenerator (#3583)
17
+ - Make OpenRouter tests declare max_tokens + refactor (#3730)
18
+ - Fix tests for openai>=3.0.0 (#3801)
19
+
20
+ ### ⚙️ CI
21
+
22
+ - Improve changelog generation; fix existing changelogs (#3883)
23
+
24
+ ### 🧹 Chores
25
+
26
+ - Re-standardize READMEs (#3768)
27
+ - Clarify how generation_kwargs passed in run are handled (#3805)
28
+
29
+
3
30
  ## [integrations/openrouter-v1.2.0] - 2026-07-06
4
31
 
5
32
  ### 🐛 Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: openrouter-haystack
3
- Version: 1.3.0
3
+ Version: 2.0.0
4
4
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/openrouter#readme
5
5
  Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
6
6
  Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/openrouter
@@ -10,14 +10,14 @@ License-File: LICENSE.txt
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3.10
14
13
  Classifier: Programming Language :: Python :: 3.11
15
14
  Classifier: Programming Language :: Python :: 3.12
16
15
  Classifier: Programming Language :: Python :: 3.13
17
16
  Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Programming Language :: Python :: 3.15
18
18
  Classifier: Programming Language :: Python :: Implementation :: CPython
19
19
  Classifier: Programming Language :: Python :: Implementation :: PyPy
20
- Requires-Python: >=3.10
20
+ Requires-Python: >=3.11
21
21
  Requires-Dist: haystack-ai>=2.30.0
22
22
  Description-Content-Type: text/markdown
23
23
 
@@ -7,7 +7,7 @@
7
7
  # To run this example, you will need to
8
8
  # set `OPENROUTER_API_KEY` environment variable
9
9
 
10
- from haystack.components.tools import ToolInvoker
10
+ from haystack.components.agents import Agent
11
11
  from haystack.dataclasses import ChatMessage
12
12
  from haystack.tools import Tool
13
13
 
@@ -29,9 +29,6 @@ weather_tool = Tool(
29
29
  function=weather,
30
30
  )
31
31
 
32
- # Create a tool invoker with the weather tool
33
- tool_invoker = ToolInvoker(tools=[weather_tool])
34
-
35
32
  # We can setup model routing by setting the `model` parameter to `openrouter/auto`
36
33
  # and providing a list of models to route to.
37
34
  client = OpenRouterChatGenerator(
@@ -40,13 +37,10 @@ client = OpenRouterChatGenerator(
40
37
  "models": ["openai/gpt-4o-mini", "anthropic/claude-3-haiku"],
41
38
  },
42
39
  )
43
- messages = [ChatMessage.from_user("What's the weather in Tokyo?")]
44
-
45
- response = client.run(messages=messages, tools=[weather_tool])["replies"]
46
40
 
47
- print(f"assistant messages: {response[0]}\n")
41
+ # The Agent calls the tool and feeds the result back to the model
42
+ agent = Agent(chat_generator=client, tools=[weather_tool])
43
+ result = agent.run(messages=[ChatMessage.from_user("What's the weather in Tokyo?")])
48
44
 
49
- # If the assistant message contains a tool call, run the tool invoker
50
- if response[0].tool_calls:
51
- tool_messages = tool_invoker.run(messages=response)["tool_messages"]
52
- print(f"tool messages: {tool_messages}")
45
+ print(f"messages: {result['messages']}\n")
46
+ print(f"assistant final answer: {result['last_message'].text}")
@@ -7,7 +7,7 @@ name = "openrouter-haystack"
7
7
  dynamic = ["version"]
8
8
  description = ''
9
9
  readme = "README.md"
10
- requires-python = ">=3.10"
10
+ requires-python = ">=3.11"
11
11
  license = "Apache-2.0"
12
12
  keywords = []
13
13
  authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }]
@@ -15,11 +15,11 @@ classifiers = [
15
15
  "License :: OSI Approved :: Apache Software License",
16
16
  "Development Status :: 4 - Beta",
17
17
  "Programming Language :: Python",
18
- "Programming Language :: Python :: 3.10",
19
18
  "Programming Language :: Python :: 3.11",
20
19
  "Programming Language :: Python :: 3.12",
21
20
  "Programming Language :: Python :: 3.13",
22
21
  "Programming Language :: Python :: 3.14",
22
+ "Programming Language :: Python :: 3.15",
23
23
  "Programming Language :: Python :: Implementation :: CPython",
24
24
  "Programming Language :: Python :: Implementation :: PyPy",
25
25
  ]