Skip to content

Add Multi-SDK Runtime Support (OpenAI, Anthropic)#10

Open
naman-ranka wants to merge 4 commits intofeature/robust-synth-sim-guardrailsfrom
multi-runtime-support-13194623346548513408
Open

Add Multi-SDK Runtime Support (OpenAI, Anthropic)#10
naman-ranka wants to merge 4 commits intofeature/robust-synth-sim-guardrailsfrom
multi-runtime-support-13194623346548513408

Conversation

@naman-ranka
Copy link
Copy Markdown
Owner

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

- 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>
@google-labs-jules
Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 3 commits February 23, 2026 17:27
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant