Conversation
|
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.



This pull request introduces two major improvements to the backend: (1) it adds first-class Hugging Face provider support (for model/dataset discovery and file reading) to the agent and API, and (2) it refines and enforces agent mode handling, restricting valid modes to "plan" and "execute" throughout the backend and API. The PR also updates the system prompt and tool registry to reflect new tools and mode restrictions, and adds comprehensive tests for the new Hugging Face provider and stricter mode validation.
Hugging Face Provider Integration
HF_TOKEN), provider listing in the API, and support for model/dataset search and file reading tools (hf_search_models,hf_model_info,hf_search_datasets,hf_dataset_info,hf_read_file). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]/api/providers, is correctly categorized, and supports token configuration via settings and config endpoints.Agent Mode Handling and Validation
current_mode, defaults to "plan", and falls back to this value if an invalid or null mode is provided. Explicit mode changes persist across approval continuations. [1] [2]System Prompt and Tool Registry Updates
These changes collectively improve the agent's ability to interact with external ML resources, enforce strict operational modes, and provide a clearer, safer user experience.