Repository navigation
Conversation
|
Heads up on the remaining red check: the repo’s “linked issue with community support” workflow needs 5 👍 on #508 before it goes green, and the issue currently has none. If this bug has bitten anyone here, a thumbs-up on the issue would help get it merged. |
|
Heads up on the red enforce check: it's the community-support gate, not the code. The linked-issue workflow requires 5 thumbs-up reactions on #508 from unique users (the PR author's own reaction doesn't count), and that issue is fresh with zero reactions so far. I've posted on the issue asking people who hit the empty-success bug to react - once it clears 5, the check should go green on re-run. The code checks themselves (test, format, check) all pass. |
|
Your branch is 1 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
1 similar comment
|
Your branch is 1 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
|
Your branch is 1 commits behind git fetch origin main
git merge origin/main
git pushNote: Enable "Allow edits by maintainers" to allow automatic updates. |
Description
The Gemini realtime path returned a "successful" empty extraction when a prompt was blocked or a candidate stopped without producing text:
GenerateContentResponse.textisNonefor safety-blocked prompts, candidates with a non-STOPfinish reason, and non-text-only responses, and_process_single_prompthappily returnedScoredOutput(score=1.0, output=None). The caller gets no signal that anything was blocked, and the actual reason (prompt_feedback.block_reason/candidates[0].finish_reason) is silently discarded.This mirrors the guard already applied to the OpenAI provider (#496): when
response.textisNone,_process_single_promptnow raisesInferenceRuntimeErrorwith the available block/finish reason, and the error propagates unwrapped (not retried, not wrapped in "Gemini API error").Fixes #508
How Has This Been Tested?
Added
TestGeminiNoTextResponseHandlingtotests/gemini_retry_test.pycovering:ScoredOutputprompt_feedback.block_reason) raises with the block reasonfinish_reason) raises with the finish reasonInferenceRuntimeErrorpropagates unwrappedAlso ran the full unit suite locally: 767 passed. The 10 failures observed are Windows-only (symlink/pip tests in
create_provider_plugin_test.py), unrelated to this change.Checklist:
pylintover the affected code.