fix(devin): add missing support for ATIF v1.7#570
Merged
Conversation
Co-Authored-By: bmcdonough <18721778+bmcdonough@users.noreply.github.com>
Contributor
|
@tvcsantos Thank you for your efforts getting this over the finish line. I haven't had time to get back to this. |
… fallback - Remove the @modelcontextprotocol/sdk JsonSchemaType import and the unused ToolDefinition/FunctionDefinition types it served; type Agent.tool_definitions as unknown since the parser never reads it (no dependency warranted). - Remove isImageContentPart: unused, and its `"image" in part` check could never be true (image parts carry `source`/`type`, not `image`). - Use the `type` discriminant in isTextContentPart instead of property presence. - getMetricsFromStep: fall back to legacy metadata.metrics when step.metrics is present but empty, so a partial metrics object cannot silently zero usage. - Tests: cover the empty step.metrics fallback and image-only message normalization.
ebf7c32 to
74dc032
Compare
Member
|
Thanks for this, @tvcsantos (and @bmcdonough) — solid, well-tested ATIF v1.7 support. 🙌 I pushed one small follow-up commit on top with a few review nits:
Validation: |
Contributor
Author
Makes sense, it was not used anyway 👍
Ups :D, also it was not working as expected yup 👍
Yup that is it. The method was broken. Should have been like you did 👍
Makes sense 👍 Thanks for reviewing it. |
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.
Summary
Devin now outputs in ATIF v1.7 format. This PR addresses that supporting the new format, while keeping backward compatible with the existing versions.
This PR relates and completes #526. Added @bmcdonough as co-author since the work was based on his work on the PR and also since he was actually the one finding the issues. Thanks for that @bmcdonough.
Closes #525
Testing
npm testpassesnpm run buildsucceedsFor new providers only:
npm run dev -- todayshows correct costs and session counts for this providernpm run dev -- models --provider <name>shows correct model names and pricing