Repository navigation
fix: connect providers with complete bounded catalogs - #1822
Merged
Merged
Conversation
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.
Connecting ai& failed even though its model endpoint returned valid JSON: the shared connection probe read only four KiB of a 6,920-byte catalog, then parsed that incomplete document as an unanswered service. Successful GET /models probes now read the complete catalog under discovery's existing shared 16 MiB bound and reject oversized responses rather than accepting a truncated prefix. Error and one-token probe response limits, timeouts, fallback policy remain unchanged.
Regression coverage drives the actual connection path with a 6,920-byte/13-model catalog and proves all IDs survive without a completion probe. Boundary cases cover just below, exactly at and above the cap, including a valid prefix with extra bytes; malformed JSON, interrupted reads, pre-cancelled requests and existing profile preservation remain checked. Matching manual and PERF documentation carries the same behavior and bound.
Validation on reviewed source33750210c004dcef32d82a18a1f0059c4df2cd8a: baseline regression fails as expected; focused tests, required exact-base make pr-ready with fresh catalog/config suites and make build pass; independent implementation review found no blocking findings. The repaired real binary connected successfully and cached all13models. The earlier reply/title attempt received provider HTTP402 insufficient credits and is preserved. The final-head same-model bounded retry returned exactly AIAND_ACCEPTANCE_OK and exited0; built-in connection and the13model live catalog passed. The normal automatic title request received HTTP200 but was canceled during headless shutdown, so no completed-title claim is made. The reply reports11216input/25output tokens; no billed-dollar receipt is available. No request/response bodies are retained.
This PR is ready for maintainer review and merge. Its actual-number #1822 entry is included at final head1fb7cfe011642650f59152c288665bf3f2a042a0; one new well-formed entry (32total), final exact-base local gate/build and independent final-entry review passed. Existing roll-up #1821 stays intact until this repair is merged, then must include the repair's numbered entry and be revalidated before any exact-SHA Full/staging promotion. No merge or staging action is part of this PR publication.