Skip to content

Replace deprecated responseSchema with responseFormat for Gemini api - #649

Open
Jazzcort wants to merge 1 commit into
rhel-lightspeed:mainfrom
Jazzcort:replace-deprecated-gemini-request-params
Open

Jazzcort wants to merge 1 commit into
rhel-lightspeed:mainfrom
Jazzcort:replace-deprecated-gemini-request-params

Conversation

@Jazzcort

@Jazzcort Jazzcort commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

This one is not urgent. Just replace the deprecated parameters.

I tested it with a prompt to ask the gatekeeper (Gemini) model to generate an invalid raw json string. Without responseFormat being set up, the model will always provide invalid json so it will hit the validation error when parsing the raw json to GatekeeperResult.

Screenshot 2026-10-08 at 12 07 42 PM

With the responseFormat being set up, the model will follow the schema we provide, so I think it's quite effective 😁

Screenshot 2026-10-08 at 12 05 25 PM

@Jazzcort
Jazzcort requested a review from a team as a code owner October 8, 2026 17:31
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unittests 98.45% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/linux_mcp_server/gatekeeper/gemini_client.py 100.00% <100.00%> (ø)
tests/gatekeeper/test_gemini_client.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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