Skip to content

Commit

Permalink
🐛 fix: Rollback lobehub#2149 (lobehub#2186)
Browse files Browse the repository at this point in the history
* RollBACK lobehub#2149

* RollBACK lobehub#2149

* Update route.ts
  • Loading branch information
RubuJam authored Apr 24, 2024
1 parent 1226458 commit c684d4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src/app/api/chat/google/route.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ describe('Configuration tests', () => {
});

it('should contain specific regions in preferredRegion', () => {
expect(preferredRegion).not.contain(['hkg1']);
expect(preferredRegion).not.contain(['dub1']);
expect(preferredRegion).not.contain(['hk1']);
});
});

Expand Down
19 changes: 1 addition & 18 deletions src/app/api/chat/google/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,6 @@ export const runtime = 'edge';

// due to Gemini-1.5-pro is not available in Hong Kong and Ireland, we need to set the preferred region to exclude "Hong Kong" or "Ireland".
// refs: https://github.com/lobehub/lobe-chat/pull/2149
export const preferredRegion = [
'icn1',
'sin1',
'hnd1',
'kix1',
'bom1',
'cdg1',
'lhr1',
'cpt1',
'pdx1',
'arn1',
'cle1',
'syd1',
'iad1',
'fra1',
'sfo1',
'gru1'
];
export const preferredRegion = ['cle1', 'iad1', 'pdx1', 'sfo1'];

export const POST = async (req: Request) => UniverseRoute(req, { params: { provider: 'google' } });

0 comments on commit c684d4e

Please sign in to comment.