Skip to content

Commit

Permalink
🐛 fix: disable openrouter client fetch (lobehub#6043)
Browse files Browse the repository at this point in the history
* update docs

* improve openrouter config

* update docs
  • Loading branch information
arvinxx authored Feb 12, 2025
1 parent 0667ec2 commit 63b22ce
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 100 deletions.
4 changes: 2 additions & 2 deletions README.ja-JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,9 @@ This project is [Apache 2.0](./LICENSE) licensed.
[blog]: https://lobehub.com/blog
[changelog]: https://lobehub.com/changelog
[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/lobechat_com_chat.html
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/lobechat_com_chat.html
[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk
[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template
[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,9 @@ This project is [Apache 2.0](./LICENSE) licensed.
[blog]: https://lobehub.com/blog
[changelog]: https://lobehub.com/changelog
[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/lobechat_com_chat.html
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/lobechat_com_chat.html
[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk
[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template
[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway
Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,9 @@ This project is [Apache 2.0](./LICENSE) licensed.
[blog]: https://lobehub.com/zh/blog
[changelog]: https://lobehub.com/changelog
[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/lobechat_com_chat.html
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/lobechat_com_chat.html
[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk
[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template
[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway
Expand Down
4 changes: 2 additions & 2 deletions README.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,9 @@ This project is [Apache 2.0](./LICENSE) licensed.
[blog]: https://lobehub.com/zh/blog
[changelog]: https://lobehub.com/changelog
[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/lobechat_com_chat.html
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/lobechat_com_chat.html
[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk
[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template
[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway
Expand Down
53 changes: 13 additions & 40 deletions contributing/Others/Lighthouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,37 @@

#### TOC

- [Welcome Page](#welcome-page)
- [Chat Page](#chat-page)
- [Market Page](#market-page)
- [Settings Page](#settings-page)

## Welcome Page

> **Info**\
> <https://chat-preview.lobehub.com/welcome>
| Desktop | Mobile |
| :---------------------------------------------: | :--------------------------------------------: |
| ![][welcome-desktop] | ![][welcome-mobile] |
| [⚡️ Lighthouse Report][welcome-desktop-report] | [⚡️ Lighthouse Report][welcome-mobile-report] |
- [Discover Page](#discover-page)

## Chat Page

> **Info**\
> <https://chat-preview.lobehub.com/chat>
> <https://lobechat.com/chat>
| Desktop | Mobile |
| :------------------------------------------: | :-----------------------------------------: |
| ![][chat-desktop] | ![][chat-mobile] |
| [⚡️ Lighthouse Report][chat-desktop-report] | [⚡️ Lighthouse Report][chat-mobile-report] |

## Market Page

## Discover Page

> **Info**\
> <https://chat-preview.lobehub.com/market>
> <https://lobechat.com/discover>
| Desktop | Mobile |
| :--------------------------------------------: | :-------------------------------------------: |
| ![][market-desktop] | ![][market-mobile] |
| [⚡️ Lighthouse Report][market-desktop-report] | [⚡️ Lighthouse Report][market-mobile-report] |

## Settings Page
| ![][discover-desktop] | ![][discover-mobile] |
| [⚡️ Lighthouse Report][discover-desktop-report] | [⚡️ Lighthouse Report][discover-mobile-report] |

> **Info**\
> <https://chat-preview.lobehub.com/settings>

| Desktop | Mobile |
| :----------------------------------------------: | :---------------------------------------------: |
| ![][settings-desktop] | ![][settings-mobile] |
| [⚡️ Lighthouse Report][settings-desktop-report] | [⚡️ Lighthouse Report][settings-mobile-report] |

[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/lobechat_com_chat.html
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
[market-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/desktop/pagespeed.svg
[market-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/desktop/chat_preview_lobehub_com_market.html
[market-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/mobile/pagespeed.svg
[market-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/mobile/chat_preview_lobehub_com_market.html
[settings-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/desktop/pagespeed.svg
[settings-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/desktop/chat_preview_lobehub_com_settings.html
[settings-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/mobile/pagespeed.svg
[settings-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/mobile/chat_preview_lobehub_com_settings.html
[welcome-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/desktop/pagespeed.svg
[welcome-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/desktop/chat_preview_lobehub_com_welcome.html
[welcome-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/mobile/pagespeed.svg
[welcome-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/mobile/chat_preview_lobehub_com_welcome.html
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/lobechat_com_chat.html
[discover-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/discover/desktop/pagespeed.svg
[discover-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/discover/desktop/lobechat_com_discover.html
[discover-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/discover/mobile/pagespeed.svg
[discover-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/discover/mobile/lobechat_com_discover.html
53 changes: 12 additions & 41 deletions contributing/Others/Lighthouse.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,35 @@

#### TOC

- [Welcome 欢迎页面](#welcome-欢迎页面)
- [Chat 聊天页面](#chat-聊天页面)
- [Market 市场页面](#market-市场页面)
- [Settings 设置页面](#settings-设置页面)

## Welcome 欢迎页面

> **Info**\
> <https://chat-preview.lobehub.com/welcome>
| Desktop | Mobile |
| :---------------------------------------------: | :--------------------------------------------: |
| ![][welcome-desktop] | ![][welcome-mobile] |
| [⚡️ Lighthouse Report][welcome-desktop-report] | [⚡️ Lighthouse Report][welcome-mobile-report] |
- [Discover 市场页面](#discover-市场页面)

## Chat 聊天页面

> **Info**\
> <https://chat-preview.lobehub.com/chat>
> <https://lobechat.com/chat>
| Desktop | Mobile |
| :------------------------------------------: | :-----------------------------------------: |
| ![][chat-desktop] | ![][chat-mobile] |
| [⚡️ Lighthouse Report][chat-desktop-report] | [⚡️ Lighthouse Report][chat-mobile-report] |

## Market 市场页面
## Discover 发现页面

> **Info**\
> <https://chat-preview.lobehub.com/market>
> <https://lobechat.com/discover>
| Desktop | Mobile |
| :--------------------------------------------: | :-------------------------------------------: |
| ![][market-desktop] | ![][market-mobile] |
| [⚡️ Lighthouse Report][market-desktop-report] | [⚡️ Lighthouse Report][market-mobile-report] |

## Settings 设置页面

> **Info**\
> <https://chat-preview.lobehub.com/settings>
| ![][discover-desktop] | ![][discover-mobile] |
| [⚡️ Lighthouse Report][discover-desktop-report] | [⚡️ Lighthouse Report][discover-mobile-report] |

| Desktop | Mobile |
| :----------------------------------------------: | :---------------------------------------------: |
| ![][settings-desktop] | ![][settings-mobile] |
| [⚡️ Lighthouse Report][settings-desktop-report] | [⚡️ Lighthouse Report][settings-mobile-report] |

[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/lobechat_com_chat.html
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
[market-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/desktop/pagespeed.svg
[market-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/desktop/chat_preview_lobehub_com_market.html
[market-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/mobile/pagespeed.svg
[market-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/mobile/chat_preview_lobehub_com_market.html
[settings-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/desktop/pagespeed.svg
[settings-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/desktop/chat_preview_lobehub_com_settings.html
[settings-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/mobile/pagespeed.svg
[settings-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/mobile/chat_preview_lobehub_com_settings.html
[welcome-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/desktop/pagespeed.svg
[welcome-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/desktop/chat_preview_lobehub_com_welcome.html
[welcome-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/mobile/pagespeed.svg
[welcome-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/mobile/chat_preview_lobehub_com_welcome.html
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/lobechat_com_chat.html
[discover-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/discover/desktop/pagespeed.svg
[discover-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/discover/desktop/lobechat_com_discover.html
[discover-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/discover/mobile/pagespeed.svg
[discover-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/discover/mobile/lobechat_com_discover.html
27 changes: 16 additions & 11 deletions src/config/modelProviders/openrouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,20 @@ const OpenRouter: ModelProviderCard = {
},
{
contextWindowTokens: 1_048_576 + 8192,
description: "Gemini 2.0 Flash 提供下一代功能和改进,包括卓越的速度、原生工具使用、多模态生成和1M令牌上下文窗口。",
displayName: "Gemini 2.0 Flash",
description:
'Gemini 2.0 Flash 提供下一代功能和改进,包括卓越的速度、原生工具使用、多模态生成和1M令牌上下文窗口。',
displayName: 'Gemini 2.0 Flash',
enabled: true,
functionCall: true,
id: "google/gemini-2.0-flash-001",
id: 'google/gemini-2.0-flash-001',
maxOutput: 8192,
#: {
cachedInput: 0.025,
input: 0.1,
output: 0.4
output: 0.4,
},
releasedAt: "2025-02-05",
vision: true
releasedAt: '2025-02-05',
vision: true,
},
{
contextWindowTokens: 2_000_000 + 8192,
Expand Down Expand Up @@ -298,14 +299,15 @@ const OpenRouter: ModelProviderCard = {
},
{
contextWindowTokens: 2_097_152 + 8192,
description: "Gemini 2.0 Pro Experimental 是 Google 最新的实验性多模态AI模型,与历史版本相比有一定的质量提升,特别是对于世界知识、代码和长上下文。",
displayName: "Gemini 2.0 Pro Experimental 02-05 (Free)",
description:
'Gemini 2.0 Pro Experimental 是 Google 最新的实验性多模态AI模型,与历史版本相比有一定的质量提升,特别是对于世界知识、代码和长上下文。',
displayName: 'Gemini 2.0 Pro Experimental 02-05 (Free)',
enabled: true,
functionCall: true,
id: "google/gemini-2.0-pro-exp-02-05:free",
id: 'google/gemini-2.0-pro-exp-02-05:free',
maxOutput: 8192,
releasedAt: "2025-02-05",
vision: true
releasedAt: '2025-02-05',
vision: true,
},
],
checkModel: 'google/gemma-2-9b-it:free',
Expand All @@ -316,6 +318,9 @@ const OpenRouter: ModelProviderCard = {
modelsUrl: 'https://openrouter.ai/models',
name: 'OpenRouter',
settings: {
// OpenRouter don't support browser request
// https://github.com/lobehub/lobe-chat/issues/5900
disableBrowserRequest: true,
sdkType: 'openai',
showModelFetcher: true,
},
Expand Down

0 comments on commit 63b22ce

Please # to comment.