Skip to content

fix: retry AI tagging without logprobs when the provider rejects it - #148

Merged
Anyesh merged 1 commit into
mainfrom
fix/issue-143-gemini-logprobs
Jul 25, 2026
Merged

fix: retry AI tagging without logprobs when the provider rejects it#148
Anyesh merged 1 commit into
mainfrom
fix/issue-143-gemini-logprobs

Conversation

@Anyesh

@Anyesh Anyesh commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Fixes #143: Gemini (both its OpenAI-compat endpoint and its native API via a proxy) returns 400 for the logprobs/top_logprobs params the tags call always sent, so the tags request failed every retry while the separate, logprobs-free description call succeeded - silently leaving items with a description but no tags and no visible error.

On a 400 whose body mentions "logprobs", retry the same attempt with it disabled instead of consuming the retry budget; the logprobs-based confidence score is simply skipped for that endpoint.

Description

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or build changes

Checklist

  • I have read the CONTRIBUTING guide
  • My code follows the project's coding style
  • I have added tests that prove my fix/feature works
  • New and existing tests pass locally
  • I have updated documentation as needed
  • My changes don't introduce new warnings or errors

Testing

Test Environment

  • Docker Compose
  • Kubernetes
  • Local development

Tests Performed

Screenshots (if applicable)

Additional Notes

Fixes #143: Gemini (both its OpenAI-compat endpoint and its native API via a
proxy) returns 400 for the logprobs/top_logprobs params the tags call always
sent, so the tags request failed every retry while the separate,
logprobs-free description call succeeded - silently leaving items with a
description but no tags and no visible error.

On a 400 whose body mentions "logprobs", retry the same attempt with it
disabled instead of consuming the retry budget; the logprobs-based
confidence score is simply skipped for that endpoint.
@Anyesh
Anyesh force-pushed the fix/issue-143-gemini-logprobs branch from f9b5731 to b39815d Compare July 25, 2026 06:28
@Anyesh
Anyesh merged commit 2fbf38f into main Jul 25, 2026
6 checks passed
@Anyesh
Anyesh deleted the fix/issue-143-gemini-logprobs branch July 30, 2026 07:06
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.

Auto-tagging silently fails with Gemini: logprobs is always requested, but Gemini rejects it

1 participant