Skip to content

Add output_config to AnthropicChatGenerator ALLOWED_PARAMS #2894

@ernoaapa

Description

@ernoaapa

Description

AnthropicChatGenerator.ALLOWED_PARAMS does not include output_config, which means it gets silently filtered out with a warning when passed via generation_kwargs.

The Anthropic API supports output_config as a top-level parameter (e.g., output_config: {"effort": "medium"}) to control adaptive thinking effort levels. This was introduced alongside adaptive thinking (thinking: {"type": "adaptive"}) for Claude Opus 4.6 and Sonnet 4.6.

Reference: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking#adaptive-thinking-with-the-effort-parameter

Current behavior

Passing output_config in generation_kwargs triggers a warning and the parameter is dropped:

Model parameters {'output_config'} are not allowed and will be ignored.

Expected behavior

output_config should be included in ALLOWED_PARAMS and passed through to the Anthropic SDK's messages.create(), similar to how thinking is already handled.

Suggested fix

Add "output_config" to the ALLOWED_PARAMS list in chat_generator.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions