Skip to content

Update haystack-ai requirement from >=3.0.0 to >=3.1.0 - #16

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/haystack-ai-gte-3.1.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/haystack-ai-gte-3.1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 2, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on haystack-ai to permit the latest version.

Release notes

Sourced from haystack-ai's releases.

v3.1.0

⭐️ Highlights

🪝CompactionHook and Built-in Compactors for Context Length Management

Experimental context compaction for Agent. Runs before LLM calls and shortens the conversation once it crosses a configured fraction of the context window. The built-in SlidingWindowCompactor first removes entire historical turns, then, if needed, individual steps of the current task, replacing what it removes with a short omission note. A second experimental compaction strategy, ToolResultPruningCompactor, instead of dropping whole turns, replaces older/large tool results with placeholders while keeping the most recent tool-calling steps (and their parallel results) intact.

from haystack.hooks.compaction import CompactionHook, SlidingWindowCompactor, ToolResultPruningCompactor
from haystack.components.generators.chat import OpenAIResponsesChatGenerator
hook = CompactionHook(
compactor=SlidingWindowCompactor(), # or ToolResultPruningCompactor(min_keep_steps=2, min_tokens=200),
context_window=400_000,
compact_at=0.7,
compact_to=0.4,
)
agent = Agent(
chat_generator=OpenAIResponsesChatGenerator(model="gpt-5.4-nano"),
tools=[web_search],
hooks={"before_llm": [hook]},
)

🪙 New Token Counters for Estimating Token Usage

New haystack.token_counters module for estimating message/tool-schema size before sending a request (e.g. to decide when to compact). ApproximateTokenCounter needs no dependencies; TiktokenCounter is a local counter, closer estimates for OpenAI models; OpenAITokenCounter calls OpenAI's counting API for exact, model-specific counts.

from haystack.token_counters import OpenAITokenCounter, ApproximateTokenCounter, TiktokenCounter
from haystack.dataclasses import ChatMessage
counter = OpenAITokenCounter("gpt-5-mini")
No dependencies: estimates from text length.
counter_app = ApproximateTokenCounter(chars_per_token=4.0).count(messages)
Closer for OpenAI models; needs: pip install tiktoken
counter_tiktoken = TiktokenCounter(encoding="o200k_base").count(messages)
count = counter.count([ChatMessage.from_user("Hello!")])

🛠️ AgentTool for Multi-Agent Systems

AgentTool wraps a Haystack Agent as a Tool so another Agent can delegate to it. Only the wrapped Agent's final reply is visible to the caller; its intermediate steps remain outside the main agent's context.

from haystack.components.agents import Agent
from haystack.components.generators.chat import OpenAIResponsesChatGenerator
from haystack.dataclasses import ChatMessage
from haystack.tools import AgentTool
researcher = Agent(
</tr></table>

... (truncated)

Commits
  • 859a6eb bump version to 3.1.0
  • 5de8d6c bump version to 3.1.0-rc3
  • 46396f4 test: enable mypy typing checks for test/components/routers/ (#12354)
  • e37cc94 bump version to 3.1.0-rc2
  • 5bf0b09 test: reconcile env-var security test with callable traversal hardening (#12430)
  • 28844a3 feat: add HAYSTACK_UNSAFE_DESERIALIZATION env var (#12397)
  • 70f802c fix!: require unsafe loading for serialized Jinja filters (#12415)
  • 93e4223 fix: validate modules during callable traversal (#12416)
  • 4799c5a bump version to 3.1.0-rc1
  • 1aa0ad9 ci: run type checking on Python 3.12 and unpin numpy (#12377)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [haystack-ai](https://github.com/deepset-ai/haystack) to permit the latest version.
- [Release notes](https://github.com/deepset-ai/haystack/releases)
- [Commits](deepset-ai/haystack@v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: haystack-ai
  dependency-version: 3.1.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Sep 2, 2026
@mergify

mergify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@dependabot @github

dependabot Bot commented on behalf of github Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #17.

@dependabot dependabot Bot closed this Sep 9, 2026
@dependabot
dependabot Bot deleted the dependabot/pip/haystack-ai-gte-3.1.0 branch September 9, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants