fix(*): Ensure fallback data works correctly

This commit is contained in:
Josh Creek
2025-04-24 20:31:51 +01:00
parent b7a516cebb
commit cf907da7ba
2 changed files with 21 additions and 15 deletions
+6 -1
View File
@@ -145,7 +145,12 @@ export async function gradeSubmissionWithAgent(
task: string,
roomId: string
): Promise<OpenAIResponse> {
if (!client || !agent) {
if (!client) {
// In test/CI mode, return fallback data
return fallbackGrade(submission, task);
}
if (!agent) {
throw new Error('Agent not available');
}