Repository navigation
test(chat): run Chat's test set on a real model before it is offered, GPT, Gemini and DeepSeek added untested (W4-35) - #2038
Merged
Conversation
…uter calls off data collection (W4-34, 00469) - Settings › Chat gets Model providers: Anthropic (always on, Auto runs on it), OpenAI, Google and DeepSeek (off by default), each on or off for an Admin, logged in the Activity log. chat_settings.model_providers (00469) keeps the choices; a provider not chosen takes its default in the web. - A provider that is off has no model in the model menu, and the engine runs Auto in place of one of its models, for chats, agents and scheduled runs, with "Ran on Auto · Your Admin turned off this model's provider". - Chat's and the Agent's OpenRouter calls ask for providers that keep no data (provider.data_collection: "deny"); a DeepSeek model runs only on US or EU hosts, with no fallback. The API server's analysis calls are unchanged. - Help: help/settings/chat-rules.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… OpenRouter's list (W4-34) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…4-34) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… GPT, Gemini and DeepSeek added untested (W4-35) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tarting scenarios past a spend cap (W4-35) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ts US and EU hosts (W4-35) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…idates, the cheapest of each (W4-35) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s the Anthropic SDK elsewhere (W4-35) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…words it, and fail one that takes a side (W4-35) Co-Authored-By: Claude Opus 5.5 <[email protected]>
8 of 13 tasks
…ls don't predict" (W4-35) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…outer, and two passes before a model is offered (W4-35) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tool names out of answers (W4-35) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e app's detector reads it, and hear "a line telling" as the notice (W4-35) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…chat-model-providers Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Model providers Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…chat-model-evals Co-Authored-By: Claude Opus 5.5 <[email protected]>
gkhngyk
previously approved these changes
Nov 3, 2026
# Conflicts: # web/src/app/api/chat/models/route.test.ts # web/src/app/api/chat/models/route.ts # web/src/lib/chat/model-menu.ts
…s as off Auto on another provider's own key ran on that key's model even when an Admin turned its maker off in Settings > Chat (DeepSeek through OpenRouter, or OpenAI through an OpenAI or Azure key). resolveChatModels now maps the own key's model to its maker and stops the run with a clear error when that provider is off, rather than send the run there or move to Ansvisor's key by itself. A failed read of the provider choices now turns every provider that can be turned off off, instead of falling back to the defaults.
gkhngyk
previously approved these changes
Nov 3, 2026
This was referenced Nov 3, 2026
8 of 13 tasks
…roviders # Conflicts: # supabase/schema.sql # web/messages/en.json # web/src/lib/chat/engine.test.ts
…vals # Conflicts: # web/src/lib/chat/models.ts
…budget stand-in Main's engine now reads meteredAs from the budget module; the test set's mock replaced the whole module, so every scripted run failed. It now keeps the real module and stands in for reserveChatStep only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMenyNyxsr2Doq4CaQ3
cihan-gyk
dismissed
gkhngyk’s stale review
November 4, 2026 17:26
The merge-base changed after approval.
…providers # Conflicts: # supabase/schema.sql # web/src/lib/chat/schema.test.ts
cihan-gyk
dismissed
gkhngyk’s stale review
November 4, 2026 20:43
The merge-base changed after approval.
cihan-gyk
dismissed
gkhngyk’s stale review
November 5, 2026 07:45
The merge-base changed after approval.
cihan-gyk
dismissed
gkhngyk’s stale review
November 5, 2026 07:51
The merge-base changed after approval.
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
A model is offered in Chat's model menu only after it passes Chat's test set in a real run (owner decision, 2026-11-02). This PR adds that test set and the harness that runs it on a real model. It also lists the newest OpenAI, Google and DeepSeek models as untested candidates (Wave 4 plan, EK · W4-35).
The test set:
lib/chat/testing/model-eval.tshas the nine rows of CHAT-05's test set whose outcome depends on the model:Every scenario also checks for:
Each check is
mustorreview. A model passes when everymustcheck of every scenario passes.reviewchecks are for product review only. The rows the engine enforces whatever the model does (W1-22) stay inengine.test.ts.The harness:
lib/chat/model-eval.test.tsruns each scenario through the real engine and registry.get_plan_factsandfetch_pagerun as they are,fetch_pageon a stand-in page.Real run: only when
CHAT_MODEL_EVALis set; it is skipped in CI.engine-model.ts):ANTHROPIC_API_KEY), reading and writing in two phases;OPENROUTER_API_KEY), with W4-34's routing (data collection denied, DeepSeek only on US or EU hosts).web/.env.local, and are never printed. A model without its key is skipped.Candidates:
lib/chat/models.tslists seven more models withtested: false, so they are neither offered nor run. All take tools and none is deprecated in OpenRouter's catalog (2026-11-03):models.test.tsguards this.Opus 5.5 stays untested too. A model that passes gets
tested: truein a follow-up PR with its report.There is no user-visible change, so no Help article.
Stacked on #2036. Merged, not rebased.
Related issue
None. Chat Wave 4 plan, EK · W4-35.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
cd web && yarn vitest run src/lib/chat/model-eval.test.ts src/lib/chat/testing/model-eval.test.ts: 14 tests pass with no model calls, and the real-run block is skipped.Optional, real calls. One pass of the nine scenarios costs about $0.06–2.70 per model:
cd web && CHAT_MODEL_EVAL=anthropic/claude-opus-5.5 yarn vitest run src/lib/chat/model-eval.test.tsCHAT_MODEL_EVAL=untestedruns every candidate.CHAT_MODEL_EVAL_ONLY=greetingruns one scenario.CHAT_MODEL_EVAL_MAX_USD=5starts no scenario once the run has cost $5.env -u ANTHROPIC_BASE_URLfrom a shell that sets it for another tool (Claude Code does), or the SDK calls the wrong address.No migration. No new environment variables: it uses the existing
ANTHROPIC_API_KEYandOPENROUTER_API_KEY.Checklist
yarn lintpassesyarn typecheckpassesyarn format:checkpasseshelp/(or no user-visible change)CI passed on this branch (3a9b453), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/41534310577): schema is up to date; web
format:check, lint, typecheck, all tests andyarn buildpass; server lint,format:checkand all tests pass.🤖 Generated with Claude Code