feat: add AgentSkill type and skills support to generate methods#155
Open
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Open
feat: add AgentSkill type and skills support to generate methods#155devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Conversation
- Add AgentSkill class with skill_id, skill_name, version fields - Add skills field to GenerationConfig and AgentExecutionOrCreationConfig - Make domain optional in image/file generate when skills provided - Add validation requiring either domain or config.skills Co-Authored-By: dinesh@vlm.run <dinesh@vlm.run>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: dinesh@vlm.run <dinesh@vlm.run>
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.
feat: add AgentSkill type and skills support to generate methods
Summary
Adds
AgentSkillmodel andskillssupport across prediction methods, allowing callers to useskill_name+versionas an alternative to specifying adomain. This aligns the Python SDK with the backend changes in vlm-lab#1621.Changes:
AgentSkillPydantic model withskill_id,skill_name,version,typefields and a validator requiring at least one identifierskillsfield toGenerationConfigandAgentExecutionOrCreationConfigdomainoptional inImagePredictions.generate()andFilePredictions.generate()— now eitherdomainorconfig.skillsmust be provideddomainkey is only sent in the request payload when explicitly providedautocastis skipped when nodomainis present (skills-based flow)Review & Testing Checklist for Human
AgentExecutionOrCreationConfig(line ~230) usesList[AgentSkill]in its type annotation, butAgentSkillis defined later (~line 315). Verify this doesn't cause aNameErrorat import time — this depends on whetherfrom __future__ import annotationsis present at the top oftypes.pyor if Pydantic defers annotation resolution. This is the highest-risk item.ImagePredictions.generate(): A large block of manual image/URL validation was replaced by a call toself._handle_images_or_urls(). Verify that_handle_images_or_urlscovers all the same edge cases (empty lists, mixed types, non-http URLs, etc.)model_dump():GenerationConfig.model_dump()needs to correctly serialize nestedAgentSkillobjects into the JSON payload the backend expects (skill_id,skill_name,version). Test with an actual API call or at minimum a unit test.config=GenerationConfig(skills=[AgentSkill(skill_name="...", version="latest")])without adomainto verify the backend accepts it and returns the expected response.Notes