Repository navigation
fix(combo): drop malformed custom models from the auto candidate pool - #16069
Merged
diegosouzapw merged 1 commit intoOct 9, 2026
Merged
Conversation
customModels is an operator-writable key_value JSON blob. Filter out rows that are not objects with a non-empty string id (and a string[] supportedEndpoints when present) before the endpoint policy runs, so a malformed row cannot abort the auto-combo expansion or push it back to the static catalogue.
Contributor
CI Coverage Report
Coverage artifact was not available for this run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-cut of #15803 onto the active cycle (v3.8.51 is shipped).
What
customModelsis an operator-writablekey_valueJSON blob.expandAutoComboCandidatePoolnow drops rows that are not objects with a non-empty stringid(and astring[]supportedEndpointswhen one is present) before the chat endpoint policy runs. Before this, a malformed row (null, a bare string,{ name }without an id) could abort the expansion or make the provider fall back to its static catalogue instead of the operator's visible custom chat model.Carried / dropped vs #15803
isValidAutoCustomModel/sanitizeAutoCustomModelsinopen-sse/services/combo/autoStrategy.ts, plus its regression test intests/unit/combo-auto-candidate-expansion.test.ts.release/v3.8.52via fix(combo): type the custom-model row in the auto pool check #15461.expandAutoComboCandidatePoolJSDoc, not between the JSDoc and the function, so the docblock stays attached to the function.Test evidence
node --import tsx/esm --test tests/unit/combo-auto-candidate-expansion.test.tsautoStrategy.ts: 9/10, 1 failed:ignores malformed custom rows while keeping chat models→AssertionError: only the well-formed visible custom chat model should be expandedprettier --check,eslint --suppressions-location config/quality/eslint-suppressions.jsonon the changed files,npm run typecheck:core,npm run check:open-sse-typecheck(0 errors) andnpm run typecheck:noimplicit:core(0 errors in autoStrategy.ts) → clean.