Skip to content

Commit 4d6914b

Browse files
committed
Fix chat completions country gate tests
1 parent 8233a78 commit 4d6914b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

web/src/app/api/v1/chat/completions/__tests__/completions.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ describe('/api/v1/chat/completions POST endpoint', () => {
140140

141141
// Mock global fetch to return OpenRouter-like responses
142142
mockFetch = (async (url: any, options: any) => {
143+
if (String(url).startsWith('https://api.ipinfo.io/lookup/')) {
144+
return Response.json({})
145+
}
146+
143147
if (!options?.body) {
144148
throw new Error('Missing request body')
145149
}

0 commit comments

Comments
 (0)