feat: document static variables and aliases for tool outputs#965
feat: document static variables and aliases for tool outputs#965
Conversation
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>
|
🌿 Preview your docs: https://vapi-preview-0988fa30-0bb5-40e5-814c-d553ed6c307b.docs.buildwithfern.com |
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>
|
🌿 Preview your docs: https://vapi-preview-025a24c9-ac8b-4959-9952-0b972a2f77d3.docs.buildwithfern.com |
- 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>
…n 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>
|
🌿 Preview your docs: https://vapi-preview-40abfaec-ac0b-460e-b2e5-27b37ba4bb64.docs.buildwithfern.com |
|
🌿 Preview your docs: https://vapi-preview-25990673-2a2f-4da9-9048-e34fd306daf7.docs.buildwithfern.com |
… 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).
|
🌿 Preview your docs: https://vapi-preview-a31f390e-4cab-4613-9a0e-d0356a5dfad6.docs.buildwithfern.com |
CI Check Analysis:
|
| PR | preview-python |
preview-go |
Status |
|---|---|---|---|
| #955 (Feb 26) | ❌ | ❌ | Merged ✅ |
| #959 (Mar 3) | ❌ | ❌ | Merged ✅ |
| #960 (Mar 3) | ❌ | ❌ | Merged ✅ |
| #965 (this PR) | ❌ | ✅ | Open |
Root Cause
The preview-python job runs fern generate --group python-sdk --preview then poetry run mypy . on the generated code. The current fern-python-sdk generator at v4.37.1 produces union type definitions with duplicate field names that mypy correctly flags as [no-redef] errors (32 errors across 29 generated files).
What was tried and why it didn't work
- Upgraded
fern-python-sdkfrom v4.37.1 → v4.61.5 (commit631bfa1) - Reverted because the newer generator version caused CLI compatibility issues that broke ALL SDK preview jobs (commit
a61e40c)
What this PR DID fix
This PR successfully fixed the preview-go check (which was also failing on all recent PRs) by upgrading fern-go-sdk from v1.16.4 → v1.28.3.
Recommendation
The preview-python failure should be addressed separately by updating the Fern Python SDK generator to a compatible version or adjusting the mypy configuration. This is tracked independently of this documentation PR.
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>
|
🌿 Preview your docs: https://vapi-preview-fa37c64a-f80f-4664-95f1-7f8343baeb93.docs.buildwithfern.com |
Description
fern/tools/static-variables-and-aliases.mdxcovering two recently-shipped features for tool outputs$reference (from PR #10200)fern/docs.ymlnavigation under Tools, positioned between "Tool rejection plan" and "Custom tools troubleshooting"Resolves DEVREL-529
Testing Steps
fern docs devor navigate to preview deployment/tools/static-variables-and-aliaseswith correct formatting/tools/custom-tools,/tools/code-tool,/tools/tool-rejection-plan, and/api-reference/tools/createresolve correctly