Skip to content

feat: Add new FinishReason and ReinforcementTuningThinkingLevel values from the discovery docs - #7274

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
copybara_1015890920
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
copybara_1015890920

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

feat: Add new FinishReason and ReinforcementTuningThinkingLevel values from the discovery docs

FinishReason gains MODEL_ARMOR, MISSING_THOUGHT_SIGNATURE, ESCALATION and PUP_LIMITED_DISABLED. ReinforcementTuningThinkingLevel gains LOW and MEDIUM. Several enum descriptions now match the API reference.

Java: GenerateContentResponse.text(), parts() and the other helpers that call checkFinishReason() now throw IllegalArgumentException for the four new FinishReason values, as they already do for SAFETY and MALFORMED_RESPONSE. Previously these values mapped to FINISH_REASON_UNSPECIFIED and did not throw.

@copybara-service
copybara-service Bot requested a review from a team as a code owner November 6, 2026 23:22
@product-auto-label product-auto-label Bot added size: s Pull request size is small. api: vertex-ai Issues related to the googleapis/python-aiplatform API. labels Nov 6, 2026
…s from the discovery docs

FinishReason gains MODEL_ARMOR, MISSING_THOUGHT_SIGNATURE, ESCALATION and PUP_LIMITED_DISABLED. ReinforcementTuningThinkingLevel gains LOW and MEDIUM. Several enum descriptions now match the API reference.

Java: GenerateContentResponse.text(), parts() and the other helpers that call checkFinishReason() now throw IllegalArgumentException for the four new FinishReason values, as they already do for SAFETY and MALFORMED_RESPONSE. Previously these values mapped to FINISH_REASON_UNSPECIFIED and did not throw.
PiperOrigin-RevId: 1015890920
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: vertex-ai Issues related to the googleapis/python-aiplatform API. google-contributor size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant