fix: Filter [REDACTED] placeholder in OpenRouter Gemini 3.0 Pro reasoning #2742
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix: Filter [REDACTED] placeholder in OpenRouter Gemini 3.0 Pro reasoning
Problem
When using OpenRouter with
google/gemini-3-pro-previewmodel, two reasoning panels were displayed in the UI:[REDACTED]with 0.0s duration (should NOT be displayed)Root Cause
This issue is specific to OpenRouter's Gemini 3.0 Pro Preview model.
reasoning.encrypted)[REDACTED]placeholderInvestigation Details
Tested OpenRouter API directly and observed the response format:
The SDK converts
reasoning.encryptedto[REDACTED]as a placeholder for encrypted content.Solution
Modified
src/shared/models/abstract-ai-sdk.ts(lines 357-370) to filter out the[REDACTED]placeholder specifically for Gemini 3.0 Pro models:Model ID matching logic: The fix applies to any model ID containing
gemini-3-pro, which currently matches:google/gemini-3-pro-preview✅Impact
gemini-3-proin their model IDTesting
Verified with OpenRouter +
google/gemini-3-pro-preview:[REDACTED]placeholder no longer creates a visible panel