Skip to content

Commit 4b402f7

Browse files
committed
fix(schema): resolve LLMProvider $ref by moving nested $defs to root level
The schema generator was creating nested $defs within executor input schemas, causing $ref resolution failures for types like LLMProvider. This fix extracts and merges all nested $defs to the root level during schema generation, using the same pattern already applied to WorkflowOutputSchema. This ensures that $ref paths like #/$defs/LLMProvider correctly resolve to types defined at the root level, fixing the "$ref '/$defs/LLMProvider' can not be resolved" error introduced in PR #20. - Extracts nested $defs from executor input schemas - Merges them to root-level $defs before inlining - Maintains consistency with WorkflowOutputSchema pattern - All 93 tests pass, schema validates correctly
1 parent aa20298 commit 4b402f7

1 file changed

Lines changed: 11 additions & 26 deletions

File tree

schema.json

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -612,19 +612,6 @@
612612
"then": {
613613
"properties": {
614614
"inputs": {
615-
"$defs": {
616-
"LLMProvider": {
617-
"description": "Enum for supported LLM providers.",
618-
"enum": [
619-
"openai",
620-
"anthropic",
621-
"gemini",
622-
"ollama"
623-
],
624-
"title": "LLMProvider",
625-
"type": "string"
626-
}
627-
},
628615
"additionalProperties": false,
629616
"description": "Inputs for LLMCall block",
630617
"properties": {
@@ -1357,20 +1344,18 @@
13571344
"title": "HttpCallInput",
13581345
"type": "object"
13591346
},
1347+
"LLMProvider": {
1348+
"description": "Enum for supported LLM providers.",
1349+
"enum": [
1350+
"openai",
1351+
"anthropic",
1352+
"gemini",
1353+
"ollama"
1354+
],
1355+
"title": "LLMProvider",
1356+
"type": "string"
1357+
},
13601358
"LLMCallInput": {
1361-
"$defs": {
1362-
"LLMProvider": {
1363-
"description": "Enum for supported LLM providers.",
1364-
"enum": [
1365-
"openai",
1366-
"anthropic",
1367-
"gemini",
1368-
"ollama"
1369-
],
1370-
"title": "LLMProvider",
1371-
"type": "string"
1372-
}
1373-
},
13741359
"additionalProperties": false,
13751360
"description": "Input model for LLMCall executor.\n\nAll inputs are pre-resolved by VariableResolver:\n- {{secrets.OPENAI_API_KEY}} \u2192 actual key value\n- {{inputs.prompt}} \u2192 actual prompt text\n- {{blocks.previous.outputs.data}} \u2192 actual data",
13761361
"properties": {

0 commit comments

Comments
 (0)