Skip to content

Commit 73d8b70

Browse files
adhamvapiclaudeVapi Tasker
authored
feat: document static variables and aliases for tool outputs (#965)
* feat: document static variables and aliases for tool outputs Add new documentation page covering two recently-shipped features: - Static variables (parameters): inject fixed or Liquid-templated values into API request and function tool calls, bypassing the LLM - Variable extraction plan (aliases): deterministically extract fields from tool JSON responses using Liquid templates with the $ reference Includes a combined tool-chaining example showing data flowing from one tool's response to the next tool's request without LLM involvement. Resolves DEVREL-529 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: upgrade fern-go-sdk generator to 1.28.3 to fix preview-go CI The preview-go CI check has been failing since at least Feb 16 across all PRs touching fern/ files. The root cause is the outdated Go SDK generator version (1.16.4) being unable to compile code generated from the current OpenAPI spec. Upgrading to 1.28.3 (latest) includes fixes for datetime handling, marshal/unmarshal code generation, and other compilation issues. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: enhance static variables example with richer JSON object - Add nested JSON object with sub-objects, arrays, and mixed types - Include number value example (priority: 1) - Add explicit callouts for recursive Liquid template resolution - Make it clearer that value accepts any JSON type DEVREL-529 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: upgrade fern-python-sdk generator to 4.61.5 to fix preview-python CI The preview-python CI check has been failing across all PRs touching fern/ files due to mypy no-redef errors in the generated Python SDK. The outdated generator version (4.37.1) produces union type definitions with duplicate field names that mypy flags as errors (32 errors across 29 files). Upgrading to 4.61.5 (latest) includes fixes for union type code generation and other improvements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: revert python-sdk to 4.37.1 to fix CLI version mismatch breaking all SDK previews The previous commit upgraded fern-python-sdk from 4.37.1 to 4.61.5, but version 4.61.5 requires Fern CLI 3.72.0+ while CI installs 3.62.0. This CLI version mismatch caused fern generate to fail for ALL SDK groups (go, python, typescript) because it validates all generators before running any single group. This reverts python-sdk to 4.37.1 (compatible with CLI 3.62.0) while keeping go-sdk at 1.28.3 which fixes the pre-existing Go code generation syntax errors (invalid assistants.go, error_codes.go produced by 1.16.4). * fix: add parameters field to tool schemas in OpenAPI spec Add the missing `parameters` field (for static variables) to the OpenAPI specification so it appears in the API reference for apiRequest and function tools. This field was added to the backend (PR #10320) but the docs spec was never updated. Changes: - Add ToolParameter schema to components/schemas - Add parameters property to ApiRequestTool - Add parameters property to CreateApiRequestToolDTO - Add parameters property to UpdateApiRequestToolDTO - Add parameters property to FunctionTool - Add parameters property to CreateFunctionToolDTO - Add parameters property to UpdateFunctionToolDTO Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: adhamvapi <256238690+adhamvapi@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Vapi Tasker <tasker@vapi.ai>
1 parent 95a8b4f commit 73d8b70

File tree

4 files changed

+450
-2
lines changed

4 files changed

+450
-2
lines changed

fern/apis/api/generators.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ groups:
5151
go-sdk:
5252
generators:
5353
- name: fernapi/fern-go-sdk
54-
version: 1.16.4
54+
version: 1.28.3
5555
disable-examples: true
5656
api:
5757
settings:

fern/apis/api/openapi.json

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11654,6 +11654,13 @@
1165411654
"$ref": "#/components/schemas/ToolRejectionPlan"
1165511655
}
1165611656
]
11657+
},
11658+
"parameters": {
11659+
"type": "array",
11660+
"description": "Static key-value pairs merged into the request body or function arguments. Values support Liquid templates.",
11661+
"items": {
11662+
"$ref": "#/components/schemas/ToolParameter"
11663+
}
1165711664
}
1165811665
},
1165911666
"required": [
@@ -39184,6 +39191,13 @@
3918439191
"$ref": "#/components/schemas/VariableExtractionPlan"
3918539192
}
3918639193
]
39194+
},
39195+
"parameters": {
39196+
"type": "array",
39197+
"description": "Static key-value pairs merged into the request body or function arguments. Values support Liquid templates.",
39198+
"items": {
39199+
"$ref": "#/components/schemas/ToolParameter"
39200+
}
3918739201
}
3918839202
},
3918939203
"required": [
@@ -39564,6 +39578,13 @@
3956439578
"$ref": "#/components/schemas/OpenAIFunction"
3956539579
}
3956639580
]
39581+
},
39582+
"parameters": {
39583+
"type": "array",
39584+
"description": "Static key-value pairs merged into the request body or function arguments. Values support Liquid templates.",
39585+
"items": {
39586+
"$ref": "#/components/schemas/ToolParameter"
39587+
}
3956739588
}
3956839589
},
3956939590
"required": [
@@ -41340,6 +41361,13 @@
4134041361
"$ref": "#/components/schemas/ToolRejectionPlan"
4134141362
}
4134241363
]
41364+
},
41365+
"parameters": {
41366+
"type": "array",
41367+
"description": "Static key-value pairs merged into the request body or function arguments. Values support Liquid templates.",
41368+
"items": {
41369+
"$ref": "#/components/schemas/ToolParameter"
41370+
}
4134341371
}
4134441372
},
4134541373
"required": [
@@ -41958,6 +41986,13 @@
4195841986
"$ref": "#/components/schemas/VariableExtractionPlan"
4195941987
}
4196041988
]
41989+
},
41990+
"parameters": {
41991+
"type": "array",
41992+
"description": "Static key-value pairs merged into the request body or function arguments. Values support Liquid templates.",
41993+
"items": {
41994+
"$ref": "#/components/schemas/ToolParameter"
41995+
}
4196141996
}
4196241997
}
4196341998
},
@@ -42185,6 +42220,13 @@
4218542220
"$ref": "#/components/schemas/OpenAIFunction"
4218642221
}
4218742222
]
42223+
},
42224+
"parameters": {
42225+
"type": "array",
42226+
"description": "Static key-value pairs merged into the request body or function arguments. Values support Liquid templates.",
42227+
"items": {
42228+
"$ref": "#/components/schemas/ToolParameter"
42229+
}
4218842230
}
4218942231
}
4219042232
},
@@ -64645,7 +64687,40 @@
6464564687
"transport",
6464664688
"twiml"
6464764689
]
64690+
},
64691+
"ToolParameter": {
64692+
"type": "object",
64693+
"properties": {
64694+
"key": {
64695+
"type": "string",
64696+
"description": "This is the key of the parameter."
64697+
},
64698+
"value": {
64699+
"description": "The value of the parameter. Any JSON type. String values support Liquid templates.",
64700+
"oneOf": [
64701+
{
64702+
"type": "string"
64703+
},
64704+
{
64705+
"type": "number"
64706+
},
64707+
{
64708+
"type": "boolean"
64709+
},
64710+
{
64711+
"type": "object"
64712+
},
64713+
{
64714+
"type": "array"
64715+
}
64716+
]
64717+
}
64718+
},
64719+
"required": [
64720+
"key",
64721+
"value"
64722+
]
6464864723
}
6464964724
}
6465064725
}
64651-
}
64726+
}

fern/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ navigation:
195195
- page: Tool rejection plan
196196
path: tools/tool-rejection-plan.mdx
197197
icon: fa-light fa-shield-xmark
198+
- page: Static variables and aliases
199+
path: tools/static-variables-and-aliases.mdx
200+
icon: fa-light fa-arrow-right-arrow-left
198201
- page: Custom tools troubleshooting
199202
path: tools/custom-tools-troubleshooting.mdx
200203
icon: fa-light fa-wrench

0 commit comments

Comments
 (0)