Skip to content

cascade simulator on live - #240

Open
raghavm243512 wants to merge 11 commits into
mainfrom
feat/cascade-user-simulator-live
Open

raghavm243512 wants to merge 11 commits into
mainfrom
feat/cascade-user-simulator-live

Conversation

@raghavm243512

@raghavm243512 raghavm243512 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Live version of #214

Not as big as it looks, half the lines are from the measurement script which doesn't interact with anything

key changes vs main:

  • .env.example added a missing property, exact format of configurations is still open to change
  • pyproject.toml version bumps needed for eventual support of openAI SDK 3, model maps were outdated and not working with gpt 6+
  • scripts added experiment script for measuring timing, not used in evals in any way so can ignore for easier review. Removed fixed name from text_only
  • llm.py new litellm conventions require using a semaphore because you cannot limit max_parallel requests in the same way. Instead of using its own semaphore, it now shows error 429. Keep old functionality (need to move this parameter though)
  • config.py need to extend this for interruptions, for now basic user config. No flexibility yet, to add later
  • preflight.py has some missing checks plus bug to fix for later
  • user_simulator/cascade just the cascade simulator, with streaming and other latency optimization (resampling) so it is fast when we add interruption

Model intelligence does not need to be tested since the new plan is to use a large model as primary mind, and smaller one for interruptions only, and these will be the same tier of model we already use in ElevenLabs.

Other language setting and prompt flows to user sim and voice ID is controllable, so will work for other languages

You may wonder why I use httpx over cartesiaSDK. I didn't see a way to stream without httpx. There is also some odd sample rate stuff, this actually knocks 50ms or so off the STT lag / net transcript time. Not really sure why

Updated LiteLLM changes: new litellm doesn't support that innate secondary semaphore. We were actually using this incorrectly. New changes: separate knobs just so concurrency doesn't break pipelining. Rather than reintroduce this parameter, we drop it in favor of uniformly applied concurrency constraints (max conversations bounds everything in conversation, and separate judge knob bounds judges). The most a model can ever concur is the sum of these if the models are the same (and user LLM if that's being used for all 3 slots, but that's the user's problem to deal with)

Preflight fix: ElevenLabs TTS was breaking preflight, adjusted conditions to check connection is error free rather than wait for the speaking to conclude

@raghavm243512
raghavm243512 force-pushed the feat/cascade-user-simulator-live branch 4 times, most recently from b8e549a to 6f7099b Compare October 19, 2026 17:31
Comment thread src/eva/utils/router.py Outdated
Comment thread src/eva/assistant/services/llm.py Outdated
Comment thread src/eva/utils/router.py Outdated
Comment thread src/eva/utils/router.py Outdated
Comment thread src/eva/utils/router.py Outdated
Comment thread src/eva/models/config.py Outdated
Comment thread src/eva/models/config.py Outdated
Comment thread src/eva/models/config.py
Comment thread tests/unit/user_simulator/test_cascade.py
Comment thread tests/unit/user_simulator/test_factory.py
Comment thread src/eva/user_simulator/cascade/simulator.py Outdated
Comment thread src/eva/user_simulator/cascade/tts.py
Comment thread src/eva/user_simulator/cascade/simulator.py Outdated
Comment thread src/eva/user_simulator/cascade/simulator.py Outdated
Comment thread src/eva/user_simulator/cascade/stt.py Outdated
Comment thread src/eva/user_simulator/cascade/simulator.py
@raghavm243512
raghavm243512 force-pushed the feat/cascade-user-simulator-live branch from 6f7099b to 9116269 Compare October 22, 2026 21:19
Comment thread src/eva/models/config.py Outdated
Comment thread .env.example Outdated
Comment thread .env.example Outdated
Comment thread scripts/run_text_only.py Outdated
Comment thread src/eva/orchestrator/preflight.py Outdated
Comment thread src/eva/models/config.py
Comment on lines 728 to +734
le=100,
description="Maximum number of concurrent conversations",
)
max_concurrent_judges: int = Field(
3,
ge=1,
le=100,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since we don't know our users' setups, I think the default value should be a conservative 1. A limit that's too high could lead to real issues, whereas a limit that's too low only risks being slower. And unless max_concurrent_conversations is very high (it's 1 by default), I think conversations are long enough for judge calls to occur in sequence within the time it takes to simulate the conversation.

Also, I know that's not new, but who are we to set a maximum of le=100? 😝 We can remove that.

Does that make sense?

Suggested change
le=100,
description="Maximum number of concurrent conversations",
)
max_concurrent_judges: int = Field(
3,
ge=1,
le=100,
description="Maximum number of concurrent conversations",
)
max_concurrent_judges: int = Field(
1,
ge=1,

so judges on different models (Claude, GPT, Gemini) don't wait on each other.
Comment thread docs/llm_configuration.md
]'
```
- `EVA_MAX_CONCURRENT_CONVERSATIONS`: conversations running at once (assistant and user simulator calls).
- `EVA_MAX_CONCURRENT_JUDGES`: judge LLM calls in flight at once to each judge model, across all metrics and

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For the record, I think this isn't quite "all metrics": when Gemini reports "no audio", speech fidelity falls back to the File Upload API and calls genai.Client directly (src/eva/metrics/speech_fidelity_base.py), so those calls skip this limit. They also skipped the router's default_max_parallel_requests on main, so it isn't a regression. Let's ignore it for now; I'm just noting it in case someone hits rate limits there later.

This branch has not been deployed

No deployments
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.

3 participants