Repository navigation
test(sdk): read evaluation state as json parts - #178
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
None. The scheduled eve canary failed: https://github.com/vercel-labs/github-tools/actions/runs/37739369560
📚 Description
ai7.0.133 changed howexperimental_evaluatepasses state to evaluation models. Every state form is converted to an array of parts, so an object state now reaches the provider as[{ type: 'json', value }]. See the ai@7.0.133 release notes.Two tests in
src/evaluation.test.tscompared the rawstatereceived by the mock evaluation model with a plain object, so they failed when the canary bumpedaito latest:requireApproval: 'auto'> skips approval for a low-risk call the user asked forcreateGithubAgent({ preset: 'auto' })> asks one question per preset except maintainerThe new
evaluationStatetest helper unwraps a singlejsonpart and returns any other state unchanged. The assertions themselves are unchanged. The SDK still passes the same object state, so runtime code is not affected.Local checks: SDK
typecheck,lintandtestpass (176 tests) on the pinnedai7.0.130. They also pass after applying the canary's dependency bump (ai7.0.133 with latesteveand@ai-sdk/*), which was not committed.This change only touches tests, so it has no changeset.
📝 Checklist