Repository navigation
Fix/support langgraph 0.5.0 - #2073
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
|
""" WalkthroughThe changes update type annotations from Changes
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (15)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
sdk-python/copilotkit/langgraph_agent.py (1)
238-241: Add a runtime type guard to avoid silent misuse
cast(CompiledStateGraph, graph or agent)suppresses static-type errors but won’t protect at runtime. A tiny assert keeps failures obvious:- self.graph = cast(CompiledStateGraph, graph or agent) + _g = graph or agent + if not isinstance(_g, CompiledStateGraph): + raise TypeError("graph must be a CompiledStateGraph instance") + self.graph = cast(CompiledStateGraph, _g)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
examples/coagents-research-canvas/agent/poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
docs/content/docs/reference/sdk/python/LangGraphAgent.mdx(1 hunks)examples/coagents-research-canvas/agent/pyproject.toml(4 hunks)sdk-python/copilotkit/langgraph_agent.py(4 hunks)sdk-python/pyproject.toml(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: Build Images (coagents-qa-native, ui)
- GitHub Check: Build Images (next-openai, next-openai)
- GitHub Check: Build Images (coagents-qa-native, agent, python, local-deps)
- GitHub Check: Build Images (coagents-qa-text, ui)
- GitHub Check: Build Images (coagents-routing, ui)
- GitHub Check: Build Images (coagents-qa-text, agent, python, local-deps)
- GitHub Check: Build Images (coagents-research-canvas, ui)
- GitHub Check: Build Images (coagents-routing, agent, python, local-deps)
- GitHub Check: Build Images (coagents-research-canvas, agent, python, local-deps)
- GitHub Check: Test (18.x)
- GitHub Check: Test (20.x)
🔇 Additional comments (8)
sdk-python/pyproject.toml (2)
3-3: Ensure pre-release version string is PEP-440 compliant
0.1.52-alpha.1parses as a pre-release, but the dotted suffix (alpha.1) is non-standard. Packaging tools usually expect0.1.52a1. Please double-check thatpoetry publish/pip installbehave as expected.
14-15: Verifylanggraph 0.5.0withlangchain<=0.3.26
langgraphoften follows the latestlangchainAPIs. Limitinglangchainto<=0.3.26could create an incompatibility window iflanggraph 0.5.0already depends on newer interfaces. Run the resolver/tests to confirm there are no import errors.examples/coagents-research-canvas/agent/pyproject.toml (2)
12-12: Version-scheme mismatch between repo and exampleCore SDK is published as
0.1.52-alpha.1while the example consumes>=0.1.52a1.
Although both resolve to the same pre-release epoch, it is easy to miss during manual upgrades. Consider aligning the notation to avoid confusion.
26-26:langgraph-clilagging behind corelanggraphSDK moves to
langgraph 0.5.0, but the CLI is pinned at^0.3.3. Make sure CLI 0.3.x remains forward-compatible; if not, bump it in sync with the core library.Also applies to: 52-52
docs/content/docs/reference/sdk/python/LangGraphAgent.mdx (1)
55-57: Doc update correctly reflects new API
graphtype annotation updated toCompiledStateGraph– matches the codebase change. No further action needed.sdk-python/copilotkit/langgraph_agent.py (3)
6-8: Confirm new import path exists inlanggraph 0.5.0
from langgraph.graph.state import CompiledStateGraphassumes the symbol is re-exported fromlanggraph.graph.state. If the module layout changes again, this will fail at import time. Please runpython -c "import langgraph, langgraph.graph.state as s; print(hasattr(s,'CompiledStateGraph'))"after upgrading.
178-182: Docstring parameter change looks correctParameter docs now reference
CompiledStateGraph. Good catch keeping runtime docs in sync.
190-202: Ensure all call-sites use the newCompiledStateGraphtypeConstructor now expects
graph: Optional[CompiledStateGraph](and deprecatedagentof same type). A quick repo grep forLangGraphAgent(would help verify that noCompiledGraphinstances are still passed.
⏭️ Changeset Not RequiredLatest commit: 96c3985 No changes in this PR affected the Changeset is not required for this PR. |
|
Preview environments destroyed for this pull request. |
Test ResultsStatus: ❌ Failed (View Run) Commit: 8b307f2 Duration: 347.9s Total Tests: 20 Pass Rate: 95.0% Failed Tests: 1 ❌ Failed Tests
🔍 Detailed Resultscoagents-research-canvasCoAgents Research Canvas (UI) - Local Depenencies
coagents-qa-nativeCoAgents QA Native (UI) - Local
coagents-qa-textCoAgents QA Text (UI) - Local
coagents-routingCoAgents Routing (UI) - Local
next-openaiNext OpenAI - Self Hosted
|
Summary by CodeRabbit