Answer: To regenerate model responses, set the REGENERATE_MODEL_GOLDENS environment variable to "true" when running the tests, for example: REGENERATE_MODEL_GOLDENS="true" npm run test:e2e. You must also run await rig.cleanup() at the end of your test, else the golden files will not be updated. Status: Confirmed Entry: tool/gemini-cli/troubleshooting/regenerate-model-responses Revision: 1 Digest: sha256:06146cd8d402e56f (changes whenever the content changes) Timeline: Created: 2026-11-13T03:18:41Z Last changed: 2026-11-13T03:18:41Z Last verified: 2026-11-20T12:53:17Z Next check: 2026-11-21T12:53:17Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of environment variable | REGENERATE_MODEL_GOLDENS | [1] | 2026-11-20 variable value | true | [1] | 2026-11-20 command | npm run test:e2e | [1] | 2026-11-20 required cleanup call | await rig.cleanup() | [1] | 2026-11-20 Sources: [1] Google. "Integration tests". https://geminicli.com/docs/integration-tests.md Role: primary. Accessed: 2026-11-20T12:53:17Z Quote: "set the REGENERATE_MODEL_GOLDENS environment variable to "true" when running the tests" (Supports: environment variable) Quote: "REGENERATE_MODEL_GOLDENS="true" npm run test:e2e" (Supports: variable value, command) Quote: "Make sure you run **await rig.cleanup()** at the end of your test" (Supports: required cleanup call) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: 6f4eb509bb534f20eddc64389fefa3a29445bcb36af9821d05fb4e24158fff0a (captured 2026-11-13T03:18:40Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:18:41Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:53:17Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:53:17Z Last attempt: 2026-11-20T12:53:17Z Notes and limitations: Extracted automatically from a single official source (section "Regenerating model responses"). Related: https://latestn.com/tool/gemini-cli/troubleshooting/run-integration-tests How do I run Gemini CLI integration tests? https://latestn.com/tool/gemini-cli/troubleshooting/run-single-integration-test How do I run a single Gemini CLI integration test by name? https://latestn.com/tool/gemini-cli/troubleshooting/run-tests How do I run tests for Gemini CLI? https://latestn.com/tool/gemini-cli/troubleshooting/headless-exit-codes What do the exit codes mean in Gemini CLI headless mode? https://latestn.com/tool/gemini-cli/troubleshooting/instrument-code-traces How do I instrument code with traces in Gemini CLI? https://latestn.com/tool/gemini-cli/troubleshooting/mcp-server-connection-issues How do I troubleshoot an MCP server that won't connect in Gemini CLI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:18:41Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/troubleshooting/regenerate-model-responses/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/troubleshooting/regenerate-model-responses POST: https://latestn.com/dispute/tool/gemini-cli/troubleshooting/regenerate-model-responses with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/troubleshooting/regenerate-model-responses?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I regenerate model responses for Gemini CLI integration tests? Revision 1, last verified 2026-11-20T12:53:17Z. https://latestn.com/tool/gemini-cli/troubleshooting/regenerate-model-responses (accessed 2026-11-21T09:58:58Z). @misc{LatestN_tool_gemini_cli_troubleshooting_regenerate_model_responses_r1, title = {How do I regenerate model responses for Gemini CLI integration tests?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/troubleshooting/regenerate-model-responses}}, note = {Revision 1; digest sha256:06146cd8d402e56f; last verified 2026-11-20T12:53:17Z; accessed 2026-11-21T09:58:58Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/troubleshooting/regenerate-model-responses