Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .changeset/soft-dots-bow.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/with-offline-evals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@voltagent/cli": "^0.1.21",
"@voltagent/core": "^2.6.1",
"@voltagent/evals": "^2.0.3",
"@voltagent/evals": "^2.0.4",
"@voltagent/scorers": "^2.1.0",
"@voltagent/sdk": "^2.0.2",
"ai": "^6.0.0",
Expand Down
39 changes: 39 additions & 0 deletions packages/evals/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# @voltagent/evals

## 2.0.4

### Patch Changes

- [#1108](https://github.com/VoltAgent/voltagent/pull/1108) [`c1df46f`](https://github.com/VoltAgent/voltagent/commit/c1df46fe3a2f478615310c51e649309647b0370c) Thanks [@omeraplak](https://github.com/omeraplak)! - fix: persist offline eval runs when using inline datasets (`dataset.items`)

Offline experiment runs now create and sync run results even when the dataset is provided inline without a managed `datasetVersionId`.

### What changed
- `VoltOpsRunManager` now allows run creation when `dataset.versionId` is missing.
- Append payload generation now normalizes `datasetItemId`:
- UUID item IDs are sent as `datasetItemId`.
- Non-UUID item IDs are sent as `null` and still tracked via `datasetItemHash`.

This avoids API failures when inline dataset items use string IDs like `"item-1"`.

### Example

```ts
import { createExperiment, runExperiment } from "@voltagent/evals";

const experiment = createExperiment({
dataset: {
name: "inline-smoke",
items: [
{
id: "item-1", // non-UUID is supported
input: "What is VoltAgent?",
expected: "An open-source TypeScript framework for AI agents.",
},
],
},
runner: async ({ item }) => ({ output: String(item.input) }),
});

const result = await runExperiment(experiment, { voltOpsClient });
console.log(result.runId); // now created and persisted
```
Comment on lines +19 to +40

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

voltOpsClient is referenced in the example but never declared or imported.

The snippet uses { voltOpsClient } on line 38 without showing how to construct it. Readers copy-pasting the example will get a ReferenceError. The 2.0.3 entry below shows the required setup — it should be included here too.

📝 Proposed fix — add the missing client setup
  ### Example
  
  ```ts
+ import { VoltOpsClient } from "@voltagent/core";
  import { createExperiment, runExperiment } from "@voltagent/evals";
  
+ const voltOpsClient = new VoltOpsClient({
+   publicKey: process.env.VOLTAGENT_PUBLIC_KEY,
+   secretKey: process.env.VOLTAGENT_SECRET_KEY,
+ });
+
  const experiment = createExperiment({
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Example
```ts
import { createExperiment, runExperiment } from "@voltagent/evals";
const experiment = createExperiment({
dataset: {
name: "inline-smoke",
items: [
{
id: "item-1", // non-UUID is supported
input: "What is VoltAgent?",
expected: "An open-source TypeScript framework for AI agents.",
},
],
},
runner: async ({ item }) => ({ output: String(item.input) }),
});
const result = await runExperiment(experiment, { voltOpsClient });
console.log(result.runId); // now created and persisted
```
### Example
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/evals/CHANGELOG.md` around lines 19 - 40, The example in the
CHANGELOG references voltOpsClient in runExperiment but never declares or
imports it; update the example to import VoltOpsClient from "@voltagent/core"
and construct a voltOpsClient instance (e.g., new VoltOpsClient({...}) using
VOLTAGENT_PUBLIC_KEY and VOLTAGENT_SECRET_KEY environment vars) before calling
runExperiment so the example is copy-paste runnable; ensure the snippet shows
the import, the const voltOpsClient = new VoltOpsClient(...) and then passes {
voltOpsClient } to runExperiment alongside the existing
createExperiment/runExperiment usage.


## 2.0.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/evals/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@voltagent/evals",
"description": "VoltAgent evaluation orchestrator utilities",
"version": "2.0.3",
"version": "2.0.4",
"author": "VoltAgent",
"dependencies": {
"@voltagent/internal": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.