feat: enhance OpenRouter model management with refresh functionality and Cloudflare bypass (fixes #3813, #3874) #3948
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.
Closes #3813
Closes #3874
🎯 Overview
This PR enhances OpenRouter integration by adding a model refresh button with comprehensive multilingual support and implementing a Cloudflare bypass solution for improved reliability.
🚀 Key Features
✨ Model Refresh Functionality
🌐 Multilingual Support
refreshModels
translation key across 16 languages:🔧 Technical Improvements
https
module to bypass Cloudflare blocking issues📁 Files Changed
src/api/providers/fetchers/openrouter.ts
- Added Cloudflare bypass logicwebview-ui/src/components/settings/providers/OpenRouter.tsx
- Added refresh button UI and logicwebview-ui/src/i18n/locales/*/settings.json
- Added translations for 16 languagessrc/core/webview/webviewMessageHandler.ts
- Enhanced auto-initialization🐛 Problem Solved
✅ Testing
🔗 Related
Based on upstream v3.18.3 with proper Git merge to ensure compatibility.
Important
Enhances OpenRouter with a model refresh button, multilingual support, and Cloudflare bypass, improving reliability and user feedback.
OpenRouter.tsx
to manually update the model list with success/error messages.webviewMessageHandler.ts
.refreshModels
translation key in 16 languages inlocales/*/settings.json
.https
module inopenrouter.ts
.openrouter.ts
: Cloudflare bypass logic.OpenRouter.tsx
: Refresh button UI and logic.webviewMessageHandler.ts
: Auto-initialization logic.This description was created by
for 40331eb. You can customize this summary. It will automatically update as commits are pushed.