fix: exclude Gemini thought parts from structured answers by rudycelekli · Pull Request #31 · mohit67890/imajev · GitHub
Skip to content

fix: exclude Gemini thought parts from structured answers - #31

Open
rudycelekli wants to merge 1 commit into
mohit67890:mainfrom
rudycelekli:fix/imajev-gemini-thought-parts-20261002
Open

rudycelekli wants to merge 1 commit into
mohit67890:mainfrom
rudycelekli:fix/imajev-gemini-thought-parts-20261002

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

Summary

Decode the final response text without concatenating thought summaries. A thought containing JSON could corrupt the final JSON or be scored as an answer when no final response existed. Vertex uses the same decoder. Thought summaries are opt-in through includeThoughts; the current runner does not request them by default. This fixes decoding of a valid optional provider response, without changing generation configuration.

Evidence and validation

  • Reproduced on unchanged upstream main ccf586d43d2a580319b6535c893668904d909eb9 with the regression tests in this PR.
  • Focused native tests: python -m pytest -p no:cacheprovider -q tests/test_gemini_thought_parts.py tests/test_imajev_bench_triage.py pass after the patch; pre-patch failures are preserved locally.
  • git diff --check passes.
  • Unchanged upstream main in this environment: 4 failed, 713 passed, 136 skipped. Two failures import the unavailable optional mlx_vlm dependency; two import the absent test_p3_labeltrain fixture helper.
  • Full python -m pytest -p no:cacheprovider -q: Exact PR head 00f2442eed2e: 4 failed, 717 passed, 136 skipped, 35 warnings in 57.80s. Only those same four upstream/environment failures remain; this patch introduces no additional failures.
  • This repository currently reports no GitHub status checks; that is not a claim of passing remote CI.
  • Tests use local synthetic fixtures; no released model weights, private data, hosted-provider calls, or model quality claims.

Contract references

AI assistance

Prepared with AI assistance; the reproduction, patch and tests were reviewed before submission.

Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant