app icon indicating copy to clipboard operation
app copied to clipboard

Gemma 4 31B thinking broken

Open dolasbaranege-pixel opened this issue 1 month ago • 10 comments

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:

  1. Go to a character
  2. Choose "Gemma 4 31B" as the model with Google as the provider
  3. Send it text
  4. 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

dolasbaranege-pixel avatar Oct 16 '26 19:10 dolasbaranege-pixel

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 avatar Oct 17 '26 07:10 Husky110

@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 avatar Oct 17 '26 08:10 dolasbaranege-pixel

@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.

Husky110 avatar Oct 17 '26 09:10 Husky110

of course @Husky110 . Screenshot_2026-10-16-22-30-34-652_com.lettuceai.app-edit.jpg 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?

dolasbaranege-pixel avatar Oct 17 '26 10:10 dolasbaranege-pixel

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.

MegalithOfficial avatar Oct 17 '26 10:10 MegalithOfficial

@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.

Husky110 avatar Oct 17 '26 11:10 Husky110

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

dolasbaranege-pixel avatar Oct 17 '26 16:10 dolasbaranege-pixel

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.

MegalithOfficial avatar Oct 17 '26 16:10 MegalithOfficial

alright then. thank you for your time @MegalithOfficial @Husky110 .

dolasbaranege-pixel avatar Oct 17 '26 16:10 dolasbaranege-pixel

I'm closing this now. Good luck tho @dolasbaranege-pixel

Husky110 avatar Oct 17 '26 17:10 Husky110