Skip to content

Auto capability and Auto in the model picker - #1444

Open
hary73 wants to merge 4 commits into
hary/root-autofrom
hary/auto-capability
Open

hary73 wants to merge 4 commits into
hary/root-autofrom
hary/auto-capability

Conversation

@hary73

@hary73 hary73 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part of AGE-2853

Stacked on #1443 (auto model selection for the root thread), so this diff shows only the capability and the UI.

Changes

  • GET /api/v1/capabilities reports auto.enabled: true when model routing is on for the tenant and the user has a model in every routing category. Core adds canRouteEveryCategory.
  • The new-chat model picker offers Auto. It's only selectable when auto.enabled is true; otherwise it shows "Auto mode is not available for now".
  • The reasoning-effort control moves into a menu that lists the selected model's supported efforts.
  • listRoutableModels is shared by turn routing and the capability check.
  • OpenAPI documents and the TypeScript and Python SDKs are regenerated for the new AutoCapability type.

How was this tested?

  • Unit tests for the capabilities API and the draft model picker components.
  • Manually in the local UI against devtest.

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

Note

Medium Risk
Adds a required capabilities field and eligibility logic tied to model routing and catalog coverage; UI changes how model and reasoning effort are selected and reconciled in drafts.

Overview
GET /api/v1/capabilities now includes required auto.enabled, set when tenant model routing is on and the user's catalog covers every routing cluster (via new core helper canRouteEveryCategory). OpenAPI and the TS/Python SDKs pick up AutoCapability.

The new-chat model picker adds an Auto row at the top; it is only selectable when auto.enabled is true, otherwise it is disabled with a short hint. Selecting Auto commits a dedicated patch that clears all model params. Draft reconciliation treats auto like other capability-gated choices via keepsAutoModel.

Reasoning effort moves out of a separate composer control and into the model list: each eligible row shows an effort label and an edit menu (DraftReasoningEffortMenu), including a Default option that clears reasoningEffort. The builder/agent model editor passes no Auto option and no inline reasoning controls.

Reviewed by Cursor Bugbot for commit d3f57b8. Bugbot is set up for automated code reviews on this repo. Configure here.

}

export type DraftAutoModelOption = {
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.

* Whether Auto mode can be selected in the model picker. Enabled when model routing is on and the user has a model
* in every routing cluster; absent means Auto mode cannot be selected.
*/
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

🛠️ 2 Code quality issues detected

Low: typescript-best-practices/boolean-prop-naming Consistent naming for boolean props View rule
packages/assistant-ui-runtime/src/server/types.ts:608
Low: typescript-best-practices/boolean-prop-naming Consistent naming for boolean props View rule
packages/trueforge-ui/src/atoms/draft/DraftModelCatalogPanel.tsx:57

ℹ️ 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: d3f57b8 | Docs | Give us feedback!

* Whether Auto mode can be selected in the model picker. Enabled when model routing is on and the user has a model
* in every routing cluster; absent means Auto mode cannot be selected.
*/
auto?: { enabled: boolean };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why optional

}: {
tenant_id: string;
store: IModelProviderStore;
}): Promise<RoutableModel[]> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we still have RoutableModel type? Didn't we generalise and add all new attributes to Model type as discussed

tenant_id: string;
store: IModelProviderStore;
}): Promise<RoutableModel[]> {
const models = await store.listModels({ tenant_id, include_catalog_info: true });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need include_catalog_info param? Always include?

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

hary73 and others added 2 commits November 20, 2026 19:55
GET /api/v1/capabilities reports auto.enabled when model routing is on for the tenant and the user has a model in every routing cluster. The picker offers Auto, selectable only when that capability is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
…capabilities when listing models fails

The composer's model button shows the selected model's reasoning effort, as in the design. A failed model listing now fails the capabilities request, so clients keep their last known capabilities instead of dropping a selected Auto.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2efa923. Configure here.

hary73 and others added 2 commits November 20, 2026 20:14
…e empty state when Auto matches the search

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

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.

3 participants