Repository navigation
feat(llm): add 11 LLM providers (NVIDIA NIM, watsonx.ai, Snowflake Cortex, DeepInfra, Nebius, Baseten, Upstage, Reka, Hyperbolic, FriendliAI, Clarifai) - #941
Merged
AmitoVrito merged 2 commits intoAug 29, 2026
Conversation
Add eight OpenAI-compatible providers (DeepInfra, Nebius AI Studio, Baseten, Upstage Solar, Reka, Hyperbolic, FriendliAI, Clarifai) reusing the lazy AsyncOpenAI client pattern, plus three bespoke native async REST providers with provider-specific auth: NVIDIA NIM (hosted and self-hosted), IBM watsonx.ai (IAM token exchange), and Snowflake Cortex (PAT with token-type header). - Register all providers in the factory and package/top-level lazy exports - Add provider extras and lockfile metadata (openai>=1.40 / httpx>=0.27) - Add streaming/SSE, usage accounting, tool-call normalization, top_p forwarding, custom endpoints, and async client lifecycle (aclose) on BaseLLM - Update README provider list and comparison matrix
- respx HTTP contracts for the eight OpenAI-compatible adapters (auth, custom base URLs, SSE streaming, usage tracking, tool normalization) - Bespoke auth/request/SSE/tool-call tests for NVIDIA NIM, watsonx.ai, and Snowflake Cortex, including top_p forwarding, cumulative usage, and client lifecycle (aclose / async context manager) - Factory/export contract tests for all 11 providers - Opt-in live smoke tests gated by SYNAPSEKIT_RUN_LIVE_LLM_TESTS
AmitoVrito
added a commit
that referenced
this pull request
Aug 29, 2026
The eight AsyncOpenAI-based providers added in #941 built their client without passing config.timeout, so a configured per-request timeout was silently dropped (LLMConfig.timeout documents that it applies to providers that build their own client). Forward it when set, leaving the SDK default in place when it is None. Co-authored-by: Dhruv Garg <[email protected]>
AmitoVrito
added a commit
that referenced
this pull request
Aug 29, 2026
Co-authored-by: Dhruv Garg <[email protected]>
AmitoVrito
added a commit
that referenced
this pull request
Aug 29, 2026
Eight OpenAI-compatible adapters (DeepInfra, Nebius, Baseten, Upstage, Reka, Hyperbolic, FriendliAI, Clarifai) plus three bespoke native-async REST integrations (NVIDIA NIM, IBM watsonx.ai, Snowflake Cortex). Post-merge review fixed the watsonx streaming endpoint (closes #942), config.timeout forwarding, IAM token refresh margin, and unguarded tool-arg json.loads. Co-authored-by: Dhruv Garg <[email protected]>
Collaborator
|
Merged into I folded in four small post-merge fixes during review:
All four are separate atomic commits crediting you as co-author. Full suite green (5162 passed). Closes #887. |
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 the 11 LLM providers requested in #887 — eight OpenAI-compatible adapters and three bespoke native async REST integrations.
OpenAI-compatible (lazy
AsyncOpenAIclient, custom base URLs, streaming + tool calls):DeepInfra, Nebius AI Studio, Baseten, Upstage Solar, Reka, Hyperbolic, FriendliAI, Clarifai
Bespoke (native
httpx.AsyncClient, provider-specific auth):integrate.api.nvidia.com) and self-hosted/unauthenticated deploymentstool_choice_optiontool callingX-Snowflake-Authorization-Token-Typeheader, documented/api/v2/cortex/v1/chat/completionsendpointAcceptance mapping (#887)
_factory+ top-level lazy exports; extras (nvidia-nim,watsonx,snowflake-cortex,deepinfra,nebius,baseten,upstage,reka,hyperbolic,friendli,clarifai) + lazy importsAlso:
BaseLLM.aclose()/ async context manager so lazily-created clients release connection pools; cumulative usage accounting;top_pforwarded on all providers.Verification (local, pre-push)
pytest tests/llm— 804 passed, 27 skipped (opt-in live tests)ruff check/ruff format --check— cleanmypy— no issues (578 files)deptry src/— no issuesuv lock --check— consistentCloses #887