Add Multi-SDK Runtime Support (OpenAI, Anthropic)#10
Add Multi-SDK Runtime Support (OpenAI, Anthropic)#10naman-ranka wants to merge 4 commits intofeature/robust-synth-sim-guardrailsfrom
Conversation
- Created `src/runtime/` with `BaseRuntimeAdapter`, `LangGraphAdapter`, `OpenAIAdapter`, `AnthropicAdapter`, and `RuntimeFactory`. - Refactored `src/agents/architect.py` to use `RuntimeFactory`. - Updated `api.py` to support new runtimes (implicitly via `create_architect_agent`). - Updated `frontend/components/sidebar/Sidebar.tsx` to include `gpt-4o` and `claude-3-5-sonnet-20241022` in model selection. - Added `openai` and `anthropic` dependencies to `requirements.txt`. - Implemented state persistence and tool calling compatibility for new runtimes using `LangGraph`'s `StateGraph`. Co-authored-by: naman-ranka <105536693+naman-ranka@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Implemented `AuthManager` with encrypted SQLite storage (`src/auth/`). - Added `SecurityManager` using `cryptography.fernet`. - Refactored `RuntimeFactory` to resolve tokens from `AuthManager` or environment variables. - Created `AuthSettings` UI component for managing provider connections. - Updated `api.py` with auth endpoints (`/api/settings/auth/profiles`). - Updated `RuntimeAdapters` (`OpenAIAdapter`, `AnthropicAdapter`) to accept resolved keys and propagate errors properly. - Updated `src/utils/reporter.py` to be async-compatible with new adapters. - Expanded model support in factory (o1, o3 families). - Cleaned up frontend `Sidebar.tsx` to use the new `AuthSettings` component. Co-authored-by: naman-ranka <105536693+naman-ranka@users.noreply.github.com>
- Implemented `RuntimeAdapter` pattern (`src/runtime/`) for OpenAI, Anthropic, and Gemini (LangGraph). - Added secure `AuthManager` (`src/auth/`) with encrypted SQLite storage for API keys and OAuth tokens. - Refactored `api.py` and `RuntimeFactory` to be async-aware for secure token retrieval. - Created `AuthSettings` frontend component for managing provider connections. - Implemented OAuth login endpoints and refresh logic. - Fixed error handling in adapters and reporter compatibility. - Expanded model routing support (gpt-*, o1-*, o3-*, claude-*). Co-authored-by: naman-ranka <105536693+naman-ranka@users.noreply.github.com>
This PR implements support for multiple LLM runtimes (OpenAI and Anthropic) in addition to the existing Gemini (LangGraph) runtime.
It introduces a runtime adapter pattern to abstract the underlying SDK differences while maintaining compatibility with the existing API and session management.
The frontend is updated to allow users to select the desired model/runtime when creating a new session.
PR created automatically by Jules for task 13194623346548513408 started by @naman-ranka