feat: Support additional create methods for agent and agent_graph (PR-2)#102
Open
jsonbailey wants to merge 10 commits intomainfrom
Open
feat: Support additional create methods for agent and agent_graph (PR-2)#102jsonbailey wants to merge 10 commits intomainfrom
jsonbailey wants to merge 10 commits intomainfrom
Conversation
dd194a8 to
fd13f66
Compare
fd13f66 to
4bef65c
Compare
Keep uv-based CI setup (drop poetry steps added in main), accept version bump to 0.16.1 from main while preserving x-release-please-version comment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat!: Rename AIProviderFactory → RunnerFactory feat!: Rename OpenAIProvider → OpenAIRunnerFactory import from ldai_openai.openai_runner_factory feat!: Rename LangChainProvider to LangChainRunnerFactory import from ldai_langchain.langchain_runner_factory feat: Add create_model(), create_agent(), create_agent_graph() to AIProvider ABC (non-abstract, default warns)
4bef65c to
e10be52
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
keelerm84
approved these changes
Mar 25, 2026
Resolve conflicts: - Makefiles (langchain, openai, server-ai): accept main's `uv sync --all-groups` over branch's `--group dev` to pick up the tooling update from main - client.py: keep branch's `RunnerFactory` import (the PR 1 rename) over main's stale `AIProviderFactory` import Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove module-level docstring strings from all modified files (not idiomatic Python) - Replace all "connector" terminology with "provider" in class docstrings, method docstrings, and log warning messages - Fix stale "ExecutorFactory" references in provider class docstrings → RunnerFactory - Add assert guards for Optional[BaseChatModel] before invocation in LangChainRunnerFactory to satisfy mypy - Fix trailing blank lines (W391) across modified files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| class OpenAIProvider(AIProvider): | ||
| """ | ||
| OpenAI implementation of AIProvider. | ||
| OpenAI provider for the LaunchDarkly AI SDK. |
There was a problem hiding this comment.
OpenAI class not renamed to match its file
Medium Severity
The file was renamed from openai_provider.py to openai_runner_factory.py, but the class inside is still OpenAIProvider. The LangChain counterpart was consistently renamed — file to langchain_runner_factory.py and class to LangChainRunnerFactory. This inconsistency between the file name and class name in the OpenAI package will confuse developers expecting a parallel naming convention.
Additional Locations (1)
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.


feat!: Rename AIProviderFactory → RunnerFactory, create_model/agent/agent_graph()
Note
Medium Risk
Changes the provider factory API and renames exported provider classes, which can break integrations and alter provider initialization behavior (notably OpenAI client/env handling).
Overview
Refactors provider construction around a new
RunnerFactory, replacingAIProviderFactory(now deleted) and updatingLDAIClientto useRunnerFactory.create_model()when creating chats and judges.AIProvideris redefined as a per-provider factory interface with new instance methodscreate_model,create_agent, andcreate_agent_graph(default no-op), and both the LangChain and OpenAI provider packages are updated to match: LangChain is renamed/exported asLangChainRunnerFactorywith an instancecreate_model, and OpenAI moves toopenai_runner_factory.pywith env-based client initialization and a non-asynccreate_modelthat reuses the client. Tests are updated accordingly.Written by Cursor Bugbot for commit 3baae96. This will update automatically on new commits. Configure here.