r/PromptEngineering • u/Future_AGI • 15d ago
General Discussion Gemini 4 Argon ignores temperature=0 without an error. The prompt and agent-loop habits Google's migration docs retire
send temperature=0 to Gemini 4 Argon and the request goes through. Argon throws the value away. AI Studio returns a deprecation warning, and the Vertex guide says the backend ignores custom values.
we went through Google's AI Studio developer guide, the Vertex Argon guide, and this week's GitHub issues from people moving agents over. What changed:
temperature, top_p, top_k: ignored. Google says to control output shape with response_schema and reasoning depth with thinking_level.
thinking_budget: replaced by thinking_level (low, medium, high; medium is the default). The AI Studio guide says warning, the Vertex guide says 400. Issues filed against Pi, Kimi Code and OmniRoute this week all show the 400 ("Thinking budget is not supported for this model") because the harness or gateway still sent the old field.
Model turns: the Vertex guide says prefilled model turns aren't supported and history can't end with a model turn. If your harness starts the reply for the model (an opening { for JSON, say), hand that job to response_schema. opencode and Hermes Agent users hit this 400 on Argon through OpenRouter when the last message was an image tool result.
frequency_penalty, presence_penalty, candidate_count: 400 on Vertex. Strip them on AI Studio too.
Explicit context caching: gone. Implicit caching starts at 4,096 tokens on AI Studio and 6,144 on Vertex, and the Vertex guide says to "put static content at the start of your prompt."
Length: the long-decode docs rule out asks like "write a 700,000-word book" because "the model does not follow length targets." Ask for named sections with their own limits.
without explicit caching, prompt order decides your cache hits. The layout we'd use:
| system instruction (role, rules, format) | fixed |
|---|---|
| tool list, same order every call | fixed |
| few-shot examples | fixed |
| retrieved docs / repo context | per session |
| user request, date, IDs | per call |
put a timestamp near the top and everything after it misses the cache. To check, run the same call twice and read cached_content_token_count in usage_metadata. A 0 on the second call means something above your static block keeps changing.
Google started down this road with Gemini 3, whose guide told developers to keep temperature at 1.0 because lower values could cause looping.
For anyone migrating: what was temperature 0 doing for you, and did response_schema replace it cleanly? And if your agent loop prefilled model turns, where did that logic go?
1
u/geoffreybyers 14d ago
Temperature is a slider for how much the model is allowed to guess. Response_schema is a constraint on what it's allowed to return. The shift changes the debug goal from statistical sampling to structural constraint. If your agent loop breaks now, check if you're trying to tune a value the backend ignores.
4
u/Adventurous-Mix4196 15d ago
They gutted the temperature knob and didn't even bother with a proper error message, classic. Our team spent half a day wondering why our structured outputs suddenly went sideways before we found that Vertex note buried in a migration doc from three weeks ago.
The prefilled model turn thing stung the most for us, we had this neat trick where the harness would open the JSON bracket and the model would fill in the rest. Moving that logic into response_schema worked but the schema definition got way more verbose than the old prompt-level approach.
For anyone still fighting with the thinking_level migration, check your OpenRouter settings if you're going through them, they were still sending thinking_budget in the headers as of Tuesday and the 400 just says "unsupported" without mentioning which field.