Skip to content

fix(autocomplete): trim trailing <|file_separator|> for Gemini/Gemma #6194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hayden-cardwell
Copy link

Description

See #6067. Change was made to remove the trailing 18 characters from the completion if the model is a Gemini or Gemma model, and the completion ends with <|file_separator|>. Attempting to do this within:
core/autocomplete/filtering/streamTransforms/lineStream.ts
Resulted in generations not showing.

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screenshots

N/A

Tests

I don't believe any tests currently exist for the postprocessing code.

@hayden-cardwell hayden-cardwell requested a review from a team as a code owner June 19, 2025 03:01
@hayden-cardwell hayden-cardwell requested review from tomasz-stefaniak and removed request for a team June 19, 2025 03:01
Copy link

netlify bot commented Jun 19, 2025

👷 Deploy request for continuedev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 16d3145

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 19, 2025
Copy link

github-actions bot commented Jun 19, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@hayden-cardwell
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

…models

Google Gemini/Gemma models sometimes append "<|file_separator|>" at the end of autocomplete completions, forcing users to remove it manually. Update postprocessCompletion to detect when llm.model includes "gemini" or "gemma" and the completion ends with "<|file_separator|>", then slice off the trailing 18 characters.

See continuedev#6067
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant