Repository navigation
fix(discovery): name the invalid model row and the static-list workaround - #7990
Merged
Merged
Conversation
…ound Invalid upstream model rows still reject the whole discovery response, but the diagnostic now names the failing row index and reason without its contents. The catalog warning and the connection-test error explain that a new provider's selection stays pending and point at a static models list with liveModels: false.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 27 minutes. View limit details
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 |
Contributor
|
✅ Deterministic PR hygiene checks passed. |
Owner
Author
|
Maintainer integration into
|
Merged
3 tasks done
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.
Summary
A gateway's
/v1/modelsreturned 29 rows whose firstidwas an empty string (#7910). Discovery rejects the whole list on any invalid row, which is an intended contract, but the operator only sawunexpected shape/malformed 2xx data, while a newly added provider's model selection stayed pending and its models stayed hidden.Acceptance rules are unchanged. For generic OpenAI-style
/modelsenvelopes the discovery result now carries a safe diagnostic naming the failing row index and reason (for examplerow 0 has an empty id) without echoing row contents. The catalog warning and the management connection-test error append it and explain that a newly added API-key provider's selection can stay pending while discovery fails (login connections have no pending selection), pointing at a staticmodelslist withliveModels: falsefor gateways that publish invalid rows.structure/providers-and-adapters.mdrecords the diagnostic.Closes #7910
Verification
Bun 1.4.4; focused because the shared host is under load (AGENTS.md resource exception; breadth left to PR CI).
src/changes reverted,bun test tests/providers/provider-model-discovery-contract.test.ts tests/oauth/anthropic2-discovery-ownership.test.ts→ 4 fail (row index/reason missing from the discovery result, catalog warning and connection-test error); with them, pass.bun test tests/providers/provider-model-discovery-contract.test.ts tests/oauth/anthropic2-discovery-ownership.test.ts tests/providers/provider-live-models.test.ts tests/providers/initial-model-selection.test.ts→ 107 pass / 0 fail.bun run typecheck(2,248 files, 0 errors),bun run structure:check,bun run privacy:scanpass.src/server/management/provider-routes.tsgrows by one line to 1,992 (2,000 default).bun run test:changedand the full suite (host at critical load); PR CI covers them.Checklist