Skip to content

Commit 0450fca

Browse files
Merge pull request #176 from Jaswanth-Kumar-2007/KJK
Updated Gemini Model
2 parents 2179602 + ce8c2b5 commit 0450fca

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/lib/gemini.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ if (!apiKey) {
99
const genAI = new GoogleGenerativeAI(apiKey);
1010

1111
// Use the latest working model name "gemini-2.5-flash"
12-
export const getGeminiModel = (model: string = "gemini-2.5-flash") => {
12+
export const getGeminiModel = (model: string = "gemini-3.1-flash-lite") => {
1313
return genAI.getGenerativeModel({ model });
1414
};

src/pages/api/ai-hint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
2121
}
2222

2323
// We use gemini-2.5-flash for complex coding logic and instruction following
24-
const model = genAI.getGenerativeModel({ model: 'gemini-2.5-flash' });
24+
const model = genAI.getGenerativeModel({ model: 'gemini-3.1-flash-lite' });
2525

2626
const prompt = `
2727
You are an expert competitive programming tutor. Provide exactly three structured hints for a student stuck on a problem.

src/pages/api/quiz/feedback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (!apiKey) {
77
throw new Error("Missing Gemini API key.");
88
}
99
const genAI = new GoogleGenerativeAI(apiKey);
10-
const model = genAI.getGenerativeModel({ model: "gemini-2.5-flash" });
10+
const model = genAI.getGenerativeModel({ model: "gemini-3.1-flash-lite" });
1111

1212
type RequestData = {
1313
questions: Question[];

src/services/quizClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (!apiKey) {
77
}
88

99
const genAI = new GoogleGenerativeAI(apiKey);
10-
const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" });
10+
const model = genAI.getGenerativeModel({ model: "gemini-3.1-flash-lite" });
1111

1212
// This function is for CLIENT-SIDE use
1313
export async function fetchQuizQuestions(

0 commit comments

Comments
 (0)