Skip to content

Tenant switch for Auto mode on the Models settings page - #1452

Draft
hary73 wants to merge 2 commits into
hary/auto-capabilityfrom
haryahuja/age-2854-tenant-settings
Draft

hary73 wants to merge 2 commits into
hary/auto-capabilityfrom
haryahuja/age-2854-tenant-settings

Conversation

@hary73

@hary73 hary73 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes AGE-2854 (the on/off switch only; decision model settings are not part of this PR)

Stacked on #1444 (Auto capability and the model picker), so this diff shows only the tenant switch.

Changes

  • The tenant configuration gets an auto: { enabled } switch, on by default, editable through PATCH /api/v1/settings/configuration like web search and memory. No migration: a stored row without it is filled with the default on read.
  • Turning it off turns off all model routing for the tenant: the picker drops Auto, auto specs are rejected (422), chats that already use Auto fail their next turn with "Auto mode is turned off for this tenant", and subagents run on their parent's model.
  • GET /api/v1/capabilities leaves auto out when model routing isn't set up for the tenant, and gives a reason when Auto is unavailable (switched off, or no model in some category). The picker shows that reason.
  • The Models settings page shows the switch. In TrueFoundry mode admins can now open the page when routing is set up; provider editing stays hidden there (manage_providers false). The new-chat "open settings when there are no models" check now uses manageProviders.
  • OpenAPI documents and the TypeScript and Python SDKs are regenerated.

ModelSettings.tsx is mostly re-indentation from wrapping the provider panel in a condition; hide whitespace to review it (25 lines of real change).

How was this tested?

  • New tests: configuration PATCH for auto, capabilities (no routing, switched off, no models), spec validation with the switch off, store contract seeding of auto, the Models page switch, and the picker's disabled Auto option with its reason.
  • Existing fixtures updated for the new switch and the per-turn configurationStore.

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, python/trueforge_sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

webSearchStore?: IWebSearchProviderStore;
tenantWebSearchEnabled?: boolean;
tenantMemoryEnabled?: boolean;
tenantAutoEnabled?: boolean;

@datadog-official datadog-official Bot Nov 20, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Low: Code Quality Violation

Prop name 'tenantAutoEnabled' is not prefixed with `is` or `has` (...read more)

Enforces a consistent naming pattern for boolean props to ensure that the variable is prefixed with either is or has (or the uppercase equivalent). Any prefix symbol (_, $, etc) is allowed.

Helpful? 👍/👎 View in Datadog  Leave us feedback  Documentation
🚩 Report as false positive. Flags the rule for review to improve detection accuracy.

undefined;
let resolveConfiguration: (value: {
webSearch: { enabled: boolean };
memory: { enabled: boolean };

@datadog-official datadog-official Bot Nov 20, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Low: Code Quality Violation

Prop name 'enabled' is not prefixed with `is` or `has` (...read more)

Enforces a consistent naming pattern for boolean props to ensure that the variable is prefixed with either is or has (or the uppercase equivalent). Any prefix symbol (_, $, etc) is allowed.

Helpful? 👍/👎 View in Datadog  Leave us feedback  Documentation
🚩 Report as false positive. Flags the rule for review to improve detection accuracy.

configuration,
}: {
auto: { enabled: boolean } | undefined;
manageProviders?: boolean;

@datadog-official datadog-official Bot Nov 20, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Low: Code Quality Violation

Prop name 'manageProviders' is not prefixed with `is` or `has` (...read more)

Enforces a consistent naming pattern for boolean props to ensure that the variable is prefixed with either is or has (or the uppercase equivalent). Any prefix symbol (_, $, etc) is allowed.

Helpful? 👍/👎 View in Datadog  Leave us feedback  Documentation
🚩 Report as false positive. Flags the rule for review to improve detection accuracy.

manageProviders = true,
configuration,
}: {
auto: { enabled: boolean } | undefined;

@datadog-official datadog-official Bot Nov 20, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Low: Code Quality Violation

Prop name 'enabled' is not prefixed with `is` or `has` (...read more)

Enforces a consistent naming pattern for boolean props to ensure that the variable is prefixed with either is or has (or the uppercase equivalent). Any prefix symbol (_, $, etc) is allowed.

Helpful? 👍/👎 View in Datadog  Leave us feedback  Documentation
🚩 Report as false positive. Flags the rule for review to improve detection accuracy.

let resolveConfiguration: (value: { webSearch: { enabled: boolean }; memory: { enabled: boolean } }) => void = () =>
undefined;
let resolveConfiguration: (value: {
webSearch: { enabled: boolean };

@datadog-official datadog-official Bot Nov 20, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Low: Code Quality Violation

Prop name 'enabled' is not prefixed with `is` or `has` (...read more)

Enforces a consistent naming pattern for boolean props to ensure that the variable is prefixed with either is or has (or the uppercase equivalent). Any prefix symbol (_, $, etc) is allowed.

Helpful? 👍/👎 View in Datadog  Leave us feedback  Documentation
🚩 Report as false positive. Flags the rule for review to improve detection accuracy.

let resolveConfiguration: (value: { webSearch: { enabled: boolean }; memory: { enabled: boolean } }) => void = () =>
undefined;
let resolveConfiguration: (value: {
webSearch: { enabled: boolean };

@datadog-official datadog-official Bot Nov 20, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Low: Code Quality Violation

Prop name 'enabled' is not prefixed with `is` or `has` (...read more)

Enforces a consistent naming pattern for boolean props to ensure that the variable is prefixed with either is or has (or the uppercase equivalent). Any prefix symbol (_, $, etc) is allowed.

Helpful? 👍/👎 View in Datadog  Leave us feedback  Documentation
🚩 Report as false positive. Flags the rule for review to improve detection accuracy.

undefined;
let resolveConfiguration: (value: {
webSearch: { enabled: boolean };
memory: { enabled: boolean };

@datadog-official datadog-official Bot Nov 20, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Low: Code Quality Violation

Prop name 'enabled' is not prefixed with `is` or `has` (...read more)

Enforces a consistent naming pattern for boolean props to ensure that the variable is prefixed with either is or has (or the uppercase equivalent). Any prefix symbol (_, $, etc) is allowed.

Helpful? 👍/👎 View in Datadog  Leave us feedback  Documentation
🚩 Report as false positive. Flags the rule for review to improve detection accuracy.

configurationStore: IConfigurationStore;
logger: Logger;
}): Promise<boolean> {
}): Promise<{ enabled: boolean; reason?: string } | undefined> {

@datadog-official datadog-official Bot Nov 20, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Low: Code Quality Violation

Prop name 'enabled' is not prefixed with `is` or `has` (...read more)

Enforces a consistent naming pattern for boolean props to ensure that the variable is prefixed with either is or has (or the uppercase equivalent). Any prefix symbol (_, $, etc) is allowed.

Helpful? 👍/👎 View in Datadog  Leave us feedback  Documentation
🚩 Report as false positive. Flags the rule for review to improve detection accuracy.

Comment thread packages/trueforge/src/apis/turns.ts Resolved
let resolveConfiguration: (value: {
webSearch: { enabled: boolean };
memory: { enabled: boolean };
auto: { enabled: boolean };

@datadog-official datadog-official Bot Nov 20, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Low: Code Quality Violation

Prop name 'enabled' is not prefixed with `is` or `has` (...read more)

Enforces a consistent naming pattern for boolean props to ensure that the variable is prefixed with either is or has (or the uppercase equivalent). Any prefix symbol (_, $, etc) is allowed.

Helpful? 👍/👎 View in Datadog  Leave us feedback  Documentation
🚩 Report as false positive. Flags the rule for review to improve detection accuracy.

@datadog-official

datadog-official Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Code Quality  Code Vulnerabilities  IaC  Library Vulnerabilities  Secrets

⚠️ Warnings

🛠️ 11 Code quality issues detected

Low: typescript-best-practices/boolean-prop-naming Consistent naming for boolean props View rule
packages/trueforge-ui/test/containers/SettingsBuilder/MemorySettings.test.tsx:187
Low: typescript-best-practices/boolean-prop-naming Consistent naming for boolean props View rule
packages/trueforge-ui/test/containers/SettingsBuilder/WebSearchSettings.test.tsx:235
Low: typescript-best-practices/boolean-prop-naming Consistent naming for boolean props View rule
packages/trueforge-ui/test/containers/SettingsBuilder/ModelSettings.test.tsx:168
View all

ℹ️ Info

No other issues found (see more)

🛡️ No new code vulnerabilities
📚 No new vulnerable libraries detected
🧱 No new Infrastructure as Code (IaC) issues
🔑 No new secrets detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7fc6d90 | Docs | Give us feedback!

@hary73
hary73 force-pushed the hary/auto-capability branch from 5bf4136 to 2efa923 Compare November 20, 2026 14:30
@hary73
hary73 force-pushed the haryahuja/age-2854-tenant-settings branch 2 times, most recently from ce9361e to d9c7391 Compare November 20, 2026 14:46
hary73 and others added 2 commits November 20, 2026 20:49
Turning it off turns off all model routing for the tenant: Auto leaves the picker, auto specs are rejected, chats using Auto fail their next turn with a clear error, and subagents run on their parent model. Capabilities leave auto out when routing isn't set up and give a reason when it is unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@hary73
hary73 force-pushed the haryahuja/age-2854-tenant-settings branch from d9c7391 to 7fc6d90 Compare November 20, 2026 15:22

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant