Skip to content

Document selectable Auto approval classifier model for Deep Agents Code - #5271

Merged
Mason Daugherty (mdrxy) merged 11 commits into
mainfrom
docs/auto-classifier-model
Aug 4, 2026
Merged

Document selectable Auto approval classifier model for Deep Agents Code#5271
Mason Daugherty (mdrxy) merged 11 commits into
mainfrom
docs/auto-classifier-model

Conversation

@langsmith-fleet

Copy link
Copy Markdown
Contributor

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 .env restriction, and the prompt-injection security tradeoff (T14)
  • cli-reference.mdx: adds --auto-classifier-model to the command-line flag table
  • config-file.mdx: documents the [models].auto_classifier key in the [models] table with a link to the full precedence description

Links

Verification

Not run; docs-only content change.

Reviewers

Requested review from: Mason Daugherty (@mdrxy), Naomi Pentrel (@npentrel)

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
@github-actions github-actions Bot added external User is not a member of langchain-ai deepagents For docs changes to Deep Agents oss labels Aug 3, 2026
Comment thread src/oss/deepagents/code/config-file.mdx Outdated

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:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we put this in an accordion

Remove spaces around em dashes on two lines that Vale flagged
as LangChain.DashesSpaces errors.
Comment thread src/oss/deepagents/code/approval-modes.mdx Outdated
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`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mdrxy
Mason Daugherty (mdrxy) marked this pull request as ready for review August 4, 2026 14:10
Comment thread src/oss/deepagents/code/cli-reference.mdx Outdated
Comment thread src/oss/deepagents/code/approval-modes.mdx Outdated
- 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
Comment thread src/oss/deepagents/code/approval-modes.mdx Outdated
@mdrxy
Mason Daugherty (mdrxy) merged commit 147df1f into main Aug 4, 2026
25 checks passed
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Mintlify preview branch generated: preview-docsau-1785868033-7465a0d

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):

@mdrxy
Mason Daugherty (mdrxy) deleted the docs/auto-classifier-model branch August 4, 2026 18:27
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepagents For docs changes to Deep Agents external User is not a member of langchain-ai oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants