-
[OPIK-6539] [BE][FE] fix: suppress Gemma reasoning, bump deprecated Gemini/Vertex default models (#6706)
发布于
2026-05-14 12:57:56 +00:00 - [OPIK-6539] [BE] fix: suppress Gemma reasoning trace in Gemini responses
Forces
returnThinking=falseon the LangChain4j Gemini chat / streaming
clients sothought=trueparts from Gemma 4 are dropped before the
response text is built.Gemma 4 always returns thought parts via Google's AI Studio API, even
whenthinkingConfig.includeThoughts=false(andthinkingBudget=0is
rejected as unsupported). LangChain4j'sPartsAndContentsMapper#fromGPartsToAiMessage
has a three-statereturnThinkingflag —null(default) concatenates
thoughts into the response text,TRUEreturns them as a separate
field,FALSEdiscards them. We were onnull, which is why the
reasoning trace showed up at the top of the Playground output for
gemma-4-31b-itandgemma-4-26b-a4b-it.Setting it to
FALSEmatches existing Gemini 2.5 / 3 behavior, where
the API itself suppresses thought parts unless the client opts in.Implements OPIK-6539: Gemma 4 reasoning trace leaks into Playground
response body.- fix(playground): bump deprecated Gemini/Vertex default models in provider dropdown
The Gemini provider's hardcoded default was
GEMINI_3_PRO
(gemini-3-pro-preview), which has a pastdeprecation_datein the
LiteLLM prices JSON and is therefore excluded from the dropdown by the
sync script's deprecated-model filter. Result: when a user added the
Gemini provider with no other providers configured, the Playground
defaulted to a model that wasn't selectable in the picker. Backend
routing still worked because the Java enum keeps deprecated entries
(add-only), so completions kept succeeding while the UI looked broken.Vertex AI had the same shape of bug:
VERTEX_AI_GEMINI_2_5_PRO_PREVIEW_04_17
is a dated preview alias replaced bygemini-2.5-pro/gemini-3.1-pro-preview.Bumped both defaults to the current top-of-dropdown entry:
- Gemini:
GEMINI_3_PRO->GEMINI_3_1_PRO - Vertex AI:
VERTEX_AI_GEMINI_2_5_PRO_PREVIEW_04_17->VERTEX_AI_GEMINI_3_1_PRO
Discovered while reviewing the Gemma reasoning leak (this PR).
下载附件