fix(client): close review gaps on listLLMProviders — full shape, pagination, encoding#148
Merged
Merged
Conversation
…nation, encoding Six review-driven fixes on the just-shipped listLLMProviders (PR #145): 1. Wire-shape: LLMProvider was silently dropping endpoint, model, region, rate_limit, timeout_seconds, and settings — every provider config the SDK couldn't introspect. Surfaced all six fields. enabled/priority/ weight/hasApiKey are now boxed (Boolean/Integer) so a missing JSON value is distinguishable from explicit false/0. 2. Pagination: GET /api/v1/llm-providers is paginated (server cap 100, default 20). The 2-arg listLLMProviders ignored that and would silently truncate results in any deployment with >20 providers. Added: - listLLMProviders(type, enabled, page, pageSize) — single page - listLLMProvidersPaged(...) — single page + LLMProviderListResponse (with PaginationMeta) - listAllLLMProviders(type, enabled[, pageSize]) — walks every page 3. URL encoding: query string is now built with HttpUrl.Builder instead of manual StringBuilder concat. Reserved chars in `type` filter (e.g. "&") are now properly URL-encoded. 4. Duplicate @JsonProperty: removed the redundant annotation on LLMProviderHealth.getLastChecked() — the constructor parameter annotation is sufficient. 5. Boxed booleans: LLMProvider.getEnabled() / getHasApiKey() return Boolean (nullable) so callers can distinguish "explicitly false" from "field omitted by older platform". Convenience isEnabled() / hasApiKey() return primitive boolean (false on null). 6. New types: LLMProviderListResponse, PaginationMeta in types/ package. 7 new regression tests in AxonFlowTest cover: full-shape round-trip, pagination metadata, multi-page walk, combined filters (type+enabled), URL encoding for reserved chars, null health field, omitted-enabled boxed-Boolean behaviour. 163 total tests pass.
d9bf7bd to
e53e6fc
Compare
4 tasks
saurabhjain1592
added a commit
that referenced
this pull request
Apr 28, 2026
…imitive shape (#151) Code-review finding on PR #148: the new 13-arg boxed constructor replaced the public 7-arg primitive shape, and getPriority() / getWeight() changed from `int` to `Integer`. That's a real breaking change in a PR framed as additive — pre-existing callers either fail to compile (constructor) or now see nullable return values where they expected primitives (accessors). This PR preserves source compatibility while keeping the boxed storage that the wire-shape contract needs: 1. Add a 7-arg primitive constructor that delegates to the new 13-arg one with nulls for the post-PR-#148 optional fields. Marked @deprecated to nudge new callers toward the boxed form. 2. getPriority() and getWeight() return primitive `int` again (null-safe-unbox to 0). Boxed access is via the new getPriorityBoxed() / getWeightBoxed() methods. 3. getEnabled() (which was BRAND NEW in PR #148, returning Boolean) is renamed to getEnabledBoxed() so the JavaBeans-style name doesn't lure callers into `boolean e = p.getEnabled()` and an NPE on null. Pre-PR-#148 had no getEnabled() so this rename has no consumers. 4. Same Boxed-suffix pattern applied to getHasApiKey → getHasApiKeyBoxed for symmetry; primitive `boolean hasApiKey()` was already there from before #148. Two new regression tests pin the source-compat shape: - llmProviderLegacyConstructorPreservesSourceCompat — exercises the 7-arg primitive constructor and confirms primitive-returning accessors round-trip correctly. - llmProviderPrimitiveAccessorsNullSafe — confirms primitive accessors null-safe-unbox to 0 / false when the boxed field is null (which is what Jackson produces when the JSON field is omitted). Existing test that asserted on `p.getEnabled()` updated to `p.getEnabledBoxed()` to match the new naming. Wire-shape baseline refreshed — the renamed getter is not part of the wire contract (Jackson reads via constructor), but the validator records SDK class shape and noticed the rename. No spec drift.
saurabhjain1592
added a commit
that referenced
this pull request
Apr 28, 2026
…ernal entry + scrub PR ref Cleanup pass on the Java SDK [Unreleased] section ahead of release tagging. - Rename [Unreleased] → [6.2.0] - 2026-04-28. Minor bump (new listLLMProviders + LLMProvider source-compat restoration). - Add release header description aligned with prior version sections. - Remove the pom.xml skipUnitTests entry — pure CI plumbing, violates feedback_changelog_no_internal_entries.md. - Scrub the LLMProvider entry: drop the "review-driven follow-up to PR #148" meta-narrative and the internal PR-number reference, keep the user-facing facts (constructor + return-type restoration, boxed accessor names). Aligns with feedback_no_internal_refs_changelog.md. - Tighten the LLMProvider entry to one paragraph in the prior-section tone. - Keep an empty [Unreleased] heading per Keep-a-Changelog convention. No code changes.
saurabhjain1592
added a commit
that referenced
this pull request
Apr 28, 2026
…ernal entry + scrub PR ref (#153) Cleanup pass on the Java SDK [Unreleased] section ahead of release tagging. - Rename [Unreleased] → [6.2.0] - 2026-04-28. Minor bump (new listLLMProviders + LLMProvider source-compat restoration). - Add release header description aligned with prior version sections. - Remove the pom.xml skipUnitTests entry — pure CI plumbing, violates feedback_changelog_no_internal_entries.md. - Scrub the LLMProvider entry: drop the "review-driven follow-up to PR #148" meta-narrative and the internal PR-number reference, keep the user-facing facts (constructor + return-type restoration, boxed accessor names). Aligns with feedback_no_internal_refs_changelog.md. - Tighten the LLMProvider entry to one paragraph in the prior-section tone. - Keep an empty [Unreleased] heading per Keep-a-Changelog convention. No code changes.
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
Six review-driven fixes on the just-shipped `listLLMProviders` (PR #145). All flagged by the post-merge deep code review.
What changed
New types
Test plan
New tests in AxonFlowTest
Cross-SDK note
Sibling PRs landing the same fixes: axonflow-sdk-python#165, axonflow-sdk-go#142, axonflow-sdk-typescript#200.