Classroom TTS pre-generation ignores the TTS_<PREFIX>_MODELS server-side model pin
Steps to reproduce
- Configure a server-managed TTS provider whose gateway only serves one specific model, e.g. a local OpenAI-compatible endpoint behind
TTS_OPENAI_BASE_URL, and pin that model withTTS_OPENAI_MODELS=pinned-tts-a(the pin mechanism fromlib/server/provider-config.ts). - Generate a classroom that contains narratable speech actions (server-side TTS pre-generation path,
generateTTSForClassroominlib/server/classroom-media-generation.ts). - Observe the TTS loop.
Expected behavior
The pre-generation loop honors the operator's {PREFIX}_MODELS pin and requests pinned-tts-a, exactly like POST /api/generate/tts (resolveTTSModel in the route) and the agent-runtime path (lib/server/agent-runtime/scene-tts.ts) already do.
Actual behavior
generateTTSForClassroom passes DEFAULT_TTS_MODELS[providerId] straight to generateTTS, bypassing resolveTTSModel. The catalog default (gpt-4o-mini-tts for openai-tts) is sent verbatim; a gateway that only serves the pinned model answers model not found, and every narration line fails (each is retried, then skipped as silent after the back-off budget).
Example from a local Qwen3-TTS gateway on the TTS_OPENAI slot:
{"error":{"message":"Model 'gpt-4o-mini-tts' not found. Available: Qwen3-TTS-12Hz-1.7B-CustomVoice-8bit, ..."}}The same request through the TTS route succeeds, because that path resolves the pin — only the classroom pre-generation path bypasses it.
Environment
- Version: v1.1.0 (21d83ec5)
- Node: 26.8.1, macOS (arm64)
- Any deployment that sets
TTS_<PREFIX>_MODELSfor the TTS provider used by server-side classroom narration; most visible against gateways serving a single pinned model.
Suggested fix
Route the classroom path through resolveTTSModel like the other two callers (one-line change at the modelId construction site). I have a patch with regression tests ready to open as a PR.
Source: THU-MAIC/OpenMAIC