_determine_platform() — langchain Function Reference
Architecture documentation for the _determine_platform() function in _execution.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 86c76604_9ef0_684c_c50e_47b8e1363077["_determine_platform()"] 270607fa_c99a_3911_2c2a_8e2c42ed30ef["CodexSandboxExecutionPolicy"] 86c76604_9ef0_684c_c50e_47b8e1363077 -->|defined in| 270607fa_c99a_3911_2c2a_8e2c42ed30ef e4dfd7ef_1e04_5414_759b_eeaddac35815["_build_command()"] e4dfd7ef_1e04_5414_759b_eeaddac35815 -->|calls| 86c76604_9ef0_684c_c50e_47b8e1363077 style 86c76604_9ef0_684c_c50e_47b8e1363077 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/langchain/agents/middleware/_execution.py lines 245–256
def _determine_platform(self) -> str:
if self.platform != "auto":
return self.platform
if sys.platform.startswith("linux"):
return "linux"
if sys.platform == "darwin": # type: ignore[unreachable, unused-ignore]
return "macos"
msg = ( # type: ignore[unreachable, unused-ignore]
"Codex sandbox policy could not determine a supported platform; "
"set 'platform' explicitly."
)
raise RuntimeError(msg)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _determine_platform() do?
_determine_platform() is a function in the langchain codebase, defined in libs/langchain_v1/langchain/agents/middleware/_execution.py.
Where is _determine_platform() defined?
_determine_platform() is defined in libs/langchain_v1/langchain/agents/middleware/_execution.py at line 245.
What calls _determine_platform()?
_determine_platform() is called by 1 function(s): _build_command.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free