Skip to content

Commit 618589f

Browse files
committed
format
1 parent 97d88e9 commit 618589f

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

app/api/api-keys/check/route.ts

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,23 @@ const AGENT_PROVIDER_MAP: Record<string, Provider> = {
1414

1515
// Check if a model is an Anthropic model
1616
function isAnthropicModel(model: string): boolean {
17-
const anthropicPatterns = [
18-
'claude',
19-
'sonnet',
20-
'opus',
21-
]
17+
const anthropicPatterns = ['claude', 'sonnet', 'opus']
2218
const lowerModel = model.toLowerCase()
23-
return anthropicPatterns.some(pattern => lowerModel.includes(pattern))
19+
return anthropicPatterns.some((pattern) => lowerModel.includes(pattern))
2420
}
2521

2622
// Check if a model is an OpenAI model
2723
function isOpenAIModel(model: string): boolean {
28-
const openaiPatterns = [
29-
'gpt',
30-
'openai',
31-
]
24+
const openaiPatterns = ['gpt', 'openai']
3225
const lowerModel = model.toLowerCase()
33-
return openaiPatterns.some(pattern => lowerModel.includes(pattern))
26+
return openaiPatterns.some((pattern) => lowerModel.includes(pattern))
3427
}
3528

3629
// Check if a model is a Gemini model
3730
function isGeminiModel(model: string): boolean {
38-
const geminiPatterns = [
39-
'gemini',
40-
]
31+
const geminiPatterns = ['gemini']
4132
const lowerModel = model.toLowerCase()
42-
return geminiPatterns.some(pattern => lowerModel.includes(pattern))
33+
return geminiPatterns.some((pattern) => lowerModel.includes(pattern))
4334
}
4435

4536
export async function GET(req: NextRequest) {
@@ -85,4 +76,3 @@ export async function GET(req: NextRequest) {
8576
return NextResponse.json({ error: 'Failed to check API key' }, { status: 500 })
8677
}
8778
}
88-

0 commit comments

Comments
 (0)