Gemma 4 31B thinking broken
Describe the bug The model Gemma 4 31B by Google AI Studio recently started putting it's thought process into the main response text instead of a seperate "Thinking" tab like it used to.
To Reproduce Steps to reproduce the behavior:
- Go to a character
- Choose "Gemma 4 31B" as the model with Google as the provider
- Send it text
- The response contains the error
Expected behavior It should have opened a "Thinking" tab and put its thinking process there, instead of in the main body
Smartphone:
- Device: Xiaomi Redmi Note 13
- OS: HyperOS 2.0.213.0
Additional context This only started happening recently independent of the app updates. It might have something to do with Google changing the formatting of the models thinking phase
Hey @dolasbaranege-pixel - Can you please check if this issue is context-size related? I've been informed that when context is above 40k it seems to have this problem. Can you check if a new, empty char if the issue still persists?
@Husky110 i checked, and it happens when the context size is nowhere near 40k. it happen regardless of how new the chat is
@dolasbaranege-pixel - Hmm... Is it possible that you still use an old jinja template? A user in Discord suggested trying this fix:
{%- if add_generation_prompt -%}
{%- if ns.prev_message_type != 'tool_response' and ns.prev_message_type != 'tool_call' -%}
{{- '<|turn>model\n' -}}
{%- if enable_thinking -%}
{{- '<|channel>thought\n' -}}
{%- else -%}
{{- '<|channel>thought\n<channel|>' -}}
{%- endif -%}
{%- elif ns.prev_message_type == 'tool_response' and enable_thinking -%}
{{- '<|channel>thought\n' -}}
{%- endif -%}
{%- endif -%}
Also - can you provide screenshoots? I couldn't really find your problem when I researched it, so it looks like a Model-issue and not a Lettuce-issue at the moment.
of course @Husky110 .
this whole top part used to go to a thinking tab but now its in the reply. and its actually making thr reply quality worse because theres less tokens to fit in the reply.
but i dont know what a "jinja template" is where am i supposed to put this fix exactly?
I guess he mistook you for someone using a local model.
There is nothing we can do since it is an API. It is a model issue. Use a different provider or a different model.
@dolasbaranege-pixel Okay - I thought Google Studio might be able to set that, but apprently not. @MegalithOfficial is right then - it's a model issue we can't do anything about. I've seen that behavior from other models and either you switch to non-reasoning if that is possible or to a different model/provider, like Megalith said.
but it used to work fine, how can you not do anything about it???? i know theres an issue with the model, thats why i came here. i dont have other models
but it used to work fine, how can you not do anything about it???? i know theres an issue with the model, thats why i came here. i dont have other models
We don't control the model, Google does. LettuceAI just sends your messages to their API and displays what it gets back.
I checked their API earlier today and the response format hasn't changed. The model is putting its thinking into the actual reply, which is why it shows up there.
I get that it used to work, but we can't fix Google's model from our side. For now, you'll have to try another model or provider, or wait for Google to fix it.
alright then. thank you for your time @MegalithOfficial @Husky110 .
I'm closing this now. Good luck tho @dolasbaranege-pixel