A platform admin picks the chatbot model for each tenant and decides what happens when the chatbot is busy. This page shows how each of the ten PRs was checked, in merge order, so you can trust the work without reading the raw logs.
SP-893 · 30 Nov 2026
Status as of 30 Nov 2026
Last updated
30 Nov 2026, 16:16 UTC
Stage
In review. R1 and G are merged to main of the chatbot repo. R1 merged on 30 Nov 2026 at 15:37 UTC, and G at 16:14 UTC. The other eight PRs are open. This page does not claim that the chatbot is deployed, because no one has checked the deploy yet. No LMS change is on beta, and nothing is in a production tag.
Verdicts
Nine PRs passed an independent check. With a funded Gemini key, G and R2 are now proven live on Gemini too, so R2 is verified for all three providers. L8 is a small model-list change that its author tested. The independent Gemini check saw the same 404 that L8 deals with.
Heads
Checked with GitHub at the time above. After R1 merged, G and R2 were rebased. G then merged. GitHub moved R2's base to main and now reports a merge conflict, so R2 needs a rebase onto main before it can merge. Its head is unchanged. L8 has a new head. Every other LMS PR head is unchanged.
Rebases
A rebase that leaves a PR's own change identical (the same patch-id) keeps that PR's verdict.
Review gate
L4, L2 and L6 change what people see. The operator reviews their screenshots and videos before they merge.
All screenshots and videos come from local stacks with demo tenants and fake keys. The names are not real. The admin's name in the corner of the admin screens is covered. None of this was run on beta.
Why this exists
Today the chatbot answers every tenant with one model on the SkillPixel key. A tenant that brings its own key still runs its chatbot on the SkillPixel key. SP-893 lets a platform admin choose the chatbot model for each tenant from the existing model list. An own-key tenant's chat then runs on its own key. When the model hits a rate limit or the key fails, the learner sees one clear busy message: "The AI assistant is busy right now. Please try again in a few minutes."
What changed, in one picture
L2, L6
Admin picks
The platform admin picks a chatbot model and sets the busy hand-off switch.
→
L1
LMS stores it
The LMS saves only a choice the tenant can run, and clears it when the key setup changes.
→
L3
LMS sends it
Each learner message carries the model, plus the key for an own-key tenant.
→
R1, G, R2
Chatbot builds it
The chatbot builds that model for one request, with no fallback model and one retry.
→
L4
Learner sees
An answer, or the busy message. A switch decides whether a human then takes over.
L7 and L8 are separate. L7 keeps request values out of validation errors anywhere in the LMS backend. L8 retires Gemini 3.1 Pro from the model list and moves its tenants to Gemini 3.8 Flash.
How each PR was checked
Independent verifier. A separate agent, not the author, checked each PR head. Several PRs went through fix rounds. This page reports the last verdict.
Fail before, pass after. The new tests ran on the code before the fix and failed. Then they passed on the PR. This shows the tests catch the problem.
Live lanes. A lane is one scenario from the plan, run against real servers with real requests. Chatbot lanes used real OpenAI and Anthropic keys, and later a funded Gemini key. Bad-key lanes used fake keys.
Key scans. Every captured reply and log was searched for each key, its last 8 characters, and every 8-character piece of it.
Speed checks. Before and after, in alternating order, against a limit set in the plan.
When a model provider or a search service fails, the chatbot's reply and its logs name only the error type and status, for example "ModelAuthenticationError (status 401)". Provider error text can hold part of a key, so it no longer reaches replies, stream events, tool results or logs. Internal errors still log their stack frames, so engineers can trace them. Successful replies do not change.
Head
Verified at 76cd6fd. The head 1afcef8 is the same change, rebased onto main after its parent PR merged. Its patch is identical. The GitHub build check passed at 1afcef8. It was squash-merged to main on 30 Nov 2026 at 15:37 UTC, as commit 32fa077. Merging to main deploys the shared chatbot, but this page has not checked that deploy.
Tests
56 passed, 10 skipped. On the code before the fix, 14 of the 16 new tests failed. The other 2 cover paths that the earlier head had already fixed. All 16 pass on the PR.
Live lanes
Real chatbot servers ran with a fake key against the real OpenAI API, and a fake web-search key. Ten error paths were checked, including a document search inside a chat, an upload, a tool error and the history summary. Every path showed 0 key pieces in replies and logs, and internal errors kept their stack frames. Nine of the ten plan lanes passed: a normal chat equal to before, fake OpenAI and Anthropic keys, an unknown model, an upload, a missing tenant header, and five chats in a row. Lane 7 was not rerun because the fix does not touch that code.
Speed
The fix changes only error handling. The success path was timed at the earlier head with medians of 0.939 s before and 0.848 s after.
Media
None. This is a backend change.
G. The chatbot can run Gemini
Verified live on GeminiMerged to mainHead ddbbc7f · merge commit 60ea0e3 · lms-ragflow #15
Head
After R1 merged, G was rebased onto main, so its new head is ddbbc7f. Its own change is identical to the earlier head 57078db (same patch-id). The live Gemini check ran at 57078db, so its verdict carries over to the new head. The GitHub build check passes on the PR. G was squash-merged to main on 30 Nov 2026 at 16:14 UTC, as commit 60ea0e3. This page has not checked the chatbot deploy.
For users
The chatbot can answer with a Gemini model. A short failure, such as a rate limit, a timeout or a server error, is retried once on the same model and key. Gemini errors go through the R1 redaction, so a reply shows only the error type and status.
Tests
63 passed, 10 skipped, after G was first rebased onto the R1 fix. The root reran the suite at the new head ddbbc7f and got the same 63 passed and 10 skipped. A local Gemini stand-in server checked tool calls, the replay of Gemini's thought signatures, usage counts, the retry limit and error redaction. The sources record no fail-before run for G.
Live lanes
The operator provided a funded Gemini key, and an independent verifier ran real Gemini chats. All nine plan lanes passed:
a tool call and its answer on Gemini Flash, and the same on Gemini 3.1 Pro under its preview name (L8 now retires this model);
the final answer after the iteration limit;
a history summary that reaches Gemini as part of the conversation;
a streamed answer that ends cleanly;
a fake key, rejected with 0 key pieces in the reply or the log;
usage records with all token counts and a model name the LMS can price;
an answer in Vietnamese;
five chats in a row.
A retry check also passed: one forced server error, then a real answer on the same model and key. A scan of all replies and logs found 0 key pieces.
Speed
The median Gemini Flash chat took 2.70 s, against an 8 s limit. Both runs passed every speed limit.
R2. The chatbot builds the model for each request
Verified for OpenAI, Anthropic and GeminiHead 3833eae · lms-ragflow #16
For users
The LMS can name the model for each chat and send an own-key tenant's key. The chatbot builds that model for that one request.
A chat on a tenant key uses only what the request sent. It never falls back to a SkillPixel key or a SkillPixel provider setting.
There is no fallback model. A failed call is tried at most once more, on the same model and key.
A failed chat reports one of three codes: rate_limited, key_rejected or failed. The LMS turns the first two into the busy message.
Each usage record says whether the tenant's key or the SkillPixel key paid. Document search always runs on the SkillPixel key.
A chat that names no model works as it does today.
A failed history summary no longer erases the earlier messages. The next message tries again.
Head
Three verifier rounds. The first found no blocker but listed fixes. The second found gaps, which were fixed. The third passed the code at d179243. The head 08a695e then changed only the wording of the docs and the PR description. After G was rebased, R2 was rebased onto it, so its new head is 3833eae. Its own change is identical to 08a695e (same patch-id), so the verdict carries over. The live Gemini lanes also ran at 08a695e. G has since been squash-merged, and GitHub moved R2's base to main. GitHub now reports a merge conflict, because R2's branch still carries G's original commits. R2 needs a rebase onto main before it can merge. If that rebase keeps R2's own change identical, its verdict carries.
Tests
124 passed, 10 skipped. The root reran the suite at the new head 3833eae and got the same result. Fail before, pass after, in each round. All 27 new model-choice tests failed on the parent branch. 33 tests added or changed in round 1 failed on the round 1 head. The 5 tests added in round 2 failed on the round 2 head. All pass on the PR.
Live lanes
Four real servers, with real OpenAI and Anthropic keys and fake keys.
A chat with no model matched the code before the change.
Claude on the SkillPixel key, and OpenAI on a tenant key with document search, both answered. The chat ran on the tenant key and the search ran on the SkillPixel key.
Fake tenant keys gave key_rejected with no usage recorded. Eleven malformed requests were refused before any model call.
Ten rounds of mixed chats at the same time: 40 of 40 replies used only their own model and key.
Streams cut in the middle of a call left nothing open. Twenty tenant chats in a row left no extra connections.
Key scans: 0 pieces in 4 server logs and over 120 replies in round 1, 0 in 114 replies in the next round, and 0 in the final round.
Gemini, with a funded key. A managed Gemini chat ran on the SkillPixel key. A tenant Gemini chat ran on the tenant key and found the indexed document. A fake tenant key gave key_rejected with 0 key pieces. Usage records carried the right key source.
Ten rounds of Claude, Gemini and OpenAI chats at the same time: 30 of 30 replies named only their own model.
On Gemini, streams cut after the first answer left nothing open, and twenty tenant chats in a row left no extra connections.
Speed
A chat with no model: 1.5% and 2.7% faster than before in two runs, which is inside the noise. A chat on a tenant key: 56 ms and 99 ms slower than the default, against a 400 ms limit. The cost is one new secure connection per request, about 96 ms. On Gemini, a chat on a tenant key also stayed inside the 400 ms limit. The Gemini default-path median moved +24.1% in one run and -23.4% in the next. The changes point in opposite directions, so the root reads them as noise in Gemini's own response time, not a slowdown in the code.
The LMS backend stores one chatbot model per tenant, chosen from the existing managed-model list. The settings response lists every option and whether this tenant can run it. The backend refuses an unknown model or one the tenant cannot run. When a change to the key mode, provider, address or key means the tenant can no longer run its choice, the LMS clears the choice and the chatbot goes back to its default model. GPT-5.6 Luna was added as a beta option.
Head
Verified at 78a1da0. The head 69c7c66 is the same change, rebased onto main. Its patch is identical.
Tests
3,720 unit tests passed and 1 skipped. 813 database tests in the 16 related files passed on PostgreSQL 17. Three new database tests failed before the fix and pass after it. The type-check count did not change (2,558 before and after). GitHub CI passed lint, unit tests, database tests, the migration check and review.
Live lanes
A real API on a real PostgreSQL database. Lanes 2 to 10 passed at the earlier head, and lanes 2, 3, 6 and 8 again at the verified head. The clearing rule was driven through both the platform-admin and the tenant-admin routes. Five pairs of writes at the same time kept both settings every time. A scan of 85 API responses, the server log, the stored settings and the audit rows found 0 key matches.
Speed
Reading the settings got 12.8 ms slower, against a 20 ms limit. This was measured at the earlier head. The fix adds one more decrypt on each read, which the root accepted.
The learner sees "The AI assistant is busy right now. Please try again in a few minutes." In Vietnamese it reads "Trợ lý AI đang bận. Vui lòng thử lại sau vài phút." The chat header stays "Online". The next message shows the typing state and then a normal AI answer. Before the fix, a busy message switched the header to "Human agent" and the next message got no typing state. The existing fallback message still hands the chat to a human, as the backend expects.
Tests
14 of 14 chat hook tests and 24 of 24 chat tests pass. With the old hook code, the 2 busy tests fail with "expected true to be false". On Windows, the full frontend suite has failures in 4 files that fail the same way on trunk. GitHub CI "Frontend Lint & Build" passes.
Live lanes
The real LMS frontend ran in Vite, with a mocked API, websocket and sign-in. Lanes 1, 2, 3, 5, 6, 7 and 9 passed, over both polling and the websocket. The real backend sending the busy message is proven in L3, not here.
Speed
The chat bundle grew from 20.72 kB to 20.78 kB.
Media
Four close-ups of the chat window and a 31 s video, below.
English. The busy message appears and the header still says "Online".Vietnamese. The same message in the learner's language.Retry. The learner asks again and gets a normal AI answer.Before the fix. The header wrongly showed "Human agent".
L4 review video, 31 s, no sound. The learner opens the chat, asks a question and gets the busy message. Then the learner asks again, sees "Typing..." and gets the answer.
On a tenant's AI settings page, platform admins get a "Chatbot model" picker with its own Save button. Options the tenant cannot run are greyed out with a reason. If a saved choice can no longer run, its reason shows under the picker and the admin can clear it back to Default.
Tests
238 tests passed. TypeScript, lint and the production build passed. The new picker test fails on L1 and on each earlier commit of this PR, and 6 of 6 pass on the head. The regenerated API client is byte for byte the same as the committed one.
Live lanes
Ten lanes and two extra checks against a real backend: default, save Claude, reload, clear, own-key Anthropic options, archived tenant, save with the backend stopped, dark mode, keyboard only, a saved choice that cannot run, and OpenRouter options. Users who are not platform admins get 401 or 403. The rest of the page is the same as before.
Speed
Median time until the page is ready: 798 ms before and 728 ms after, against a limit of 100 ms slower.
Media
Two screenshots and a 41 s video, below.
A managed demo tenant. Claude Sonnet 5.5 is saved as the chatbot model. The toast says "Chatbot model saved".An own-key demo tenant on Anthropic. Only the three Claude models can be picked. The others say "Incompatible with the tenant's own key".
L2 review video, 41 s, no sound. The admin opens the picker, saves Claude Sonnet 5.5, then clears it back to Default. The grey box in the lower left covers the admin's name.
On every learner message the LMS checks the tenant's saved choice. A managed tenant with no choice sends the same request as today. A managed choice sends the model name. An own-key tenant also sends its own key.
When the chatbot reports a rate limit or a rejected key, or the choice cannot run, the learner sees the busy message.
The busy hand-off switch is on by default. Then a human agent also takes the chat. When it is off, the AI keeps the chat and the learner can try again.
Every chatbot call is priced, whichever key it used, and each record says which key ran it. A school's usage report shows the cost of its own-key chats on their own line. Only the amount SkillPixel charges the school leaves out own-key chats, because the school pays its provider directly. That charging rule was already on main.
Admins cannot save a choice or a key that can never run. A key with a line break, tab, control character or non-English character inside it is refused.
When this deploys, existing own-key tenants move from the SkillPixel key to their own key. A key without credit then starts showing the busy message.
Head
Three fix rounds. The last round changed one line that trims key edges, plus tests.
Tests
3,772 unit tests and 315 database tests passed. In the last round, the 10 new key-edge tests failed on the earlier head, and 27 of 27 selected tests pass on the head. In an earlier round, 20 tests failed on the code before the fix, and all 30 passed after it. The type-check count equals L1. GitHub CI passed.
Live lanes
The real LMS ran with a stub chatbot, and with the real chatbot on real OpenAI and Anthropic keys.
A tenant with no setting sent the same request as before.
Managed Claude ran on the SkillPixel key. For own-key OpenAI and Anthropic tenants, the key sent matched the stored key.
Rate limits and rejected keys showed the busy message with the switch on and off. The stub saw 6 calls for 3 messages: one retry each, on the tenant key only.
Ten chats at the same time across three tenants each used the right model and key. A model change between two messages took effect on the next message.
The current chatbot, without R2, still answers on today's model. An own-key chat was recorded as a tenant-key row with a positive estimated cost. The school's statement and usage report came out right.
The LMS logs had 0 key hits. In the last round, 60 of 60 bad keys were refused with no key text in the reply or log and nothing stored.
A rate limit from a real provider was not triggered. The stub's rate limit stands in for it.
Speed
Extra time before the chatbot call for a tenant with no setting: 10.8 ms in a first run of 10, 7.9 ms in a second run of 30, and 9.3 ms over all 40. The limit is 10 ms. The first run was just over it. The root accepted the result, because the cost is one settings read next to a model call of about 1 s. The own-key path was not slower than trunk.
A new "Busy chatbot" section has the switch "When the chatbot is busy, hand the chat to a human". It is on by default and saves when clicked. The chatbot model picker now shows the real reason from the backend, in English and Vietnamese, for each option the tenant cannot run.
Tests
246 tests passed. The new switch test fails on L2, and 4 of 4 pass on the head. Four deliberate code breaks each made exactly one test fail. Four of the five new reason tests failed on the earlier head. The fifth passes on both, because its test data happens to fit the old guess. The regenerated API client is byte for byte the same as the committed one.
Live lanes
Ten lanes against a real backend: default on, save off, reload, save on, archived tenant, backend stopped, dark mode, keyboard only, and refusal for users who are not platform admins. On the final head, all 60 option states across three tenants and two languages matched the backend. The switch saved off, survived a reload, and saved on.
Speed
Median time until the page is ready: 702 ms on L2 and 751 ms on L6, against a limit of 100 ms slower. The switch adds no request.
Media
Four screenshots and a 35 s video, below.
A managed demo tenant. The two OpenRouter options say "Needs the tenant's own key". The busy switch is on.A saved OpenRouter choice that cannot run. The reason shows under the picker.The switch turned off. The toast says "Busy chats now stay with the AI" and covers the switch for a few seconds.An archived demo tenant. The switch is disabled with the tooltip "The tenant is archived, so this is read-only."
L6 review video, 35 s, no sound. The admin turns the switch off, reloads, and turns it on again. The video is low frame rate, so the off state is hard to see after the reload. The grey box in the lower left covers the admin's name.
When the LMS backend refuses a request because a field is wrong, the reply and the log no longer repeat the values that were sent. Field names, error types and the validator's reason stay, so admins and learners still see why a save failed. If a reason would contain the value that was sent, the reply says "Invalid request input" instead. WebSocket errors follow the same rule. It can merge at any time.
Tests
3,706 unit tests passed. 2,912 database tests passed and 1 failed. That test needs a database the test setup does not create, and it fails the same way on main. The 10 new tests fail on main, 3 of them fail on the earlier head, and all 10 pass on the head. The type-check count went from 2,558 on main to 2,556. GitHub CI passed.
Live lanes
76 probes with unique test values across 5 routes, in both the development and the beta log format: 0 hits in replies and logs at the head. The same probes found the values on main. Of 41 errors from 23 real requests, 36 kept the same message as main, and 2 changed on purpose.
Speed
The new filtering runs only on a refused request. Across all 564 routes it took a median of 0.046 ms.
L8. Retired Gemini 3.1 Pro tenants move to Gemini 3.8 Flash
Author-checkedIndependent of the stackHead 3fdd152 · lms-platform #826
For users
The managed model list sent the name "gemini-3.1-pro" to Google, and Google answers 404 to that name. So a managed tenant set to Gemini 3.1 Pro could not run any AI feature. The bug was already on main.
Gemini 3.1 Pro is outdated, so the operator chose to retire it instead of calling its old preview name. It is removed from the managed model list, and no picker offers it any more.
A tenant that saved Gemini 3.1 Pro now runs on Gemini 3.8 Flash, and its settings page shows Gemini 3.8 Flash selected. A save of the old choice stores Gemini 3.8 Flash.
The price entry for Gemini 3.1 Pro stays, so old usage rows keep their cost.
It can merge at any time.
Head
The head moved from 3e012b8, which called the preview name, to 3fdd152, which retires the model. This is a different change, so nothing carries over from the earlier head.
Tests
The author ran the unit tests for the model list, pricing and tenant settings, including a new test for the retired model, and the lint check. All passed. The database tests for the managed-model endpoints were not run locally. The PR has the label that makes CI run them. When this page was updated, GitHub CI at 3fdd152 had passed the change detection, the migration check and the review-gate evaluation. The backend tests, the database tests, the review and the merge gate were still running. No separate verifier report exists for L8.
Live proof
Real calls on 30 Nov 2026 with a funded key: "gemini-3.1-pro" returned 404, and "gemini-3.8-flash" returned 200. The independent Gemini verifier saw the same 404 on its own.
Screenshots
The L2 and L6 screenshots on this page were taken before L8, so their model lists still show Gemini 3.1 Pro.
Where the sources disagree
These are differences between a PR description and its verifier. None changes a verdict.
PR
PR description says
Verifier measured
R1
5 key matches in the old log
4. The count depends on the run.
R2
Tenant-key chat 45 ms slower than the default. Default 3.9% faster than before. An earlier owner report said 97 ms.
56 ms and 99 ms slower. Default 1.5% and 2.7% faster. All inside the 400 ms limit.
R2
An older lane summary said all 12 lanes passed.
At that time the Gemini lane had run offline only, and the stream cuts came at a different point than the plan asked for. Later rounds gave live credit lane by lane. The live Gemini lanes passed later, with a funded key.
L1
3,721 unit tests passed. 258 database tests.
3,720 passed and 1 skipped. 813 database tests, a wider selection.
L4
30 Windows test failures in 3 files
31 failures in 4 files. The extra one passes on its own. Both say the same files fail on trunk.
L2
1,179 ms before and 1,152 ms after. Rebased onto L1 at 78a1da0.
798 ms and 728 ms against the current L1. L2 now sits on 69c7c66, with the same patch.
L3
Extra time 4.6 ms (8.8 ms to 13.4 ms)
10.8 ms, 7.9 ms and 9.3 ms pooled, against a 10 ms limit
L3
223 database tests
315 database tests at the final head, a wider selection
L6
737 ms on L2 and 710 ms on L6
702 ms on L2 and 751 ms on L6. Both are inside the 100 ms limit.
L7
2,913 database tests passed
2,912 passed and 1 failed for the environment reason above
What is still open
Merge order. Chatbot first: R1 and G are merged, then R2. R2 needs a rebase onto main first, because GitHub reports a conflict after G's squash merge. LMS: L1, L4, L2, L3, L6. L3 merges only after R2 is live on the chatbot host and L4 is merged. Deploy platform-admin (L6) after the L3 backend. L7 and L8 can merge at any time.
Gemini key on the chatbot. Before any managed tenant picks a Gemini chatbot model, the operator sets the SkillPixel Gemini API key on the shared chatbot service. Without it, the chatbot refuses the request before it calls any model, and the learner gets the fallback message instead of an answer.
Media review. The operator reviews the screenshots and videos of L4, L2 and L6 before they merge.
Real rate limit. No real provider rate limit was triggered. A stand-in server produced it.
Beta. Nothing is on beta yet, and no one has walked through it there.
Small UI points. In L2, keyboard focus goes back to the top of the page after a save. In L6, the toast covers the switch for about 4 seconds.
Follow-ups. 4 follow-ups are tracked in the PR descriptions.