fix: make assistant E2E tests model-agnostic and upgrade to qwen3#498
Merged
fix: make assistant E2E tests model-agnostic and upgrade to qwen3#498
Conversation
The assistant E2E tests were flaky because they asserted on specific
LLM output patterns (regex for sequential numbers, greeting with
username). This breaks with models that have thinking mode (qwen3)
or different output formatting.
Changes:
- Replace two flaky tests with a single deterministic arithmetic
test ("What is 1 + 1?" → check response contains "2")
- Increase beforeAll warmup timeout from 30s to 120s — qwen3 with
thinking mode takes ~40s for first inference on CI runners
- Upgrade E2E model from qwen2.5:1.5b to qwen3:1.7b in workflow
and all source file defaults
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the assistant E2E testing setup to be less sensitive to model-specific output formatting and switches the default E2E Ollama model to qwen3:1.7b, aligning local defaults, runtime defaults (E2E mode), and CI configuration.
Changes:
- Replaces two output-pattern-based assistant E2E tests with a single arithmetic-based assertion.
- Extends assistant E2E warmup timeout to accommodate slower first inference on CI.
- Updates default E2E model to
qwen3:1.7bacross Playwright config, API route E2E default, and GitHub Actions workflow (including cache key).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/e2e/assistant.spec.ts |
Consolidates flaky assistant tests into a single arithmetic check and adjusts warmup behavior/timeouts. |
src/app/api/chat/route.ts |
Updates the default E2E Ollama model ID used when USE_E2E_MODEL=true. |
playwright.config.mts |
Updates Playwright webServer env default E2E_MODEL_NAME to qwen3:1.7b. |
.github/workflows/e2e.yml |
Switches CI E2E model pull + env to qwen3:1.7b and updates the Ollama cache key. |
Collaborator
Author
|
security fix on #497 |
- Use testInfo.setTimeout in beforeAll with biome-ignore for the
required empty destructuring (Playwright 1.58 does not support
the { timeout } option on beforeAll)
- Scope the /\b2\b/ assertion to the assistant sidebar
(data-side="right") to avoid false positives from unrelated page
content like pagination or counts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
samuv
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
beforeAllwarmup timeout from 30s to 120s — qwen3:1.7b with thinking mode takes ~40s for first inference on CI runnersqwen2.5:1.5btoqwen3:1.7bin workflow and all source file defaultsRoot cause
The previous tests asserted on specific LLM output patterns:
/(hello|hi|hey|greetings).*username/i— expected the model to greet with a specific username/\b1\s+2\s+3\b/— expected sequential numbers separated by whitespaceThese patterns break with models that have thinking mode (qwen3 prepends
<think>...</think>blocks) or different output formatting. Additionally,test.slow()triples test timeouts but notbeforeAllhooks, so the 30s default was too short for qwen3 model loading.Changes
tests/e2e/assistant.spec.tsbeforeAlltimeoutplaywright.config.mtsqwen2.5:1.5b→qwen3:1.7bsrc/app/api/chat/route.tsqwen2.5:1.5b→qwen3:1.7b.github/workflows/e2e.ymlTest plan
🤖 Generated with Claude Code