Repository navigation
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization 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 |
|
Superseded by #18210, which contains the same commit and diff under the renamed |
|
Closing in favor of #18210. |
### Summary Clear the paired tenant model ID when a model selection is explicitly cleared in a whitelisted API request. Replaces #18205. Co-authored-by: Jin Hai <[email protected]>
Summary
Clear the paired tenant model ID when a model selection is explicitly cleared in a whitelisted API request.
Chat settings currently merge the fetched chat object into the update payload. Clearing the rerank selector sets
rerank_idto an empty string, but the previously fetchedtenant_rerank_idremains in the payload. The backend then resolves that stale tenant model ID back into the rerank model name, so reranking stays enabled after the user saves the cleared selection.This change makes
addTenantParamsset the pairedtenant_*_idtonullwhen the corresponding model field is explicitly"",null, orundefined. Requests that omit the model field continue to preserve an existing tenant model ID.User impact
Users can clear the rerank model in chat settings without the previous tenant-scoped model ID silently restoring it. The same synchronization rule applies to other model selectors handled by
addTenantParams.Validation
npm test -- --runInBand src/utils/tests/llm-util.test.ts(20 tests passed)npx oxlint src/utils/llm-util.ts src/utils/tests/llm-util.test.tsnpx oxfmt --check src/utils/llm-util.ts src/utils/tests/llm-util.test.tsgit diff --check