Skip to content

ENH: Make space_sdk configurable in CodeAgent.push_to_hub() - #2953

Open
ioseba wants to merge 1 commit into
huggingface:mainfrom
ioseba:feat-2513-push-to-hub-space-sdk
Open

ioseba wants to merge 1 commit into
huggingface:mainfrom
ioseba:feat-2513-push-to-hub-space-sdk

Conversation

@ioseba

@ioseba ioseba commented Oct 10, 2026

Copy link
Copy Markdown

Fixes #2513.

Description

Currently, CodeAgent.push_to_hub() hardcodes space_sdk="gradio" when invoking create_repo(...). This causes issues for users who wish to create Static spaces (e.g. users on free tiers where Gradio spaces may be restricted) or other Space SDK configurations.

This PR:

  1. Adds space_sdk: str = "gradio" to push_to_hub() in MultiStepAgent (inherited by CodeAgent and ToolCallingAgent).
  2. Validates space_sdk against huggingface_hub.constants.SPACES_SDK_TYPES, raising an informative ValueError if an unsupported SDK is passed.
  3. Forwards space_sdk to create_repo(...).
  4. Documents the parameter in push_to_hub() docstring.
  5. Adds unit tests in tests/test_agents.py testing default ("gradio"), custom ("static"), and invalid SDK scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Make space_sdk configurable in CodeAgent.push_to_hub()

1 participant