To test framework template rendering without running the full orchestrator:
npm run test-templatesThis will:
- Render both OpenAI SDK (LLM) and OpenAI Agents (agentic) templates
- Show the rendered Python code
- Save output files for inspection
- Display framework configurations
- Calculate test matrix combinations
Output files:
test-output-openai-llm.py- Rendered LLM testtest-output-openai-agents.py- Rendered agent test
Cleanup:
rm test-output-*.pyYou can also test templates programmatically:
import { TemplateRenderer } from "./dist/runner/template-renderer.js";
const renderer = new TemplateRenderer();
// Render a template directly
const code = renderer.render("llm/python/openai/template.njk", {
testName: "My Test",
frameworkName: "openai",
system: "You are a helpful assistant.",
input: {
model: "gpt-4o",
prompt: "Hello!",
},
});
// Or use the helper method
const code2 = renderer.renderFramework("llm", "python", "openai", {
testName: "My Test",
frameworkName: "openai",
system: "You are a helpful assistant.",
input: {
model: "gpt-4o",
prompt: "Hello!",
},
});
console.log(code);Generated Python files can be validated:
python3 -m py_compile test-output-openai-llm.pyFramework configurations define test matrices:
{
"versions": ["1.57.0", "1.58.1"],
"sentryVersions": ["latest"]
}This generates 4 test combinations (2 × 2):
- openai 1.57.0 + sentry-sdk 2.19.2
- openai 1.57.0 + sentry-sdk latest
- openai 1.58.1 + sentry-sdk 2.19.2
- openai 1.58.1 + sentry-sdk latest
Each framework has its own directory with two files:
template.njk- Nunjucks templateconfig.json- Framework configuration
Example:
src/runner/templates/llm/python/openai/template.njksrc/runner/templates/llm/python/openai/config.json
Schema:
{
name: string; // Framework identifier
displayName: string; // Human-readable name
type: 'llm-only' | 'agentic';
platform: 'node' | 'python' | 'browser' | 'nextjs' | 'php';
dependencies: Array<{
package: string;
version: string; // "framework" | "latest" | specific version
}>;
versions: string[]; // Framework versions to test
sentryVersions: string[]; // Sentry SDK versions
matrix?: { // Optional additional axes
modelProviders?: string[];
[key: string]: string[];
};
}- Create framework directory:
src/runner/templates/{llm,agents}/{node,python,browser,nextjs,php}/{framework}/ - Create template file:
template.njk - Create config file:
config.json - Rebuild:
npm run build - Test:
npm run test-templates
Example for a new framework called "my-sdk":
mkdir -p src/runner/templates/llm/python/my-sdk
touch src/runner/templates/llm/python/my-sdk/template.njk
touch src/runner/templates/llm/python/my-sdk/config.jsonSee template documentation in src/runner/templates/README.md.