Skip to content

fix: gracefully degrade ingestion processing on tokenCount errors#9681

Merged
Steffen911 merged 1 commit into
mainfrom
steffen/ignore-failed-tokenization
Oct 13, 2025
Merged

fix: gracefully degrade ingestion processing on tokenCount errors#9681
Steffen911 merged 1 commit into
mainfrom
steffen/ignore-failed-tokenization

Conversation

@Steffen911
Copy link
Copy Markdown
Member

@Steffen911 Steffen911 commented Oct 13, 2025

Important

Enhance IngestionService to handle tokenization errors gracefully by logging and continuing without token counts.

  • Behavior:
    • In IngestionService, wrap tokenization logic in a try-catch block to handle errors gracefully.
    • On tokenization error, log the error using traceException() and continue without token counts.
  • Logging:
    • Add warning log for async tokenization failure and fallback to sync tokenization.
    • Add error log for tokenization failure with traceException() in getUsageUnits().
  • Functions:
    • Modify getUsageUnits() in index.ts to include error handling for tokenization.

This description was created by Ellipsis for 21cd2aa. You can customize this summary. It will automatically update as commits are pushed.

@Steffen911 Steffen911 marked this pull request as ready for review October 13, 2025 08:23
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Oct 13, 2025
@Steffen911 Steffen911 enabled auto-merge October 13, 2025 08:35
@dosubot dosubot Bot added the auto-merge This PR is set to be merged label Oct 13, 2025
@Steffen911 Steffen911 added this pull request to the merge queue Oct 13, 2025
Merged via the queue into main with commit c43484c Oct 13, 2025
31 checks passed
@Steffen911 Steffen911 deleted the steffen/ignore-failed-tokenization branch October 13, 2025 08:50
@dosubot dosubot Bot removed the auto-merge This PR is set to be merged label Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant