Custom models added through Model Library cannot configure reasoning effort
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
- Use Claude, Codex, or OpenCode (Cursor intentionally does not support effort).
- Open the Model Library and add a custom model, e.g. name
My Custom Model, IDmy-custom-model. - Select the custom model in the composer.
- 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_modelshas onlyid,provider,model_id,model_name,sort_order, and timestamps — no effort metadata. CustomProviderModelInputandCustomProviderModelRecordcontain onlyid/modelplus row identity.- The route parser
parseCustomProviderModelPayloadreads and returns only{ model, id }, so even a futureeffortpayload field would be discarded. toCustomProviderModelOptionin the provider service emits onlyvalue,label,recordId, andisCustom, so the merged catalog entry never carrieseffort.
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:
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.valuesand optionaleffort.default). - The composer should then render only the declared effort levels for that custom model, with the existing
Defaultsentinel. - 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
- Extend the shared types so custom model input/records can carry optional effort metadata, matching the existing
ProviderModelOption['effort']shape. - Add one or more nullable columns to
provider_models(for example JSON text foreffort_valuespluseffort_default, or a single metadata JSON column), following the existing idempotentaddColumnToTableIfNotExistsmigration pattern inserver/modules/database/migrations.ts. - Update
provider-models.tsCRUD to read and write the new metadata. - Update
parseCustomProviderModelPayloadinprovider.routes.tsto parse and validate effort metadata, andtoCustomProviderModelOptionto emit it into the catalog. - Add a UI section in
ModelLibraryPanel.tsxfor selecting effort levels (and default), shown only when the selected provider supports effort. - Ensure the model add/edit tests, database column assertions, and composer tests cover the new path.
- 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.tsserver/modules/database/migrations.tsserver/modules/database/repositories/provider-models.tsserver/shared/types.tsserver/modules/providers/services/provider-models.service.tsserver/modules/providers/provider.routes.tssrc/shared/types.tssrc/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.
Source: siteboon/claudecodeui