Skip to content

[186] Implement ai multi users#142

Merged
Andriamanampisoa merged 10 commits into
stagingfrom
186-implement-ai-multi-users
Jun 24, 2026
Merged

[186] Implement ai multi users#142
Andriamanampisoa merged 10 commits into
stagingfrom
186-implement-ai-multi-users

Conversation

@Andriamanampisoa

Copy link
Copy Markdown
Collaborator

What type of PR is this? (check all applicable)

  • ✨ Feature
  • 🛑 Bug
  • ⚠️ Anomaly
  • 📝 Doc
  • 🎨 Style
  • 🧑‍💻 Refactor
  • 🛠️ Setup
  • 🏗️ Build
  • 🔥 Perfs
  • ✅ Test
  • 🔁 CI
  • ⏩ Revert

Description

This pull request introduces a new "simulation context" protocol step for AI interview simulations, ensuring that company and job offer details are sent to the STS (Speech-to-Speech) microservice before audio streaming begins. This context is now required for accurate LLM prompting. The changes include protocol documentation updates, new WebSocket and backend logic to handle and relay this context, and a switch to using OpenRouter as the default LLM backend for the STS service.

Linked GitHub Ticket

Closes EpitechPromo2027/G-EIP-600-NAN-6-1-eip-tugdual.de-reviers#186

Workspace

  • 🖥️ Web
  • 🛠️ Server
  • 🔁 CI
  • 🤖 Ai
  • 📱 App

@cursor

cursor Bot commented Jun 20, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Large cross-stack change touching auth (WS tokens, internal API key), Redis capacity, and real-time audio/LLM paths; misconfiguration or slot bugs could block or overload simulations.

Overview
Adds Redis-backed simulation capacity on NestJS: concurrent slot limits, a wait queue, JWT WebSocket entrypoints, session/heartbeat/cancel APIs, and internal STS routes for session context and history sync. Interview creation now returns ready vs queued instead of always calling the AI server immediately.

Introduces simulation_context end-to-end: protocol docs, C++ WebSocket handling that forwards company/job context to STS (with ack), and STS per-interview_id briefs, turn history, and optional Nest fallback.

STS switches default LLM to OpenRouter (new client module, env-driven settings); Docker drops GPU reservation for STS by default. The web app polls the queue, shows a banner, and sends heartbeats while active.

Reviewed by Cursor Bugbot for commit ee7a0d0. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
talk-up-ai-dev Ready Ready Preview, Comment Jun 24, 2026 10:41am

@railway-app railway-app Bot temporarily deployed to talk-up-ai / TalkUp.AI-pr-142 June 20, 2026 08:35 Destroyed
@Andriamanampisoa Andriamanampisoa self-assigned this Jun 20, 2026
Comment thread server/src/modules/ai/ai.service.ts
Comment thread web/src/hooks/simulation/useInterviewSession.ts
Comment thread ai/microservices/speech-to-speech/engine/models.py
@railway-app

railway-app Bot commented Jun 20, 2026

Copy link
Copy Markdown

🚅 Deployed to the TalkUp.AI-pr-142 environment in talk-up-ai

Service Status Web Updated (UTC)
Backend 🚨 Crashed (View Logs) Jun 20, 2026 at 8:48 am

Comment thread ai/core/server/src/network/MicroservicesManager.cpp
Comment thread server/src/modules/simulation/simulation-promotion.service.ts Outdated
Comment thread server/src/modules/simulation/simulation.cron.ts
Comment thread web/src/routes/simulations.tsx Outdated
@railway-app railway-app Bot temporarily deployed to talk-up-ai / TalkUp.AI-pr-142 June 24, 2026 10:38 Destroyed
Comment thread web/src/routes/simulations.tsx
Comment thread server/src/modules/simulation/simulation-promotion.service.ts
Comment thread ai/microservices/speech-to-speech/engine/pipeline.py
@railway-app railway-app Bot temporarily deployed to talk-up-ai / TalkUp.AI-pr-142 June 24, 2026 10:41 Destroyed
@Andriamanampisoa Andriamanampisoa merged commit 6510738 into staging Jun 24, 2026
4 of 7 checks passed
@Andriamanampisoa Andriamanampisoa deleted the 186-implement-ai-multi-users branch June 24, 2026 10:42

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ee7a0d0. Configure here.

std::cout << "[MicroservicesManager] Ignoring STS message without request_id type="
<< msg_type << std::endl;
continue;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

STS warnings stall AI server

Medium Severity

process_sts_job now ignores every STS WebSocket message lacking request_id, but the STS TTS failure path still sends a warning without that field. After a synthesis error, the AI server keeps reading until the long stream timeout instead of completing the pending chunk callback.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ee7a0d0. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants