sim_code_to_flow
Derive a Petri-net model from source code with the configured LLM (control flow, state machine, resources or concurrency focus), validate it, and store it as a NEW model you own. The same generator the /api/code-to-flow endpoint uses; refused when this deployment has no LLM provider configured. Returns the new id when the answer validates, otherwise the raw model JSON and the validation errors so you can fix and sim_create_model it by hand.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | source code to analyse | |
| name | No | name for the derived model | |
| focus | No | control-flow (default), state-machine, resources or concurrency | |
| language | No | source language hint, e.g. go, python, javascript |