Repository navigation
feat: add experimental self-hosted Laya classifier - #12
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ead6cfe34
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Add a `laya` provider for a user-run laya-serve (System One API). Laya gets its own short question set sized for the English checkpoint's 512-token input: neutral A/B context labels and one model-agnostic effort question. Its answers normalize into the same Classification as Jev's, and the policy is unchanged. - Read Laya's calibrated answer_confidence, not its entropy-based confidence field. - Use plain fetch with no retries or redirects, and keep response bodies out of errors. - Default to http://127.0.0.1:8000 and the english model. A key is optional on loopback; any other host requires HTTPS and a key. - Offer Laya in init; doctor accepts a keyless local server. - Remove LAYA_API_KEY from native CLI environments via one shared list of classifier secret variables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Explain how to run laya-serve on macOS and Linux and connect it through init. Cover the key and transport rules, Laya's shorter question set and confidence field, and its unevaluated routing quality. Update privacy, README support lists, the contributor source map, and the changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Note that laya-serve must stay running while Switchboard is in use, what happens when it is unreachable, and where Laya documents running it in the background. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Laya gives each question up to 192 tokens and the task the rest of its 512-token input, silently cutting longer tasks. Switchboard now sends at most 700 characters (about 2.4 characters per token on paths and dense code with Laya's tokenizer) and marks a longer task as lacking context, so it takes the uncertain fallback instead of routing on its beginning. The response-size limit ran only after response.text() buffered the whole body. The body is now read incrementally and cancelled once it passes the limit, and an oversized Content-Length is rejected before reading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ruban-24
force-pushed
the
feat/laya-classifier
branch
from
September 27, 2026 09:55
acb4f41 to
11d45f3
Compare
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.
Add an experimental
layaclassifier provider for a user-run Layalaya-serveserver (System One API). Task text goes only to that server. The routing policy is unchanged.A/Blabels, and one model-agnostic effort question. Answers normalize into the same classification as Jev's.answer_confidence, not its entropy-basedconfidencefield.http://127.0.0.1:8000and theenglishmodel. A key is optional on loopback; any other host requires HTTPS and a key.switchboard init;doctoraccepts a keyless local server.LAYA_API_KEYis removed from native CLI environments through one shared list of classifier secret variables.Experimental: routing quality has not been evaluated against Jev. In early synthetic checks Laya's confidence stayed below the default
0.70thresholds, so routine tasks were raised to the standard tier. The docs state this.Rebased onto
mainafter #9 and #10; the Laya provider appears in the config menu's classifier connection step.Validation: all 311 tests passed on this branch rebased onto
main(after #9 and #10);npm run test:packagepassed type checking, build, isolated global installation, npx execution, initialization, and policy validation. Checked by hand against a livelaya-serve0.3.20: setup without a key, routing (confidence below 0.70 raised to the standard tier), the long-task fallback, and the classifier-unavailable fallback when the server is unreachable.🤖 Generated with Claude Code