feat(client): add list_providers() — closes provider-listing parity gap#164
Merged
saurabhjain1592 merged 2 commits intomainfrom Apr 28, 2026
Merged
feat(client): add list_providers() — closes provider-listing parity gap#164saurabhjain1592 merged 2 commits intomainfrom
saurabhjain1592 merged 2 commits intomainfrom
Conversation
Merged
9 tasks
saurabhjain1592
added a commit
that referenced
this pull request
Apr 28, 2026
…tion, defensive health (#165) Three review-driven fixes on the just-shipped list_providers() (PR #164): 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 so the SDK matches the platform's LLMProviderResource schema. 2. Pagination: GET /api/v1/llm-providers is paginated (server-side cap 100, default 20). list_providers() ignored that and would silently truncate results in any deployment with more than 20 providers. Added: - list_providers(page=, page_size=) — single page, list-shaped return - list_providers_paged(...) — single page, returns LLMProviderListResponse with pagination metadata - list_all_providers(...) — walks every page (page_size=100 default) 3. Defensive health parsing: a single malformed `health` snapshot on one provider would raise ValidationError out of pydantic and crash the entire list call. Wrapped the per-provider health construction in try/except and set health=None for the bad row, with a debug warning. 6 regression tests pin the new behavior, including the empty-string edge case in min_sdk_version_for("python") (no upgrade warning fires). Both async and sync entry points; types re-exported from `axonflow` (LLMProviderListResponse, PaginationMeta).
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
Adds `client.list_providers()` to the Python SDK, closing the parity gap with the Java SDK (which has had the listing capability for some time) and with the platform's `GET /api/v1/llm-providers` endpoint. Surfaced by the Phase 1 quality-freeze sweep against `examples/llm-routing/e2e-tests/python` — the example was silently swallowing `AttributeError` when the method didn't exist.
What changed
Test plan
Out of scope (separate PRs)