Skip to content

fix: register adaptive discriminator for ThinkingConfigAdaptiveParam …#286

Open
aydinomer00 wants to merge 1 commit intoanthropics:mainfrom
aydinomer00:fix/279-register-adaptive-thinking-discriminator
Open

fix: register adaptive discriminator for ThinkingConfigAdaptiveParam …#286
aydinomer00 wants to merge 1 commit intoanthropics:mainfrom
aydinomer00:fix/279-register-adaptive-thinking-discriminator

Conversation

@aydinomer00
Copy link
Copy Markdown

…and BetaThinkingConfigAdaptiveParam

Fixes #279. The 'adaptive' discriminator was not registered in the init() blocks for ThinkingConfigParamUnion and BetaThinkingConfigParamUnion, causing JSON with {"type": "adaptive"} to fail to populate the OfAdaptive field during deserialization.

Added unit tests to verify correct deserialization of adaptive thinking config for both non-beta and beta types.

…and BetaThinkingConfigAdaptiveParam

Fixes anthropics#279. The 'adaptive' discriminator was not registered in the init()
blocks for ThinkingConfigParamUnion and BetaThinkingConfigParamUnion,
causing JSON with {"type": "adaptive"} to fail to populate the OfAdaptive
field during deserialization.

Added unit tests to verify correct deserialization of adaptive thinking
config for both non-beta and beta types.
@aydinomer00 aydinomer00 requested a review from a team as a code owner March 7, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: adaptive discriminator is not registered for ThinkingConfigAdaptiveParam and BetaThinkingConfigAdaptiveParam types

1 participant