feat(models): support capabilities for custom models - #7124
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Reviewed the changed web UI (ProviderModelsSection.tsx, ProviderInstanceCard.tsx) against the shared primitive system. The new capability editor correctly reuses Popover, Checkbox, Switch, Select, DraftInput and Button primitives rather than reconstructing them, and Tailwind stays owner-local. Two consistency issues in the new custom-model controls popover are noted inline.
Posted via Macroscope — UI Consistency
ApprovabilityVerdict: Needs human review This PR introduces a significant new feature for configuring custom model capabilities, including new UI components (CustomModelCapabilitiesEditor, CustomModelCapabilityCopyPicker), new schema fields across 5 providers, and runtime behavior changes propagating configuration to provider adapters. New features with this scope warrant human review. You can customize Macroscope's approvability policy. Learn more. |
Co-authored-by: Bilal Bakr <62337003+Bil0000@users.noreply.github.com>
Co-authored-by: Bilal Bakr <62337003+Bil0000@users.noreply.github.com>
There was a problem hiding this comment.
One finding on the new custom-model capabilities editor. The previously flagged DraftInput sizing and the missing gear tooltip are both resolved.
Posted via Macroscope — UI Consistency
Co-authored-by: Bilal Bakr <62337003+Bil0000@users.noreply.github.com>
Co-authored-by: Bilal Bakr <62337003+Bil0000@users.noreply.github.com>
Co-authored-by: Bilal Bakr <62337003+Bil0000@users.noreply.github.com>
There was a problem hiding this comment.
Two UI consistency issues in ProviderModelsSection.tsx that were fixed in later commits but re-introduced by the revert: remove unrelated custom model changes commit (head tree is back to the original state). Details inline.
Also still open from an earlier review: the Default SelectTrigger size="compact" inherits w-full min-w-36 (9rem) from the default variant while its grid track is 8rem, so the trigger overflows its column — worth neutralizing the min-width at the call site (e.g. className="min-w-0") as other size="compact" call sites do.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
One finding: on/off controls authored with a free-form ID are dropped by the composer's visibility gate, so the new editor can declare a control the composer never shows.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
One finding in the new custom-model capability editor: edits reorder the declared controls, which moves the edited card to the bottom of the popover and changes control order in the composer.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
Reviewed the changed web UI (ProviderModelsSection.tsx, ProviderInstanceCard.tsx, TraitsPicker.tsx, providerModels.ts) against the shared primitive contracts. One finding: the new tag-style "Values" field re-creates the Input/ComboboxChips container styling but drops its focus treatment, so the inline text input has no visible focus indicator.
Posted via Macroscope — UI Consistency
|
Superseded by merged #807 (custom model names and option descriptors). |
Problem
Custom model inference worked, but custom catalog entries had empty
ModelCapabilities. Thecomposer therefore hid reasoning, speed, context-window, and other model controls. Claude 1M
context also required putting
[1m]in the visible custom model ID.Root cause
Provider settings stored custom model IDs only. Per-model descriptors never reached the provider
catalog, composer,
ModelSelection, or adapter request path.Design
Custom models can now store optional
ModelCapabilitieskeyed by their exact model ID.ProviderOptionDescriptorandModelSelectioncontracts.and set boolean defaults.
harness instance.
An unknown descriptor can still be saved and shown. It has no request effect until that provider
adapter supports its ID. This keeps the UI generic without sending guessed provider options.
Provider behavior
effort,fastMode,contextWindow,thinkingreasoningEffort,serviceTierreasoning,contextWindow,fastMode,thinkingvariant,agentClaude
fastModeis Claude Code's native setting. It is not OpenAI priority service. Codex speeduses native
serviceTier; T3 Code does not translate one into the other.Cursor applies a selection only when the active CLI reports a matching ACP configuration option.
OpenCode has no speed-tier or context-window request option today. Grok has no model-option request
path today.
Copying preserves exact descriptor IDs and values. It does not translate meanings between
providers. The target adapter still decides whether a copied descriptor can affect its request.
Context-window handling
For Claude only, selecting a declared
contextWindow=1madds Claude Code's[1m]selector to therequest model ID. The stored and visible custom model ID stays exact. No model gets a global 1M
assumption.
Backward compatibility
UI
Custom-model rows now have a generic control editor. Select values render as tags. Space, comma,
Enter, or blur commits a value; clicking a tag selects its default; and its remove action deletes
it. Stored exact values, including values containing commas, remain intact.
Copy controlsopens a harness picker, a model picker, and a checkbox list. Users can copy one ormore controls. Duplicate harness names include their instance ID. The model being edited is the
only excluded source. Catalog refreshes clear stale checked controls before a copy can occur.
Manual edits and copied controls stay local until Save is selected. Closing the editor without Save
cancels them. The boolean control heading is
ON / OFF.Web and desktop share this UI. Composer option rendering and selection storage continue to use the
existing shared descriptor system used by web, desktop, and mobile.
The author will attach an updated UI video separately.
Tests
Coverage includes:
ON / OFFexclusion, duplicate harness labels, and catalog-refresh selection safety
Latest copy-controls verification:
vp test run apps/web/src/components/settings/ProviderModelsSection.test.ts apps/web/src/components/settings/ProviderInstanceCard.test.ts apps/web/src/components/settings/ProviderSettingsPanel.environment.test.tsx— 32 passedvpr -F @t3tools/web typecheck— passedvp lint ... --deny-warnings— passedvp fmt ... --check— passedgit diff --check— passedEarlier branch-wide verification before the UI-only follow-ups:
vp check— 0 errors; 12 existing repository warningsvpr typecheck— passed across 15 packagesvp run test— 8,215 passed; 7 skippedvp run lint:mobile— passed; optional native linters are unavailable on this Linux hostvp run release:smoke— passedBuilt with GPT-5.6-sol through the Codex harness.
Note
Add per-custom-model capability configuration across all providers
CustomModelCapabilitiesschema (a map of model slug →ModelCapabilities) added to settings for all providers (Claude, Codex, Cursor, Grok, OpenCode).providerModelsFromSettings) now assign declared per-model capabilities from this map instead of always using a shared fallback.[1m]suffix), effort normalization, context window selection, andfastMode/thinkingboolean settings.customModelsto thread/turn start requests.ProviderModelsSection, with controls to add/edit select and boolean descriptors, copy from other providers, and reconcile capabilities when the custom model list changes.applyServerSettingsPatchnow replacescustomModelCapabilitiesmaps instead of deep-merging them, preventing stale keys from persisting across updates.TraitsPickervisibility now responds to any declared descriptor, not just the hardcoded built-in controls.customModelCapabilitiespatch semantics changed to replace-not-merge; existing tooling that relies on partial-patch behavior to update individual model capabilities will overwrite the entire map.Macroscope summarized fd65aee.