Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ if (!apiKey) {
const genAI = new GoogleGenerativeAI(apiKey);

// Use the latest working model name "gemini-2.5-flash"
export const getGeminiModel = (model: string = "gemini-2.5-flash") => {
export const getGeminiModel = (model: string = "gemini-3.1-flash-lite") => {
Comment thread
Jaswanth-Kumar-2007 marked this conversation as resolved.
return genAI.getGenerativeModel({ model });
};
2 changes: 1 addition & 1 deletion src/pages/api/ai-hint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
}

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

const prompt = `
You are an expert competitive programming tutor. Provide exactly three structured hints for a student stuck on a problem.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/quiz/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (!apiKey) {
throw new Error("Missing Gemini API key.");
}
const genAI = new GoogleGenerativeAI(apiKey);
const model = genAI.getGenerativeModel({ model: "gemini-2.5-flash" });
const model = genAI.getGenerativeModel({ model: "gemini-3.1-flash-lite" });

type RequestData = {
questions: Question[];
Expand Down
2 changes: 1 addition & 1 deletion src/services/quizClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (!apiKey) {
}

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

// This function is for CLIENT-SIDE use
export async function fetchQuizQuestions(
Expand Down
Loading