Studio import returns 500 on its own export when an input value is numeric
Symptom
Re-importing Studio's own export returns HTTP 500 when any action input
holds a numeric value — for example max_tokens: 1024.
Reported against 26.9.0.
Root cause — confirmed in the code
studio/ryax/studio/infrastructure/packaging/packaging_import.py:234:
if workflow_action_input_value_yaml is not None:
if workflow_action_input_value_yaml.startswith("="):The value comes straight from the parsed YAML, so it is whatever type YAML
produced. 1024 is an int, which has no .startswith, and the
AttributeError surfaces as a 500. Only values that happen to be strings work.
The "=" prefix is the reference-vs-literal marker, so the check has to run on
every input — it just needs to be type-safe first.
Reproduction
- Build a workflow with an integer static input (
max_tokens: 1024). - Export it from Studio.
- Import the file Studio just produced → HTTP 500.
Export/import is not round-trip safe, which makes this reproducible from the product's own output rather than from hand-written YAML.
Workaround in place
The demo builds workflows through the UI APIs instead of importing them.
Suggested fix
Coerce to str before the prefix test, or test isinstance(value, str) and value.startswith("=") and treat non-strings as literals. A regression test
should cover int, float and bool inputs, since YAML will produce all three.
Found while migrating the CAPE demo to Ryax 26.9.0: ryax-tech/public/cape-tools/cape-agentic-infra#2 (comment 3905714558)