examples: add Tuning Engines OpenAI-compatible endpoint
Summary
- add a runnable with-tuning-engines example alongside the existing provider examples
- configure @ai-sdk/openai with a custom baseURL and TUNING_ENGINES_API_KEY
- update the examples index to include the new example
Why
We are an AI infrastructure team using VoltAgent with Tuning Engines. VoltAgent remains the agent runtime for tools, memory, and server behavior; Tuning Engines provides a governed OpenAI-compatible endpoint for model access, policy checks, audit logs, traces, and usage/cost reporting. Since the examples already include provider/gateway setups such as OpenRouter, this gives teams using Tuning Engines a starter that matches the existing examples structure. It would mean a lot to us if this is useful, and I am happy to adjust the example to fit your conventions.
Validation
- git diff --check
- attempted dependency install for the example; the repo-wide pnpm workspace install failed locally because the machine ran out of disk while fetching workspace dependencies, so I did not complete a TypeScript build in this environment
Summary by cubic
Adds a runnable with-tuning-engines example that routes VoltAgent model calls through a governed OpenAI-compatible endpoint, with startup validation and logging. This enables policy checks, traces, and usage/cost reporting without changing agent code.
- New Features
- New example at
examples/with-tuning-enginesusing@ai-sdk/openaiwith custombaseURLandTUNING_ENGINES_API_KEY; optionalTUNING_ENGINES_MODEL(defaultgpt-4o);.env.exampleadded; linked in the examples index. - Runs a VoltAgent server via
@voltagent/server-honowith LibSQL memory (@voltagent/libsql) and structured logging via@voltagent/logger. - Startup hardening: throws if
TUNING_ENGINES_API_KEYis missing; dev script usestsxwith.env. - Demo performs one text generation on boot and logs response text and usage.
- New example at
Summary by CodeRabbit
-
New Features
- Added a new "Tuning Engines" example showing VoltAgent integration with a governed OpenAI-compatible endpoint, selectable model, local memory, logging, and a runnable dev/start workflow.
-
Documentation
- Included full example docs, environment variable placeholders, installation and dev/start instructions, usage notes, and project structure guidance.