Se usan modelos de openai a partir de variables de entorno

This commit is contained in:
2026-02-16 13:03:15 -06:00
committed by Guillermo.Arrieta
parent 34162c6038
commit e64c0de529
4 changed files with 30 additions and 6 deletions
@@ -160,6 +160,11 @@ Deno.serve(async (req: Request): Promise<Response> => {
SERVICE_ROLE_KEY,
);
// Model name controlled via env var
const GENERATE_SUBJECT_SUGGESTIONS_MODELO = Deno.env.get(
"GENERATE_SUBJECT_SUGGESTIONS_MODELO",
) ?? "gpt-5-mini";
const { data: plan, error: planError } = await supabaseService
.from("planes_estudio")
.select("id,nombre,nivel,tipo_ciclo,numero_ciclos,datos")
@@ -276,7 +281,7 @@ Deno.serve(async (req: Request): Promise<Response> => {
}
const options: StructuredResponseOptions = {
model: "gpt-5-mini",
model: GENERATE_SUBJECT_SUGGESTIONS_MODELO,
input: [
{ role: "system", content: systemPrompt },
{