Skip to content

fix(anthropic): Add output_config in AnthropicChatGenerator #2931

Merged
bogdankostic merged 1 commit intodeepset-ai:mainfrom
Keyur-S-Patel:fix/2894-anthropic-output-config
Mar 9, 2026
Merged

fix(anthropic): Add output_config in AnthropicChatGenerator #2931
bogdankostic merged 1 commit intodeepset-ai:mainfrom
Keyur-S-Patel:fix/2894-anthropic-output-config

Conversation

@Keyur-S-Patel
Copy link
Copy Markdown
Contributor

Related Issues

Proposed Changes

Added support for output_config in AnthropicChatGenerator so it is no longer filtered out from generation_kwargs.

  • Added "output_config" to AnthropicChatGenerator.ALLOWED_PARAMS
  • Updated AnthropicChatGenerator docstring to list output_config among supported generation_kwargs
  • Added unit test coverage to verify output_config is passed through to Anthropic messages.create()

How did you test it?

  • Ran targeted unit tests:
    • hatch run test:unit tests/test_chat_generator.py -k "output_config or run_with_params or flattened_generation_kwargs"
    • Result: 7 passed, 50 deselected
  • Ran type checks:
    • hatch run test:types
    • Result: success, no issues found
  • Ran formatting:
    • hatch run fmt
    • Result: all checks passed, no formatting changes needed

Notes for the Reviewer

  • This change is intentionally scoped to parameter allowlisting and test coverage.
  • Existing behavior is unchanged except that output_config is now forwarded instead of being dropped with a warning.

Checklist

@Keyur-S-Patel Keyur-S-Patel requested a review from a team as a code owner March 8, 2026 06:01
@Keyur-S-Patel Keyur-S-Patel requested review from bogdankostic and removed request for a team March 8, 2026 06:01
@github-actions github-actions Bot added integration:anthropic type:documentation Improvements or additions to documentation labels Mar 8, 2026
Copy link
Copy Markdown
Contributor

@bogdankostic bogdankostic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thanks @Keyur-S-Patel

@bogdankostic bogdankostic merged commit 6c7dbce into deepset-ai:main Mar 9, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:anthropic type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add output_config to AnthropicChatGenerator ALLOWED_PARAMS

2 participants