Skip to content

Commit 4488798

Browse files
committed
fix modelapikey requirement
1 parent 7044d8e commit 4488798

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ export const configSchema = z
102102
})
103103
.refine(
104104
(data) => {
105-
// If any model is explicitly specified, API key is required
106-
if (data.modelName) {
105+
// If a non-default model is explicitly specified, API key is required
106+
if (data.modelName && data.modelName !== "gemini-2.0-flash") {
107107
return data.modelApiKey !== undefined && data.modelApiKey.length > 0;
108108
}
109109
return true;

0 commit comments

Comments
 (0)