Skip to content

Limit configuration requirements to necessary requirements#38

Merged
neubig merged 1 commit intomainfrom
openhands/limit-config-requirements
Mar 2, 2026
Merged

Limit configuration requirements to necessary requirements#38
neubig merged 1 commit intomainfrom
openhands/limit-config-requirements

Conversation

@neubig
Copy link
Contributor

@neubig neubig commented Feb 23, 2026

Summary

This PR implements the configuration requirements simplification as requested in issue #37.

Changes

Configuration Validation Logic (ConfigContext.tsx)

Updated calculateIsConfigured() function to have different requirements based on execution environment:

  • Cloud mode: Only requires OpenHands Cloud API key (sessionApiKey)
  • Local mode: Requires LLM API key + GitHub token + agent server URL

ConfigPage UI Updates (ConfigPage.tsx)

  1. On Vercel (cloud-only deployment):

    • Removed the environment toggle entirely (only cloud mode is available)
    • Hidden LLM Provider and GitHub Integration sections (not needed for cloud)
    • Simplified requirements message: "You only need an OpenHands Cloud API key to get started"
  2. When running locally (not on Vercel):

    • Environment toggle (Cloud/Local) is shown
    • Cloud Agent selected: Only shows OpenHands Cloud API Key field, hides LLM and GitHub sections
    • Local Agent selected: Shows all configuration fields (agent URL, LLM config, GitHub token)
  3. Added requirements explanation banner:

    • Clearly explains what configuration is needed for each mode
    • Helps users understand they only need one or the other

Test Updates

  • Updated all ConfigPage tests to reflect new UI behavior
  • Added comprehensive tests for the new configuration validation logic
  • All 71 tests pass

Screenshots

The configuration page now:

  • Shows a clear "Configuration Requirements" banner explaining what's needed
  • Hides unnecessary fields based on the selected mode
  • On Vercel, only shows the OpenHands Cloud API Key field

Testing

  • ✅ All 71 tests pass
  • ✅ TypeScript build succeeds
  • ✅ ESLint passes

Fixes #37

@neubig can click here to continue refining the PR

- Cloud mode: Only requires OpenHands Cloud API key
- Local mode: Requires LLM API key, GitHub token, and agent server URL

Changes:
- Updated ConfigContext validation logic (calculateIsConfigured) to have different requirements for cloud vs local modes
- Updated ConfigPage UI:
  - Hide environment toggle on Vercel (cloud-only deployment)
  - Hide LLM Provider and GitHub sections when in cloud mode (they're not needed)
  - Added clear requirements explanation banner showing what's needed for each mode
  - Simplified messaging on Vercel to just show 'You only need an OpenHands Cloud API key'
- Updated tests to reflect new UI behavior
- Added comprehensive tests for configuration validation logic

Fixes #37

Co-authored-by: openhands <openhands@all-hands.dev>
@vercel
Copy link

vercel bot commented Feb 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openhands-vulnerability-fixer Ready Ready Preview, Comment Feb 23, 2026 11:35pm

Request Review

@neubig neubig marked this pull request as ready for review March 1, 2026 13:24
@neubig neubig marked this pull request as draft March 1, 2026 13:29
@neubig neubig marked this pull request as ready for review March 2, 2026 03:43
@neubig neubig merged commit 7178f82 into main Mar 2, 2026
2 checks passed
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.

Limit configuration requirements to necessary requirements

2 participants