Custom models added through Model Library cannot configure reasoning effort

Author: libra0037Created Sep 8, 2026Updated Sep 28, 2026

Summary

The Model Library lets users add custom provider models, but the composer never shows the Reasoning section for a selected custom model — even on providers whose backend advertises supportsEffort: true (Claude, Codex, OpenCode). Unlike predefined models, custom model entries are merged into the catalog without any model-level metadata, so the UI treats them as having no effort levels.

There is also no way to define effort metadata when creating or editing a custom model. The add/edit form only accepts a display name and a model ID.

Steps to reproduce

  1. Use Claude, Codex, or OpenCode (Cursor intentionally does not support effort).
  2. Open the Model Library and add a custom model, e.g. name My Custom Model, ID my-custom-model.
  3. Select the custom model in the composer.
  4. Open the model/reasoning menu.

Expected: the Reasoning section appears and exposes the effort levels that this model accepts.

Actual: the Reasoning section is absent. Switching back to a predefined model shows it again.

Root cause

The custom-model pipeline carries only identity and display fields, never model metadata:

  • Database provider_models has only id, provider, model_id, model_name, sort_order, and timestamps — no effort metadata.
  • CustomProviderModelInput and CustomProviderModelRecord contain only id/model plus row identity.
  • The route parser parseCustomProviderModelPayload reads and returns only { model, id }, so even a future effort payload field would be discarded.
  • toCustomProviderModelOption in the provider service emits only value, label, recordId, and isCustom, so the merged catalog entry never carries effort.

On the frontend, getEffortOptionsForModel resolves the custom entry successfully, then returns option.effort?.values ?? []. Because the option exists, the code does not fall back to the provider-level effort list; that fallback only runs when the model cannot be found at all:

typescript
const option = getModelOption(targetProvider, model);
if (option) {
  return option.effort?.values ?? [];
}
return toProviderEffortOptions(FALLBACK_PROVIDER_EFFORT_VALUES[targetProvider] ?? []);

An empty effort-option array reaches ComposerModelMenu, which sets hasEffortSection to false and hides the Reasoning section.

Desired behavior

  • Allow custom models to declare the reasoning-effort levels they support (and optionally a default effort) when they are created or edited.
  • Return that metadata through the normal model catalog API, in the same shape used by predefined models (effort.values and optional effort.default).
  • The composer should then render only the declared effort levels for that custom model, with the existing Default sentinel.
  • Migrations must be safe for existing custom-model rows. Since no effort metadata existed before, existing rows should remain null rather than receiving guessed values.

Suggested implementation

  1. Extend the shared types so custom model input/records can carry optional effort metadata, matching the existing ProviderModelOption['effort'] shape.
  2. Add one or more nullable columns to provider_models (for example JSON text for effort_values plus effort_default, or a single metadata JSON column), following the existing idempotent addColumnToTableIfNotExists migration pattern in server/modules/database/migrations.ts.
  3. Update provider-models.ts CRUD to read and write the new metadata.
  4. Update parseCustomProviderModelPayload in provider.routes.ts to parse and validate effort metadata, and toCustomProviderModelOption to emit it into the catalog.
  5. Add a UI section in ModelLibraryPanel.tsx for selecting effort levels (and default), shown only when the selected provider supports effort.
  6. Ensure the model add/edit tests, database column assertions, and composer tests cover the new path.
  7. Decide and document the behavior when a custom model has no effort metadata. Two acceptable options: hide Reasoning as today, or show the provider-level fallback list with an explicit disclaimer. The issue should favor storing metadata so that custom models become first-class rather than silently falling back.

Files likely touched

  • server/modules/database/schema.ts
  • server/modules/database/migrations.ts
  • server/modules/database/repositories/provider-models.ts
  • server/shared/types.ts
  • server/modules/providers/services/provider-models.service.ts
  • server/modules/providers/provider.routes.ts
  • src/shared/types.ts
  • src/modules/chat/modals/ModelLibraryPanel.tsx

Related

  • #943 introduced reasoning-effort controls for predefined models.
  • #1095 introduced the customizable provider model library, but did not persist per-model effort metadata.

I searched existing issues and PRs for this problem and did not find an existing upstream issue or proposed fix.