The LangGraph Agent Spec adapter fails while loading a valid Flow containing an LlmNode configured with OciGenAiConfig and a strict nested output schema.
Agent Spec serialization succeeds, but runtime loading fails before any OCI request is sent.
Reproduction
The LlmNode declares a structured output such as:
{
"title": "result",
"type": "object",
"required": ["name", "profile"],
"properties": {
"name": {"type": "string"},
"profile": {
"type": "object",
"required": ["score", "active", "tags"]
}
}
}
The LangGraph runtime is loaded with:
RUNTIME_CLASS_IMPORT_PATH=langgraphruntime.LanggraphAgentSpecLoader
Actual behavior
Loading the component fails with:
ValueError: Unsupported tool type <class 'dict'>.
Tool must be passed in as a BaseTool instance, TypedDict class, or BaseModel type.
The failure occurs in:
pyagentspec/adapters/langgraph/_node_execution.py
self.llm.with_structured_output(json_schema)
Then:
ChatOCIGenAI.bind_tools([json_schema])
The adapter passes the JSON schema as a raw Python dictionary, but the installed langchain_oci provider rejects dictionary tool definitions.
Expected behavior
The LangGraph adapter should either:
- Convert the Agent Spec JSON schema into a supported structured-output representation before calling
ChatOCIGenAI; or
- Raise a clear unsupported-feature error during configuration validation.
The component should not fail with a low-level Unsupported tool type <class 'dict'> error.
Impact
- Agent Spec serialization succeeds.
- LangGraph component loading fails.
- The OCI endpoint is never called.
- Structured LlmNode tests cannot execute with
OciGenAiConfig.
- The same Agent Spec may behave differently across LangGraph and WayFlow runtimes.
The LangGraph Agent Spec adapter fails while loading a valid Flow containing an
LlmNodeconfigured withOciGenAiConfigand a strict nested output schema.Agent Spec serialization succeeds, but runtime loading fails before any OCI request is sent.
Reproduction
The
LlmNodedeclares a structured output such as:{ "title": "result", "type": "object", "required": ["name", "profile"], "properties": { "name": {"type": "string"}, "profile": { "type": "object", "required": ["score", "active", "tags"] } } }The LangGraph runtime is loaded with:
Actual behavior
Loading the component fails with:
The failure occurs in:
Then:
The adapter passes the JSON schema as a raw Python dictionary, but the installed
langchain_ociprovider rejects dictionary tool definitions.Expected behavior
The LangGraph adapter should either:
ChatOCIGenAI; orThe component should not fail with a low-level
Unsupported tool type <class 'dict'>error.Impact
OciGenAiConfig.