Document selectable Auto approval classifier model for Deep Agents Code - #5271
Merged
Conversation
Add docs for the new --auto-classifier-model flag and related configuration options introduced in deepagents#5205. - approval-modes.mdx: new 'Select a classifier model' section under 'How Auto works', covering all four config sources (TUI, flag, env var, config.toml), fail-closed error behavior, and the prompt-injection security tradeoff - cli-reference.mdx: add --auto-classifier-model to the flag table - config-file.mdx: document [models].auto_classifier key with a link to the full precedence description in approval-modes Fixes DOC-1474
langsmith-fleet
Bot
requested review from
Mason Daugherty (mdrxy) and
Naomi Pentrel (npentrel)
August 3, 2026 21:13
|
|
||
| By default, the Auto classifier uses the same model as the main agent. You can point it at a different (typically cheaper and faster) model to reduce cost and latency during Auto review without affecting the model used for your actual tasks. | ||
|
|
||
| Set the classifier model through any of these sources, listed from highest to lowest precedence: |
There was a problem hiding this comment.
should we put this in an accordion
Remove spaces around em dashes on two lines that Vale flagged as LangChain.DashesSpaces errors.
Comment on lines
+187
to
+188
| The TUI displays which model is reviewing when Auto turns on and inside `/auto model` output — including models set by env var or `config.toml`. | ||
|
|
There was a problem hiding this comment.
Suggested change
| The TUI displays which model is reviewing when Auto turns on and inside `/auto model` output — including models set by env var or `config.toml`. |
| A weaker classifier means weaker review. A less capable model may be more susceptible to prompt injection in the content it reads. This tradeoff is documented in the Deep Agents Code threat model (T14). | ||
| </Warning> | ||
|
|
||
| **Fail-closed on errors.** If the configured classifier model cannot be built — because of a bad spec, missing credentials, or a missing provider package — the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. |
There was a problem hiding this comment.
Suggested change
| **Fail-closed on errors.** If the configured classifier model cannot be built — because of a bad spec, missing credentials, or a missing provider package — the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. | |
| If the configured classifier model cannot be used — the calls it would have reviewed are **denied** and do not fall back to the main model. After repeated failures, Auto stops and shows you the normal approval UI. The error message names the model so you can identify and fix the problem. |
Mason Daugherty (mdrxy)
marked this pull request as ready for review
August 4, 2026 14:10
Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
Naomi Pentrel (npentrel)
approved these changes
Aug 4, 2026
- TUI command tab: lead with /auto model interactive picker as the happy path; direct provider:model spec is still shown but secondary - Remove spec-validation note from TUI tab - Remove 'errors in non-interactive and ACP modes' from CLI flag tab - Remove project .env security rationale from Warning - Remove fail-closed on errors paragraph - Switch example model to openai:gpt-5.6-luna throughout
Contributor
|
Mintlify preview branch generated: Site preview: https://langchain-5e9cc07a-preview-docsau-1785868033-7465a0d.mintlify.site Important Preview links may take a few minutes to start working while the deployment finishes. Changed documentation pages (preview deep links): |
Mason Daugherty (mdrxy)
added a commit
that referenced
this pull request
Aug 4, 2026
…5295) Fixes DOC-1486 Rebases on top of #5271 (selectable classifier model docs) per review feedback. **Set base to `docs/auto-classifier-model` once #5271 merges, or retarget this PR to that branch.** ## Summary - `config-file.mdx` — new **Auto classifier timeout** section after "Startup approval mode", with config.toml and env var tabs. Recommends switching to a faster classifier model (via `[models].auto_classifier`) before raising the deadline. - `configuration.mdx` — new `DEEPAGENTS_CODE_AUTO_CLASSIFIER_TIMEOUT` env var entry in the reference table, with a note to prefer changing the classifier model first. ## Links - Linear: https://linear.app/langchain/issue/DOC-1486/document-configurable-auto-classifier-review-timeout-for-deep-agents - Slack: https://langchain.slack.com/archives/C09G1T60QV9/p1785859372092309 - Source PR: langchain-ai/deepagents#5302 - Depends on: #5271 ## Verification - `make lint_prose` run; one pre-existing `LangChain.DashesSpaces` error in `config-file.mdx` (the `ModelProfile` line) exists on the base branch and is not introduced by this PR. ## Reviewers Requested review from: @mdrxy, @npentrel --------- Co-authored-by: Docs Writer Bot <brace@langchain.dev> Co-authored-by: Mason Daugherty <mason@langchain.dev> Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
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.
Fixes DOC-1474
Summary
approval-modes.mdx: adds a new "Select a classifier model" section under "How Auto works", documenting all four configuration sources (/auto model,--auto-classifier-model,DEEPAGENTS_CODE_AUTO_CLASSIFIER_MODEL,[models].auto_classifier), precedence order, fail-closed error behavior, the project.envrestriction, and the prompt-injection security tradeoff (T14)cli-reference.mdx: adds--auto-classifier-modelto the command-line flag tableconfig-file.mdx: documents the[models].auto_classifierkey in the[models]table with a link to the full precedence descriptionLinks
Verification
Not run; docs-only content change.
Reviewers
Requested review from: Mason Daugherty (@mdrxy), Naomi Pentrel (@npentrel)