Global Variables
Architecture
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Configuration │────>│ GlobalVariable │────>│ GlobalVariable │
│ (JSON configs) │ │ Resolver │ │ Store │
│ ${vars:..} │ │ (regex + cache) │ │ (MongoDB/PG) │
└─────────────────┘ └──────────────────┘ └──────────────────┘
│
▼
┌─────────────────┐
│ Template Layer │
│ {{vars.<key>}} │
│ (Jinja2/Qute) │
└─────────────────┘Core Components
Component
Package
Purpose
Two Access Syntaxes
1. Template Syntax: {{vars.<key>}}
{{vars.<key>}}2. Late-Binding Syntax: ${vars:<key>} / ${vars:tenantId/<key>}
${vars:<key>} / ${vars:tenantId/<key>}Form
Syntax
Behavior
When to Use Which
Syntax
Where It Works
When to Use
Resolution Order
Where References Work
Configuration Type
Fields Resolved
REST API
Endpoints
Method
Path
Description
ID Validation
Valid ✅
Invalid ❌
Response Examples
Caching
Configuration
Downstream Cache Invalidation
Use Cases
Fleet-Wide Model Switching
Multi-Tenant Model Switching
Environment-Specific API Endpoints
Feature Flags
System Prompt Injection
Comparison: Global Variables vs Secrets vs Properties vs Snippets
Aspect
Global Variables
Secrets Vault
Properties
Snippets
Decision Guide
Testing
Backend Tests
Test Class
Tests
Coverage
Integration Tests
Last updated
Was this helpful?