Skip to content

feat(api-server): support per-request skip_background_review and skip_title opt-outs - #148809

Open
peterzhang987723 wants to merge 1 commit into
NousResearch:mainfrom
peterzhang987723:feat/api-server-per-request-turn-opt-outs
Open

peterzhang987723 wants to merge 1 commit into
NousResearch:mainfrom
peterzhang987723:feat/api-server-per-request-turn-opt-outs

Conversation

@peterzhang987723

Copy link
Copy Markdown

What does this PR do?

Adds per-request opt-outs (skip_background_review and skip_title) for API server requests so unattended workloads (scheduled extraction, batch jobs) can skip turn-start title generation and post-turn background memory/skill review without disabling those features globally on the profile.

Related Issue

Fixes #148702

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • gateway/platforms/api_server_request_options.py: add _extract_request_model_options and _apply_request_turn_opt_outs to decode skip_background_review and skip_title from the request body / model_options and apply them to AIAgent.
  • gateway/platforms/api_server.py: include skip_background_review and skip_title in _RUNTIME_AGENT_OVERRIDE_KEYS and route _request_agent_overrides / _create_agent through the new helpers (0 net line change in api_server.py).
  • agent/turn_context.py: check getattr(agent, "skip_title", False) in _maybe_title_session_at_turn_start.
  • tests/gateway/test_api_server_reasoning_ladder.py: add TestRequestTurnOptOuts.

How to Test

  1. pytest tests/gateway/test_api_server_reasoning_ladder.py -q
  2. python scripts/check

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • python scripts/check passes (the blocking lint and code-health checks CI runs)
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

@alt-glitch alt-glitch added area/sessions Session lifecycle, resume, persistence, history comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/webhook Webhook / API server tool/memory Memory tool and memory providers type/feature New feature or request labels Nov 5, 2026
@peterzhang987723

Copy link
Copy Markdown
Author

Could a maintainer approve and run the workflows for this fork PR? They are action_required and have not run.

…_title opt-outs

Allow API server requests to opt out of post-turn background review (memory/skill review) and turn-start auto-titling via request body or model_options (skip_background_review, skip_title) without disabling them globally on the profile.

Fixes NousResearch#148702
@peterzhang987723
peterzhang987723 force-pushed the feat/api-server-per-request-turn-opt-outs branch from dea64cc to 33d9b67 Compare November 15, 2026 15:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sessions Session lifecycle, resume, persistence, history comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have platform/webhook Webhook / API server tool/memory Memory tool and memory providers type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API server: per-request opt-out for title generation and background review

2 participants