Skip to content

fix: preserve explicit model capability overrides#3779

Open
hedssaz wants to merge 2 commits into
chatboxai:mainfrom
hedssaz:fix/model-capability-overrides
Open

fix: preserve explicit model capability overrides#3779
hedssaz wants to merge 2 commits into
chatboxai:mainfrom
hedssaz:fix/model-capability-overrides

Conversation

@hedssaz

@hedssaz hedssaz commented Jul 1, 2026

Copy link
Copy Markdown

Summary

  • Preserve user-edited model capabilities only when the model is explicitly marked with capabilitiesOverride
  • Preserve user-edited context window and max output token limits only when explicit numeric overrides are set
  • Keep registry metadata as the default source for capabilities, context window, and max output
  • Avoid writing registry-enriched display models back into provider settings during add/edit/delete/fetch flows
  • Add shared and renderer registry enrichment tests with fixed fixtures
  • Document the override precedence

Notes

This is a forward-looking fix. Existing saved model configs that already contain capabilities, context window, or max output values but do not have explicit override flags will continue to follow registry defaults until the user edits them again. This avoids treating every saved registry-enriched model list as a permanent override.

Clearing a manual context window or max output value removes that override and returns the model to registry defaults when registry metadata exists.

Tests

  • node node_modules/vitest/vitest.mjs run src/shared/model-registry/enrich.test.ts src/renderer/packages/model-registry/enrich.test.ts src/renderer/packages/model-registry/index.test.ts src/renderer/packages/model-registry/fetch.test.ts src/shared/providers/index.contract.test.ts
  • node node_modules/@biomejs/biome/bin/biome check docs/technical/ai-providers.md src/renderer/modals/ModelEdit.tsx src/renderer/packages/model-registry/enrich.ts src/renderer/packages/model-registry/enrich.test.ts src/renderer/routes/settings/provider/$providerId.tsx src/shared/model-registry/enrich.ts src/shared/model-registry/enrich.test.ts src/shared/providers/index.ts src/shared/types/settings.ts
  • /Users/hedssaz/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node node_modules/electron-vite/bin/electron-vite.js build

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1a3a0955-8858-4a24-801f-4af85cf386d1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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