Skip to content

Fix ComponentTool deserialization in Responses generators - #12486

Closed
mikemikimike wants to merge 1 commit into
deepset-ai:mainfrom
mikemikimike:fix/component-tool-deserialization
Closed

Fix ComponentTool deserialization in Responses generators#12486
mikemikimike wants to merge 1 commit into
deepset-ai:mainfrom
mikemikimike:fix/component-tool-deserialization

Conversation

@mikemikimike

Copy link
Copy Markdown
Contributor

Summary

OpenAIResponsesChatGenerator and AzureOpenAIResponsesChatGenerator only recognized serialized Tool and Toolset type names when deserializing. Serialized ComponentTool instances were therefore left as dictionaries.

This change identifies serialized Haystack tools by their data payload, preserving the existing handling for OpenAI-native tools while restoring ComponentTool instances for both Responses generators.

Tests

  • uv run pytest test/components/generators/chat/test_openai_responses.py::TestSerDe::test_from_dict_with_component_tool test/components/generators/chat/test_azure_responses.py::TestSerDe::test_from_dict_with_component_tool
  • Result: 2 passed

Ruff validation is currently blocked by the repository's existing unsupported RUF104 rule configuration.

@mikemikimike
mikemikimike requested a review from a team as a code owner August 27, 2026 09:10
@mikemikimike
mikemikimike requested review from sjrl and removed request for a team August 27, 2026 09:10
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@mikemikimike is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

CLAassistant commented Aug 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@sjrl

sjrl commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Closing as duplicate of #12485

@sjrl sjrl closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants