fix: resolve circular import in commit_and_open_pr

This commit is contained in:
aran-yogesh 2026-02-12 16:32:45 -08:00
parent fdee31eb8b
commit 5c6b9b26b2

View file

@ -5,7 +5,6 @@ from typing import Any
from langgraph.config import get_config
from ..encryption import decrypt_token
from ..server import _create_langsmith_sandbox
from ..utils.github import (
create_github_pr,
get_github_default_branch,
@ -134,6 +133,9 @@ def commit_and_open_pr(
if not sandbox_id:
return {"success": False, "error": "No sandbox found for thread", "pr_url": None}
# Import here to avoid circular import with server.py
from ..server import _create_langsmith_sandbox
sandbox_backend = _create_langsmith_sandbox(sandbox_id)
SANDBOX_BACKENDS[thread_id] = sandbox_backend