Skip to content

Commit eaad5ed

Browse files
authored
Merge pull request #346 from AI4Bharat/feature/add-new-models
Feature/add new models
2 parents 770f596 + 8bb9a8d commit eaad5ed

6 files changed

Lines changed: 72 additions & 12 deletions

File tree

backend/dataset/migrations/0058_alter_instruction_meta_info_model_and_more.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ class Migration(migrations.Migration):
1313
migrations.AlterField(
1414
model_name='instruction',
1515
name='meta_info_model',
16-
field=models.CharField(choices=[('GPT3.5', 'GPT3.5'), ('GPT4', 'GPT4'), ('LLAMA2', 'LLAMA2'), ('GPT4OMini', 'GPT4OMini'), ('GPT4O', 'GPT4O'), ('GEMMA', 'GEMMA'), ('SARVAM_M', 'SARVAM_M'), ('google/gemma-3-12b-it', 'google/gemma-3-12b-it'), ('Qwen/Qwen3-30B-A3B', 'Qwen/Qwen3-30B-A3B'), ('meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8', 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8'), ('meta-llama/Llama-4-Scout-17B-16E-Instruct', 'meta-llama/Llama-4-Scout-17B-16E-Instruct'), ('google/gemma-3-27b-it', 'google/gemma-3-27b-it'), ('meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'), ('meta-llama/Llama-3.2-3B-Instruct', 'meta-llama/Llama-3.2-3B-Instruct'), ('meta-llama/Llama-3.3-70B-Instruct-Turbo', 'meta-llama/Llama-3.3-70B-Instruct-Turbo'), ('meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'), ('meta-llama/Llama-3.3-70B-Instruct', 'meta-llama/Llama-3.3-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-70B-Instruct', 'meta-llama/Meta-Llama-3.1-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-8B-Instruct', 'meta-llama/Meta-Llama-3.1-8B-Instruct'), ('google/gemma-4-26B-A4B-it', 'google/gemma-4-26B-A4B-it'), ('google/gemma-4-31B-it', 'google/gemma-4-31B-it'), ('gemini-3.5-flash', 'gemini-3.5-flash'), ('gemini-3.1-pro', 'gemini-3.1-pro'), ('gemini-3.1-flash-lite', 'gemini-3.1-flash-lite'), ('gemini-3-flash', 'gemini-3-flash')], default='GPT3.5', help_text='Model information for the instruction', max_length=255, verbose_name='Meta Info Model'),
16+
field=models.CharField(choices=[('GPT3.5', 'GPT3.5'), ('GPT4', 'GPT4'), ('LLAMA2', 'LLAMA2'), ('GPT4OMini', 'GPT4OMini'), ('GPT4O', 'GPT4O'), ('GEMMA', 'GEMMA'), ('SARVAM_M', 'SARVAM_M'), ('google/gemma-3-12b-it', 'google/gemma-3-12b-it'), ('Qwen/Qwen3-30B-A3B', 'Qwen/Qwen3-30B-A3B'), ('meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8', 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8'), ('meta-llama/Llama-4-Scout-17B-16E-Instruct', 'meta-llama/Llama-4-Scout-17B-16E-Instruct'), ('google/gemma-3-27b-it', 'google/gemma-3-27b-it'), ('meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'), ('meta-llama/Llama-3.2-3B-Instruct', 'meta-llama/Llama-3.2-3B-Instruct'), ('meta-llama/Llama-3.3-70B-Instruct-Turbo', 'meta-llama/Llama-3.3-70B-Instruct-Turbo'), ('meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'), ('meta-llama/Llama-3.3-70B-Instruct', 'meta-llama/Llama-3.3-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-70B-Instruct', 'meta-llama/Meta-Llama-3.1-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-8B-Instruct', 'meta-llama/Meta-Llama-3.1-8B-Instruct'), ('google/gemma-4-26B-A4B-it', 'google/gemma-4-26B-A4B-it'), ('google/gemma-4-31B-it', 'google/gemma-4-31B-it'), ('gemini-3.5-flash', 'gemini-3.5-flash'), ('gemini-3.1-pro-preview', 'gemini-3.1-pro-preview'), ('gemini-3.1-flash-lite', 'gemini-3.1-flash-lite'), ('gemini-3-flash', 'gemini-3-flash')], default='GPT3.5', help_text='Model information for the instruction', max_length=255, verbose_name='Meta Info Model'),
1717
),
1818
migrations.AlterField(
1919
model_name='promptanswer',
2020
name='model',
21-
field=models.CharField(choices=[('GPT3.5', 'GPT3.5'), ('GPT4', 'GPT4'), ('LLAMA2', 'LLAMA2'), ('GPT4OMini', 'GPT4OMini'), ('GPT4O', 'GPT4O'), ('GEMMA', 'GEMMA'), ('SARVAM_M', 'SARVAM_M'), ('google/gemma-3-12b-it', 'google/gemma-3-12b-it'), ('Qwen/Qwen3-30B-A3B', 'Qwen/Qwen3-30B-A3B'), ('meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8', 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8'), ('meta-llama/Llama-4-Scout-17B-16E-Instruct', 'meta-llama/Llama-4-Scout-17B-16E-Instruct'), ('google/gemma-3-27b-it', 'google/gemma-3-27b-it'), ('meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'), ('meta-llama/Llama-3.2-3B-Instruct', 'meta-llama/Llama-3.2-3B-Instruct'), ('meta-llama/Llama-3.3-70B-Instruct-Turbo', 'meta-llama/Llama-3.3-70B-Instruct-Turbo'), ('meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'), ('meta-llama/Llama-3.3-70B-Instruct', 'meta-llama/Llama-3.3-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-70B-Instruct', 'meta-llama/Meta-Llama-3.1-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-8B-Instruct', 'meta-llama/Meta-Llama-3.1-8B-Instruct'), ('google/gemma-4-26B-A4B-it', 'google/gemma-4-26B-A4B-it'), ('google/gemma-4-31B-it', 'google/gemma-4-31B-it'), ('gemini-3.5-flash', 'gemini-3.5-flash'), ('gemini-3.1-pro', 'gemini-3.1-pro'), ('gemini-3.1-flash-lite', 'gemini-3.1-flash-lite'), ('gemini-3-flash', 'gemini-3-flash')], help_text='Model of the response', max_length=49, verbose_name='model'),
21+
field=models.CharField(choices=[('GPT3.5', 'GPT3.5'), ('GPT4', 'GPT4'), ('LLAMA2', 'LLAMA2'), ('GPT4OMini', 'GPT4OMini'), ('GPT4O', 'GPT4O'), ('GEMMA', 'GEMMA'), ('SARVAM_M', 'SARVAM_M'), ('google/gemma-3-12b-it', 'google/gemma-3-12b-it'), ('Qwen/Qwen3-30B-A3B', 'Qwen/Qwen3-30B-A3B'), ('meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8', 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8'), ('meta-llama/Llama-4-Scout-17B-16E-Instruct', 'meta-llama/Llama-4-Scout-17B-16E-Instruct'), ('google/gemma-3-27b-it', 'google/gemma-3-27b-it'), ('meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'), ('meta-llama/Llama-3.2-3B-Instruct', 'meta-llama/Llama-3.2-3B-Instruct'), ('meta-llama/Llama-3.3-70B-Instruct-Turbo', 'meta-llama/Llama-3.3-70B-Instruct-Turbo'), ('meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'), ('meta-llama/Llama-3.3-70B-Instruct', 'meta-llama/Llama-3.3-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-70B-Instruct', 'meta-llama/Meta-Llama-3.1-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-8B-Instruct', 'meta-llama/Meta-Llama-3.1-8B-Instruct'), ('google/gemma-4-26B-A4B-it', 'google/gemma-4-26B-A4B-it'), ('google/gemma-4-31B-it', 'google/gemma-4-31B-it'), ('gemini-3.5-flash', 'gemini-3.5-flash'), ('gemini-3.1-pro-preview', 'gemini-3.1-pro-preview'), ('gemini-3.1-flash-lite', 'gemini-3.1-flash-lite'), ('gemini-3-flash', 'gemini-3-flash')], help_text='Model of the response', max_length=49, verbose_name='model'),
2222
),
2323
]

backend/dataset/migrations/0059_alter_instruction_meta_info_model_and_more.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ class Migration(migrations.Migration):
1313
migrations.AlterField(
1414
model_name='instruction',
1515
name='meta_info_model',
16-
field=models.CharField(choices=[('GPT3.5', 'GPT3.5'), ('GPT4', 'GPT4'), ('LLAMA2', 'LLAMA2'), ('GPT4OMini', 'GPT4OMini'), ('GPT4O', 'GPT4O'), ('GEMMA', 'GEMMA'), ('SARVAM_M', 'SARVAM_M'), ('google/gemma-3-12b-it', 'google/gemma-3-12b-it'), ('Qwen/Qwen3-30B-A3B', 'Qwen/Qwen3-30B-A3B'), ('meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8', 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8'), ('meta-llama/Llama-4-Scout-17B-16E-Instruct', 'meta-llama/Llama-4-Scout-17B-16E-Instruct'), ('google/gemma-3-27b-it', 'google/gemma-3-27b-it'), ('meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'), ('meta-llama/Llama-3.2-3B-Instruct', 'meta-llama/Llama-3.2-3B-Instruct'), ('meta-llama/Llama-3.3-70B-Instruct-Turbo', 'meta-llama/Llama-3.3-70B-Instruct-Turbo'), ('meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'), ('meta-llama/Llama-3.3-70B-Instruct', 'meta-llama/Llama-3.3-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-70B-Instruct', 'meta-llama/Meta-Llama-3.1-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-8B-Instruct', 'meta-llama/Meta-Llama-3.1-8B-Instruct'), ('google/gemma-4-26B-A4B-it', 'google/gemma-4-26B-A4B-it'), ('google/gemma-4-31B-it', 'google/gemma-4-31B-it'), ('gemini-3.5-flash', 'gemini-3.5-flash'), ('gemini-3.1-pro', 'gemini-3.1-pro'), ('gemini-3.1-flash-lite', 'gemini-3.1-flash-lite')], default='GPT3.5', help_text='Model information for the instruction', max_length=255, verbose_name='Meta Info Model'),
16+
field=models.CharField(choices=[('GPT3.5', 'GPT3.5'), ('GPT4', 'GPT4'), ('LLAMA2', 'LLAMA2'), ('GPT4OMini', 'GPT4OMini'), ('GPT4O', 'GPT4O'), ('GEMMA', 'GEMMA'), ('SARVAM_M', 'SARVAM_M'), ('google/gemma-3-12b-it', 'google/gemma-3-12b-it'), ('Qwen/Qwen3-30B-A3B', 'Qwen/Qwen3-30B-A3B'), ('meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8', 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8'), ('meta-llama/Llama-4-Scout-17B-16E-Instruct', 'meta-llama/Llama-4-Scout-17B-16E-Instruct'), ('google/gemma-3-27b-it', 'google/gemma-3-27b-it'), ('meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'), ('meta-llama/Llama-3.2-3B-Instruct', 'meta-llama/Llama-3.2-3B-Instruct'), ('meta-llama/Llama-3.3-70B-Instruct-Turbo', 'meta-llama/Llama-3.3-70B-Instruct-Turbo'), ('meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'), ('meta-llama/Llama-3.3-70B-Instruct', 'meta-llama/Llama-3.3-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-70B-Instruct', 'meta-llama/Meta-Llama-3.1-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-8B-Instruct', 'meta-llama/Meta-Llama-3.1-8B-Instruct'), ('google/gemma-4-26B-A4B-it', 'google/gemma-4-26B-A4B-it'), ('google/gemma-4-31B-it', 'google/gemma-4-31B-it'), ('gemini-3.5-flash', 'gemini-3.5-flash'), ('gemini-3.1-pro-preview', 'gemini-3.1-pro-preview'), ('gemini-3.1-flash-lite', 'gemini-3.1-flash-lite')], default='GPT3.5', help_text='Model information for the instruction', max_length=255, verbose_name='Meta Info Model'),
1717
),
1818
migrations.AlterField(
1919
model_name='promptanswer',
2020
name='model',
21-
field=models.CharField(choices=[('GPT3.5', 'GPT3.5'), ('GPT4', 'GPT4'), ('LLAMA2', 'LLAMA2'), ('GPT4OMini', 'GPT4OMini'), ('GPT4O', 'GPT4O'), ('GEMMA', 'GEMMA'), ('SARVAM_M', 'SARVAM_M'), ('google/gemma-3-12b-it', 'google/gemma-3-12b-it'), ('Qwen/Qwen3-30B-A3B', 'Qwen/Qwen3-30B-A3B'), ('meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8', 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8'), ('meta-llama/Llama-4-Scout-17B-16E-Instruct', 'meta-llama/Llama-4-Scout-17B-16E-Instruct'), ('google/gemma-3-27b-it', 'google/gemma-3-27b-it'), ('meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'), ('meta-llama/Llama-3.2-3B-Instruct', 'meta-llama/Llama-3.2-3B-Instruct'), ('meta-llama/Llama-3.3-70B-Instruct-Turbo', 'meta-llama/Llama-3.3-70B-Instruct-Turbo'), ('meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'), ('meta-llama/Llama-3.3-70B-Instruct', 'meta-llama/Llama-3.3-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-70B-Instruct', 'meta-llama/Meta-Llama-3.1-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-8B-Instruct', 'meta-llama/Meta-Llama-3.1-8B-Instruct'), ('google/gemma-4-26B-A4B-it', 'google/gemma-4-26B-A4B-it'), ('google/gemma-4-31B-it', 'google/gemma-4-31B-it'), ('gemini-3.5-flash', 'gemini-3.5-flash'), ('gemini-3.1-pro', 'gemini-3.1-pro'), ('gemini-3.1-flash-lite', 'gemini-3.1-flash-lite')], help_text='Model of the response', max_length=49, verbose_name='model'),
21+
field=models.CharField(choices=[('GPT3.5', 'GPT3.5'), ('GPT4', 'GPT4'), ('LLAMA2', 'LLAMA2'), ('GPT4OMini', 'GPT4OMini'), ('GPT4O', 'GPT4O'), ('GEMMA', 'GEMMA'), ('SARVAM_M', 'SARVAM_M'), ('google/gemma-3-12b-it', 'google/gemma-3-12b-it'), ('Qwen/Qwen3-30B-A3B', 'Qwen/Qwen3-30B-A3B'), ('meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8', 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8'), ('meta-llama/Llama-4-Scout-17B-16E-Instruct', 'meta-llama/Llama-4-Scout-17B-16E-Instruct'), ('google/gemma-3-27b-it', 'google/gemma-3-27b-it'), ('meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo'), ('meta-llama/Llama-3.2-3B-Instruct', 'meta-llama/Llama-3.2-3B-Instruct'), ('meta-llama/Llama-3.3-70B-Instruct-Turbo', 'meta-llama/Llama-3.3-70B-Instruct-Turbo'), ('meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo', 'meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo'), ('meta-llama/Llama-3.3-70B-Instruct', 'meta-llama/Llama-3.3-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-70B-Instruct', 'meta-llama/Meta-Llama-3.1-70B-Instruct'), ('meta-llama/Meta-Llama-3.1-8B-Instruct', 'meta-llama/Meta-Llama-3.1-8B-Instruct'), ('google/gemma-4-26B-A4B-it', 'google/gemma-4-26B-A4B-it'), ('google/gemma-4-31B-it', 'google/gemma-4-31B-it'), ('gemini-3.5-flash', 'gemini-3.5-flash'), ('gemini-3.1-pro-preview', 'gemini-3.1-pro-preview'), ('gemini-3.1-flash-lite', 'gemini-3.1-flash-lite')], help_text='Model of the response', max_length=49, verbose_name='model'),
2222
),
2323
]

backend/dataset/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
("google/gemma-4-31B-it", "google/gemma-4-31B-it"),
156156
# New Google AI Studio models
157157
("gemini-3.5-flash", "gemini-3.5-flash"),
158-
("gemini-3.1-pro", "gemini-3.1-pro"),
158+
("gemini-3.1-pro-preview", "gemini-3.1-pro-preview"),
159159
("gemini-3.1-flash-lite", "gemini-3.1-flash-lite"),
160160
)
161161

@@ -168,7 +168,7 @@
168168
"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",
169169
"meta-llama/Llama-4-Scout-17B-16E-Instruct",
170170
"gemini-3.5-flash",
171-
"gemini-3.1-pro",
171+
"gemini-3.1-pro-preview",
172172
"gemini-3.1-flash-lite",
173173
]
174174

backend/projects/views.py

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
validate_metadata_json_format,
5353
)
5454

55-
from dataset.models import DatasetInstance
55+
from dataset.models import DatasetInstance, ACTIVE_LLM_MODELS
5656

5757
# Import celery tasks
5858
from .tasks import (
@@ -1132,6 +1132,67 @@ def list(self, request, *args, **kwargs):
11321132
return Response(
11331133
{"message": "Please Login!"}, status=status.HTTP_400_BAD_REQUEST
11341134
)
1135+
@action(detail=True, methods=["POST"], url_path="update_tasks_models")
1136+
def update_tasks_models(self, request, pk=None):
1137+
"""
1138+
Update all tasks in a project to use the new model configuration.
1139+
"""
1140+
from tasks.models import Task
1141+
1142+
try:
1143+
project = self.get_object()
1144+
1145+
# Check permissions
1146+
if not (request.user.role == User.ORGANIZATION_OWNER or
1147+
request.user.is_superuser or
1148+
request.user.role == User.WORKSPACE_MANAGER):
1149+
return Response(
1150+
{"message": "You are not authorized to perform this action"},
1151+
status=status.HTTP_403_FORBIDDEN
1152+
)
1153+
1154+
# Get the models from project metadata
1155+
models_set = project.metadata_json.get('models_set', [])
1156+
fixed_models = project.metadata_json.get('fixed_models', [])
1157+
1158+
if not models_set:
1159+
return Response(
1160+
{"message": "No models configured in project"},
1161+
status=status.HTTP_400_BAD_REQUEST
1162+
)
1163+
1164+
# Use fixed models if available, otherwise use all models_set
1165+
new_models = fixed_models if fixed_models else models_set
1166+
1167+
tasks = Task.objects.filter(project_id=project)
1168+
updated_count = 0
1169+
errors = []
1170+
tasks_list = []
1171+
1172+
for task in tasks:
1173+
try:
1174+
task.data['model'] = new_models.copy()
1175+
tasks_list.append(task)
1176+
updated_count += 1
1177+
except Exception as e:
1178+
errors.append(f"Task {task.id}: {str(e)}")
1179+
1180+
# Bulk update for performance
1181+
if tasks_list:
1182+
Task.objects.bulk_update(tasks_list, ['data'])
1183+
1184+
return Response({
1185+
"message": f"Updated {updated_count} out of {tasks.count()} tasks",
1186+
"updated_count": updated_count,
1187+
"total_tasks": tasks.count(),
1188+
"errors": errors
1189+
}, status=status.HTTP_200_OK)
1190+
1191+
except Exception as e:
1192+
return Response(
1193+
{"message": f"Error: {str(e)}"},
1194+
status=status.HTTP_400_BAD_REQUEST
1195+
)
11351196

11361197
@swagger_auto_schema(
11371198
method="get",
@@ -2512,6 +2573,9 @@ def assign_new_tasks(self, request, pk, *args, **kwargs):
25122573
)
25132574
for task in tasks:
25142575
task.annotation_users.add(cur_user)
2576+
if project.project_type == "InstructionDrivenChat":
2577+
if task.data and "model" in task.data and task.data["model"] not in ACTIVE_LLM_MODELS:
2578+
task.data["model"] = ACTIVE_LLM_MODELS[0]
25152579
task.save()
25162580
result = []
25172581
annotator_anno_count = Annotation_model.objects.filter(

backend/tasks/views.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
duplicate_check,
3838
)
3939
from utils.llm_interactions import get_model_output, get_all_model_output
40-
from dataset.models import ACTIVE_LLM_MODELS
4140

4241
from utils.search import process_search_query
4342

@@ -2986,9 +2985,6 @@ def get_llm_output(prompt, task, annotation, project_metadata_json):
29862985
sys_prompt_data = project_metadata.get("system_prompt", {}) if isinstance(project_metadata, dict) else {}
29872986
model = task.data["model"]
29882987

2989-
if model not in ACTIVE_LLM_MODELS:
2990-
model = ACTIVE_LLM_MODELS[0]
2991-
29922988
if isinstance(sys_prompt_data, dict):
29932989
system_prompt = sys_prompt_data.get(model) or sys_prompt_data.get("default") or DEFAULT_SYSTEM_PROMPT
29942990
else:

backend/utils/llm_interactions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def process_history(history):
220220
# Google AI Studio models (via OpenAI-compatible endpoint)
221221
GOOGLE_AI_STUDIO_MODELS = {
222222
"gemini-3.5-flash",
223-
"gemini-3.1-pro",
223+
"gemini-3.1-pro-preview",
224224
"gemini-3.1-flash-lite",
225225
}
226226

0 commit comments

Comments
 (0)